diff --git a/bin/sandbox-dotnet b/bin/sandbox-dotnet index 6ccea44b3..c74759887 100755 --- a/bin/sandbox-dotnet +++ b/bin/sandbox-dotnet @@ -10,8 +10,9 @@ TARGET_DIR="${DIR}/../sandbox/dotnet" ARTIFACTS_DIR="${DIR}/../sandbox/dotnet/artifacts" mkdir -p "${ARTIFACTS_DIR}" - -rm -f "${ARTIFACTS_DIR}/"* +rm -f "${ARTIFACTS_DIR}/*.nupkg" +rm -f "${TARGET_DIR}/src/Dropbox.SignSandbox/*.cs" +cp "${SDK_DIR}/templates/Entry.cs" "${TARGET_DIR}/src/Dropbox.SignSandbox/Entry.cs" docker run --rm -it \ -v "${SDK_DIR}:${WORKING_DIR}" \ @@ -19,10 +20,10 @@ docker run --rm -it \ -v "${TARGET_DIR}:/target" \ -w "${WORKING_DIR}" \ -u root:root \ - mcr.microsoft.com/dotnet/sdk:6.0 dotnet pack -o /artifacts + mcr.microsoft.com/dotnet/sdk:9.0 dotnet pack -o /artifacts docker run --rm -it \ -v "${TARGET_DIR}:${WORKING_DIR}" \ -w "${WORKING_DIR}" \ -u root:root \ - mcr.microsoft.com/dotnet/sdk:6.0 dotnet build + mcr.microsoft.com/dotnet/sdk:9.0 dotnet build diff --git a/bin/sandbox-java b/bin/sandbox-java new file mode 100755 index 000000000..6f86eb5ac --- /dev/null +++ b/bin/sandbox-java @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e + +DIR=$(cd `dirname $0` && pwd) + +WORKING_DIR="/app/openapi" +SDK_DIR="${DIR}/../sdks/java-v2" +TARGET_DIR="${DIR}/../sandbox/java" +ARTIFACTS_DIR="${DIR}/../sandbox/java/artifacts" + +mkdir -p "${ARTIFACTS_DIR}" +rm -f "${ARTIFACTS_DIR}/*.jar" +rm -f "${TARGET_DIR}/src/main/java/com/dropbox/sign_sandbox/*.java" +cp "${SDK_DIR}/templates/Main.java" "${TARGET_DIR}/src/main/java/com/dropbox/sign_sandbox/Main.java" + +docker run --rm -it \ + -v "${SDK_DIR}:${WORKING_DIR}" \ + -v "${ARTIFACTS_DIR}:/artifacts" \ + -v "dropbox-sign-sdk-gradle-cache:/home/gradle/.gradle" \ + -v "dropbox-sign-sdk-maven-cache:/root/.m2" \ + -w "${WORKING_DIR}" \ + -e GEN_DIR=/app \ + gradle:7.6.1-jdk11 ./gradlew clean fatJar + +cp "${SDK_DIR}/build/libs/"dropbox-sign-*-all.jar "${ARTIFACTS_DIR}/dropbox-sign.jar" diff --git a/bin/sandbox-java-v1 b/bin/sandbox-java-v1 deleted file mode 100755 index 15bd9ad06..000000000 --- a/bin/sandbox-java-v1 +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DIR=$(cd `dirname $0` && pwd) - -WORKING_DIR="/app/openapi" -SDK_DIR="${DIR}/../sdks/java-v1" -TARGET_DIR="${DIR}/../sandbox/java-v1" -ARTIFACTS_DIR="${DIR}/../sandbox/java-v1/artifacts" - -mkdir -p "${ARTIFACTS_DIR}" - -rm -f "${ARTIFACTS_DIR}/"* - -docker run --rm -it \ - -v "${SDK_DIR}:${WORKING_DIR}" \ - -v "${ARTIFACTS_DIR}:/artifacts" \ - -v "dropbox-sign-sdk-gradle-cache:/home/gradle/.gradle" \ - -v "dropbox-sign-sdk-maven-cache:/root/.m2" \ - -w "${WORKING_DIR}" \ - -e GEN_DIR=/app \ - gradle:7.6.1-jdk11 ./gradlew clean fatJar - -cp "${SDK_DIR}/build/libs/"dropbox-sign-*-all.jar "${ARTIFACTS_DIR}/dropbox-sign.jar" diff --git a/bin/sandbox-java-v2 b/bin/sandbox-java-v2 deleted file mode 100755 index 9349f5d0c..000000000 --- a/bin/sandbox-java-v2 +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DIR=$(cd `dirname $0` && pwd) - -WORKING_DIR="/app/openapi" -SDK_DIR="${DIR}/../sdks/java-v2" -TARGET_DIR="${DIR}/../sandbox/java-v2" -ARTIFACTS_DIR="${DIR}/../sandbox/java-v2/artifacts" - -mkdir -p "${ARTIFACTS_DIR}" - -rm -f "${ARTIFACTS_DIR}/"* - -docker run --rm -it \ - -v "${SDK_DIR}:${WORKING_DIR}" \ - -v "${ARTIFACTS_DIR}:/artifacts" \ - -v "dropbox-sign-sdk-gradle-cache:/home/gradle/.gradle" \ - -v "dropbox-sign-sdk-maven-cache:/root/.m2" \ - -w "${WORKING_DIR}" \ - -e GEN_DIR=/app \ - gradle:7.6.1-jdk11 ./gradlew clean fatJar - -cp "${SDK_DIR}/build/libs/"dropbox-sign-*-all.jar "${ARTIFACTS_DIR}/dropbox-sign.jar" diff --git a/bin/sandbox-node b/bin/sandbox-node index d8d68d366..60da86c08 100755 --- a/bin/sandbox-node +++ b/bin/sandbox-node @@ -10,8 +10,9 @@ TARGET_DIR="${DIR}/../sandbox/node" ARTIFACTS_DIR="${DIR}/../sandbox/node/artifacts" mkdir -p "${ARTIFACTS_DIR}" - -rm -f "${ARTIFACTS_DIR}/"* +rm -f "${ARTIFACTS_DIR}/*.tgz" +rm -f "${TARGET_DIR}/src/*.ts" +rm -f "${TARGET_DIR}/src/*.js" rm -f "${TARGET_DIR}/package-lock.json" rm -rf "${TARGET_DIR}/node_modules" @@ -20,15 +21,20 @@ docker run -it --rm \ -v "${ARTIFACTS_DIR}:/artifacts" \ -v "dropbox-sign-sdk-npm-cache:/root/.npm" \ -w "${WORKING_DIR}" \ - node:17 npm pack --pack-destination /artifacts + node:22 npm install -mv "${ARTIFACTS_DIR}/"*.tgz "${ARTIFACTS_DIR}/dropbox-sign-sdk.tgz" +docker run -it --rm \ + -v "${SDK_DIR}:${WORKING_DIR}" \ + -v "${ARTIFACTS_DIR}:/artifacts" \ + -v "dropbox-sign-sdk-npm-cache:/root/.npm" \ + -w "${WORKING_DIR}" \ + node:22 npm run build docker run -it --rm \ - -v "${TARGET_DIR}:${WORKING_DIR}" \ + -v "${SDK_DIR}:${WORKING_DIR}" \ + -v "${ARTIFACTS_DIR}:/artifacts" \ -v "dropbox-sign-sdk-npm-cache:/root/.npm" \ -w "${WORKING_DIR}" \ - node:17 npm install + node:22 npm pack --pack-destination /artifacts -printf "\nDONE! Run with:\n\n" -printf "\tnpx ts-node Example.ts" +mv "${ARTIFACTS_DIR}/"*.tgz "${ARTIFACTS_DIR}/dropbox-sign-sdk.tgz" diff --git a/bin/sandbox-php b/bin/sandbox-php index 1479a674f..261f767b9 100755 --- a/bin/sandbox-php +++ b/bin/sandbox-php @@ -10,10 +10,9 @@ TARGET_DIR="${DIR}/../sandbox/php" ARTIFACTS_DIR="${DIR}/../sandbox/php/artifacts" mkdir -p "${ARTIFACTS_DIR}" - -rm -rf "${ARTIFACTS_DIR}/"* +rm -f "${ARTIFACTS_DIR}/*.zip" rm -f "${TARGET_DIR}/composer.lock" -rm -rf "${TARGET_DIR}/vendor/hellosign" +rm -rf "${TARGET_DIR}/vendor" cp -r "${SDK_DIR}" "${ARTIFACTS_DIR}/package" cd "${ARTIFACTS_DIR}/package" @@ -41,13 +40,6 @@ zip -9 -r "${ARTIFACTS_DIR}/dropbox-sign.zip" \ "./test/*" \ "./vendor/*" -docker run -it --rm \ - -v "${TARGET_DIR}:${WORKING_DIR}" \ - -v "dropbox-sign-sdk-composer-cache:/.composer" \ - -w "${WORKING_DIR}" \ - -u root:root \ - jtreminio/php-cli:7.4 composer install - cd "${ARTIFACTS_DIR}" rm -rf "${ARTIFACTS_DIR}/package" diff --git a/bin/sandbox-ruby b/bin/sandbox-ruby new file mode 100755 index 000000000..8abb45aa6 --- /dev/null +++ b/bin/sandbox-ruby @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -e + +DIR=$(cd `dirname $0` && pwd) + +WORKING_DIR="/app/openapi" +SDK_DIR="${DIR}/../sdks/ruby" +TARGET_DIR="${DIR}/../sandbox/ruby" +ARTIFACTS_DIR="${DIR}/../sandbox/ruby/artifacts" + +rm -rf "${ARTIFACTS_DIR}" +mkdir -p "${ARTIFACTS_DIR}/gems" + +docker run --rm \ + -e GEM_HOME="/.gem-cache" \ + -e BUNDLE_PATH="/.bundle-cache" \ + -v "${SDK_DIR}:${WORKING_DIR}" \ + -v "${ARTIFACTS_DIR}:/artifacts" \ + -v "dropbox-sign-sdk-gem-cache:/.gem-cache" \ + -v "dropbox-sign-sdk-bundle-cache:/.bundle-cache" \ + -w "${WORKING_DIR}" \ + ruby:3.4 gem build dropbox-sign.gemspec -o /artifacts/gems/dropbox-sign.gem + +docker run --rm \ + -e GEM_HOME="/.gem-cache" \ + -e BUNDLE_PATH="/.bundle-cache" \ + -v "${ARTIFACTS_DIR}:/artifacts" \ + -v "dropbox-sign-sdk-gem-cache:/.gem-cache" \ + -v "dropbox-sign-sdk-bundle-cache:/.bundle-cache" \ + -w "/artifacts" \ + ruby:3.4 gem generate_index diff --git a/build b/build index 2ef773ff6..f706758a2 100755 --- a/build +++ b/build @@ -14,4 +14,11 @@ printf "\n" bash "${DIR}/bin/php" ./bin/generate-oas.php +cp "${DIR}/examples/"*.cs "${DIR}/sandbox/dotnet/src/Dropbox.SignSandbox/" +cp "${DIR}/examples/"*.java "${DIR}/sandbox/java/src/main/java/com/dropbox/sign_sandbox/" +cp "${DIR}/examples/"*.php "${DIR}/sandbox/php/src/" +cp "${DIR}/examples/"*.py "${DIR}/sandbox/python/src/" +cp "${DIR}/examples/"*.rb "${DIR}/sandbox/ruby/src/" +cp "${DIR}/examples/"*.ts "${DIR}/sandbox/node/src/" + printf "Success!\n" diff --git a/examples/AccountCreate.cs b/examples/AccountCreate.cs deleted file mode 100644 index 360f7751f..000000000 --- a/examples/AccountCreate.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountCreateRequest( - emailAddress: "newuser@dropboxsign.com" - ); - - try - { - var result = accountApi.AccountCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/AccountCreate.java b/examples/AccountCreate.java deleted file mode 100644 index 6063411c0..000000000 --- a/examples/AccountCreate.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = accountApi.accountCreate(data); - 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/AccountCreate.js b/examples/AccountCreate.js deleted file mode 100644 index 3aed64809..000000000 --- a/examples/AccountCreate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountCreate.php b/examples/AccountCreate.php deleted file mode 100644 index 73176d1e2..000000000 --- a/examples/AccountCreate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); - -try { - $result = $accountApi->accountCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountCreate.py b/examples/AccountCreate.py deleted file mode 100644 index 6bdaebb21..000000000 --- a/examples/AccountCreate.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountCreateRequest( - email_address="newuser@dropboxsign.com", - ) - - try: - response = account_api.account_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/AccountCreate.rb b/examples/AccountCreate.rb deleted file mode 100644 index b572ae10c..000000000 --- a/examples/AccountCreate.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountCreateRequest.new -data.email_address = "newuser@dropboxsign.com" - -begin - result = account_api.account_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/AccountCreate.ts b/examples/AccountCreate.ts deleted file mode 100644 index 2819e3db8..000000000 --- a/examples/AccountCreate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountCreateExample.cs b/examples/AccountCreateExample.cs new file mode 100644 index 000000000..373d6a20f --- /dev/null +++ b/examples/AccountCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountCreateRequest = new AccountCreateRequest( + emailAddress: "newuser@dropboxsign.com" + ); + + try + { + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountCreateExample.java b/examples/AccountCreateExample.java new file mode 100644 index 000000000..2743ffa13 --- /dev/null +++ b/examples/AccountCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); + } 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/AccountCreateExample.php b/examples/AccountCreateExample.php new file mode 100644 index 000000000..736fb3cc6 --- /dev/null +++ b/examples/AccountCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/examples/AccountCreateExample.py b/examples/AccountCreateExample.py new file mode 100644 index 000000000..f911a898b --- /dev/null +++ b/examples/AccountCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_create_request = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + ) + + try: + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_create: %s\n" % e) diff --git a/examples/AccountCreateExample.rb b/examples/AccountCreateExample.rb new file mode 100644 index 000000000..6ce6db264 --- /dev/null +++ b/examples/AccountCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" + +begin + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_create: #{e}" +end diff --git a/examples/AccountCreate.sh b/examples/AccountCreateExample.sh similarity index 100% rename from examples/AccountCreate.sh rename to examples/AccountCreateExample.sh diff --git a/examples/AccountCreateExample.ts b/examples/AccountCreateExample.ts new file mode 100644 index 000000000..bf8570a02 --- /dev/null +++ b/examples/AccountCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/examples/AccountCreateOauthExample.cs b/examples/AccountCreateOauthExample.cs new file mode 100644 index 000000000..1976cb18e --- /dev/null +++ b/examples/AccountCreateOauthExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountCreateOauthExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountCreateRequest = new AccountCreateRequest( + emailAddress: "newuser@dropboxsign.com", + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465" + ); + + try + { + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountCreateOauthExample.java b/examples/AccountCreateOauthExample.java new file mode 100644 index 000000000..e6ae95b94 --- /dev/null +++ b/examples/AccountCreateOauthExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateOauthExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + accountCreateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + accountCreateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); + } 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/AccountCreateOauthExample.php b/examples/AccountCreateOauthExample.php new file mode 100644 index 000000000..0c4898be2 --- /dev/null +++ b/examples/AccountCreateOauthExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com") + ->setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/examples/AccountCreateOauthExample.py b/examples/AccountCreateOauthExample.py new file mode 100644 index 000000000..8930f04d6 --- /dev/null +++ b/examples/AccountCreateOauthExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_create_request = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + client_id="cc91c61d00f8bb2ece1428035716b", + client_secret="1d14434088507ffa390e6f5528465", + ) + + try: + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_create: %s\n" % e) diff --git a/examples/AccountCreateOauthExample.rb b/examples/AccountCreateOauthExample.rb new file mode 100644 index 000000000..26ebdc768 --- /dev/null +++ b/examples/AccountCreateOauthExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" +account_create_request.client_id = "cc91c61d00f8bb2ece1428035716b" +account_create_request.client_secret = "1d14434088507ffa390e6f5528465" + +begin + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_create: #{e}" +end diff --git a/examples/AccountCreateOauthExample.ts b/examples/AccountCreateOauthExample.ts new file mode 100644 index 000000000..d77c2e560 --- /dev/null +++ b/examples/AccountCreateOauthExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/examples/AccountGet.cs b/examples/AccountGet.cs deleted file mode 100644 index e6e35af25..000000000 --- a/examples/AccountGet.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - try - { - var result = accountApi.AccountGet(null, "jack@example.com"); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/AccountGet.java b/examples/AccountGet.java deleted file mode 100644 index e05f3ff12..000000000 --- a/examples/AccountGet.java +++ /dev/null @@ -1,31 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - try { - AccountGetResponse result = accountApi.accountGet(null, "jack@example.com"); - 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/AccountGet.js b/examples/AccountGet.js deleted file mode 100644 index 00d03af5c..000000000 --- a/examples/AccountGet.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountGet.php b/examples/AccountGet.php deleted file mode 100644 index 25ac7fb65..000000000 --- a/examples/AccountGet.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -try { - $result = $accountApi->accountGet(null, 'jack@example.com'); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountGet.py b/examples/AccountGet.py deleted file mode 100644 index 659cb62bf..000000000 --- a/examples/AccountGet.py +++ /dev/null @@ -1,19 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - try: - response = account_api.account_get(email_address="jack@example.com") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/AccountGet.rb b/examples/AccountGet.rb deleted file mode 100644 index 426fcb67e..000000000 --- a/examples/AccountGet.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -account_api = Dropbox::Sign::AccountApi.new - -begin - result = account_api.account_get({ email_address: "jack@example.com" }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/AccountGet.ts b/examples/AccountGet.ts deleted file mode 100644 index 00d03af5c..000000000 --- a/examples/AccountGet.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountGetExample.cs b/examples/AccountGetExample.cs new file mode 100644 index 000000000..83d94716e --- /dev/null +++ b/examples/AccountGetExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountGet(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountGetExample.java b/examples/AccountGetExample.java new file mode 100644 index 000000000..b1f712ace --- /dev/null +++ b/examples/AccountGetExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountGet( + null, // accountId + null // emailAddress + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountGet"); + 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/AccountGetExample.php b/examples/AccountGetExample.php new file mode 100644 index 000000000..96b594d7e --- /dev/null +++ b/examples/AccountGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountGet: {$e->getMessage()}"; +} diff --git a/examples/AccountGetExample.py b/examples/AccountGetExample.py new file mode 100644 index 000000000..d7e910dd6 --- /dev/null +++ b/examples/AccountGetExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_get() + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_get: %s\n" % e) diff --git a/examples/AccountGetExample.rb b/examples/AccountGetExample.rb new file mode 100644 index 000000000..3b8fb5d9e --- /dev/null +++ b/examples/AccountGetExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::AccountApi.new.account_get + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_get: #{e}" +end diff --git a/examples/AccountGet.sh b/examples/AccountGetExample.sh similarity index 100% rename from examples/AccountGet.sh rename to examples/AccountGetExample.sh diff --git a/examples/AccountGetExample.ts b/examples/AccountGetExample.ts new file mode 100644 index 000000000..6bc7ae2de --- /dev/null +++ b/examples/AccountGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountGet:"); + console.log(error.body); +}); diff --git a/examples/AccountUpdate.cs b/examples/AccountUpdate.cs deleted file mode 100644 index 2261b47f2..000000000 --- a/examples/AccountUpdate.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountUpdateRequest( - callbackUrl: "https://www.example.com/callback" - ); - - try - { - var result = accountApi.AccountUpdate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/AccountUpdate.java b/examples/AccountUpdate.java deleted file mode 100644 index 9b8d374c1..000000000 --- a/examples/AccountUpdate.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountUpdateRequest() - .callbackUrl("https://www.example.com/callback"); - - try { - AccountGetResponse result = accountApi.accountUpdate(data); - 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/AccountUpdate.js b/examples/AccountUpdate.js deleted file mode 100644 index 0d48a5917..000000000 --- a/examples/AccountUpdate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountUpdate.php b/examples/AccountUpdate.php deleted file mode 100644 index b94dae236..000000000 --- a/examples/AccountUpdate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountUpdateRequest(); -$data->setCallbackUrl("https://www.example.com/callback"); - -try { - $result = $accountApi->accountUpdate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountUpdate.py b/examples/AccountUpdate.py deleted file mode 100644 index d1cf4a496..000000000 --- a/examples/AccountUpdate.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountUpdateRequest( - callback_url="https://www.example.com/callback", - ) - - try: - response = account_api.account_update(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/AccountUpdate.rb b/examples/AccountUpdate.rb deleted file mode 100644 index 55b127bcb..000000000 --- a/examples/AccountUpdate.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountUpdateRequest.new -data.callback_url = "https://www.example.com/callback" - -begin - result = account_api.account_update(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/AccountUpdate.ts b/examples/AccountUpdate.ts deleted file mode 100644 index c76ac1d21..000000000 --- a/examples/AccountUpdate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountUpdateRequest = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountUpdateExample.cs b/examples/AccountUpdateExample.cs new file mode 100644 index 000000000..f62bb1125 --- /dev/null +++ b/examples/AccountUpdateExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountUpdateRequest = new AccountUpdateRequest( + callbackUrl: "https://www.example.com/callback", + locale: "en-US" + ); + + try + { + var response = new AccountApi(config).AccountUpdate( + accountUpdateRequest: accountUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountUpdateExample.java b/examples/AccountUpdateExample.java new file mode 100644 index 000000000..c1d2f1ca2 --- /dev/null +++ b/examples/AccountUpdateExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountUpdateRequest = new AccountUpdateRequest(); + accountUpdateRequest.callbackUrl("https://www.example.com/callback"); + accountUpdateRequest.locale("en-US"); + + try + { + var response = new AccountApi(config).accountUpdate( + accountUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountUpdate"); + 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/AccountUpdateExample.php b/examples/AccountUpdateExample.php new file mode 100644 index 000000000..64a1ad38d --- /dev/null +++ b/examples/AccountUpdateExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_update_request = (new Dropbox\Sign\Model\AccountUpdateRequest()) + ->setCallbackUrl("https://www.example.com/callback") + ->setLocale("en-US"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountUpdate( + account_update_request: $account_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountUpdate: {$e->getMessage()}"; +} diff --git a/examples/AccountUpdateExample.py b/examples/AccountUpdateExample.py new file mode 100644 index 000000000..5ef5466ea --- /dev/null +++ b/examples/AccountUpdateExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_update_request = models.AccountUpdateRequest( + callback_url="https://www.example.com/callback", + locale="en-US", + ) + + try: + response = api.AccountApi(api_client).account_update( + account_update_request=account_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_update: %s\n" % e) diff --git a/examples/AccountUpdateExample.rb b/examples/AccountUpdateExample.rb new file mode 100644 index 000000000..f8d7f1b2d --- /dev/null +++ b/examples/AccountUpdateExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_update_request = Dropbox::Sign::AccountUpdateRequest.new +account_update_request.callback_url = "https://www.example.com/callback" +account_update_request.locale = "en-US" + +begin + response = Dropbox::Sign::AccountApi.new.account_update( + account_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_update: #{e}" +end diff --git a/examples/AccountUpdate.sh b/examples/AccountUpdateExample.sh similarity index 100% rename from examples/AccountUpdate.sh rename to examples/AccountUpdateExample.sh diff --git a/examples/AccountUpdateExample.ts b/examples/AccountUpdateExample.ts new file mode 100644 index 000000000..3f86ffea0 --- /dev/null +++ b/examples/AccountUpdateExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountUpdateRequest: models.AccountUpdateRequest = { + callbackUrl: "https://www.example.com/callback", + locale: "en-US", +}; + +apiCaller.accountUpdate( + accountUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountUpdate:"); + console.log(error.body); +}); diff --git a/examples/AccountVerify.cs b/examples/AccountVerify.cs deleted file mode 100644 index 36aacd066..000000000 --- a/examples/AccountVerify.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountVerifyRequest( - emailAddress: "some_user@dropboxsign.com" - ); - - try - { - var result = accountApi.AccountVerify(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/AccountVerify.java b/examples/AccountVerify.java deleted file mode 100644 index 36a96660d..000000000 --- a/examples/AccountVerify.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountVerifyRequest() - .emailAddress("some_user@dropboxsign.com"); - - try { - AccountVerifyResponse result = accountApi.accountVerify(data); - 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/AccountVerify.js b/examples/AccountVerify.js deleted file mode 100644 index 689286eed..000000000 --- a/examples/AccountVerify.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountVerify.php b/examples/AccountVerify.php deleted file mode 100644 index 12a037173..000000000 --- a/examples/AccountVerify.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountVerifyRequest(); -$data->setEmailAddress("some_user@dropboxsign.com"); - -try { - $result = $accountApi->accountVerify($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/AccountVerify.py b/examples/AccountVerify.py deleted file mode 100644 index 0e95fa2e4..000000000 --- a/examples/AccountVerify.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountVerifyRequest( - email_address="some_user@dropboxsign.com", - ) - - try: - response = account_api.account_verify(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/AccountVerify.rb b/examples/AccountVerify.rb deleted file mode 100644 index 20295f3d2..000000000 --- a/examples/AccountVerify.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountVerifyRequest.new -data.email_address = "some_user@dropboxsign.com" - -begin - result = account_api.account_verify(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/AccountVerify.ts b/examples/AccountVerify.ts deleted file mode 100644 index d2a75488b..000000000 --- a/examples/AccountVerify.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountVerifyRequest = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/AccountVerifyExample.cs b/examples/AccountVerifyExample.cs new file mode 100644 index 000000000..cba51330d --- /dev/null +++ b/examples/AccountVerifyExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountVerifyExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountVerifyRequest = new AccountVerifyRequest( + emailAddress: "some_user@dropboxsign.com" + ); + + try + { + var response = new AccountApi(config).AccountVerify( + accountVerifyRequest: accountVerifyRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountVerify: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/AccountVerifyExample.java b/examples/AccountVerifyExample.java new file mode 100644 index 000000000..5180f6772 --- /dev/null +++ b/examples/AccountVerifyExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountVerifyExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountVerifyRequest = new AccountVerifyRequest(); + accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountVerify( + accountVerifyRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountVerify"); + 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/AccountVerifyExample.php b/examples/AccountVerifyExample.php new file mode 100644 index 000000000..acdee34e7 --- /dev/null +++ b/examples/AccountVerifyExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_verify_request = (new Dropbox\Sign\Model\AccountVerifyRequest()) + ->setEmailAddress("some_user@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountVerify( + account_verify_request: $account_verify_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountVerify: {$e->getMessage()}"; +} diff --git a/examples/AccountVerifyExample.py b/examples/AccountVerifyExample.py new file mode 100644 index 000000000..65bdb8018 --- /dev/null +++ b/examples/AccountVerifyExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_verify_request = models.AccountVerifyRequest( + email_address="some_user@dropboxsign.com", + ) + + try: + response = api.AccountApi(api_client).account_verify( + account_verify_request=account_verify_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_verify: %s\n" % e) diff --git a/examples/AccountVerifyExample.rb b/examples/AccountVerifyExample.rb new file mode 100644 index 000000000..8e57affce --- /dev/null +++ b/examples/AccountVerifyExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_verify_request = Dropbox::Sign::AccountVerifyRequest.new +account_verify_request.email_address = "some_user@dropboxsign.com" + +begin + response = Dropbox::Sign::AccountApi.new.account_verify( + account_verify_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_verify: #{e}" +end diff --git a/examples/AccountVerify.sh b/examples/AccountVerifyExample.sh similarity index 100% rename from examples/AccountVerify.sh rename to examples/AccountVerifyExample.sh diff --git a/examples/AccountVerifyExample.ts b/examples/AccountVerifyExample.ts new file mode 100644 index 000000000..8b79bdf00 --- /dev/null +++ b/examples/AccountVerifyExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountVerifyRequest: models.AccountVerifyRequest = { + emailAddress: "some_user@dropboxsign.com", +}; + +apiCaller.accountVerify( + accountVerifyRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountVerify:"); + console.log(error.body); +}); diff --git a/examples/ApiAppCreate.cs b/examples/ApiAppCreate.cs deleted file mode 100644 index bc78c6428..000000000 --- a/examples/ApiAppCreate.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var oauth = new SubOAuth( - callbackUrl: "https://example.com/oauth", - scopes: new List() { - SubOAuth.ScopesEnum.BasicAccountInfo, - SubOAuth.ScopesEnum.RequestSignature - } - ); - - var whiteLabelingOptions = new SubWhiteLabelingOptions( - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff" - ); - - var customLogoFile = new FileStream( - "CustomLogoFile.png", - FileMode.Open - ); - - var data = new ApiAppCreateRequest( - name: "My Production App", - domains: new List(){"example.com"}, - oauth: oauth, - whiteLabelingOptions: whiteLabelingOptions, - customLogoFile: customLogoFile - ); - - try - { - var result = apiAppApi.ApiAppCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ApiAppCreate.java b/examples/ApiAppCreate.java deleted file mode 100644 index 2d3c80fcf..000000000 --- a/examples/ApiAppCreate.java +++ /dev/null @@ -1,51 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of((SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppCreateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - try { - ApiAppGetResponse result = apiAppApi.apiAppCreate(data); - 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/ApiAppCreate.js b/examples/ApiAppCreate.js deleted file mode 100644 index 09d14e50a..000000000 --- a/examples/ApiAppCreate.js +++ /dev/null @@ -1,39 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - "basic_account_info", - "request_signature", - ], -}; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppCreate.php b/examples/ApiAppCreate.php deleted file mode 100644 index 8686c98fb..000000000 --- a/examples/ApiAppCreate.php +++ /dev/null @@ -1,42 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$oauth = new Dropbox\Sign\Model\SubOAuth(); -$oauth->setCallbackUrl("https://example.com/oauth") - ->setScopes([ - Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, - Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, - ]); - -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") - ->setPrimaryButtonTextColor("#ffffff"); - -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppCreateRequest(); -$data->setName("My Production App") - ->setDomains(["example.com"]) - ->setOauth($oauth) - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -try { - $result = $apiAppApi->apiAppCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppCreate.py b/examples/ApiAppCreate.py deleted file mode 100644 index 634057b35..000000000 --- a/examples/ApiAppCreate.py +++ /dev/null @@ -1,39 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - oauth = models.SubOAuth( - callback_url="https://example.com/oauth", - scopes=["basic_account_info" "request_signature"], - ) - - white_labeling_options = models.SubWhiteLabelingOptions( - primary_button_color="#00b3e6", - primary_button_text_color="#ffffff", - ) - - custom_logo_file = open("./CustomLogoFile.png", "rb") - - data = models.ApiAppCreateRequest( - name="My Production App", - domains=["example.com"], - oauth=oauth, - white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, - ) - - try: - response = api_app_api.api_app_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ApiAppCreate.rb b/examples/ApiAppCreate.rb deleted file mode 100644 index 6b1ca23bf..000000000 --- a/examples/ApiAppCreate.rb +++ /dev/null @@ -1,35 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api_app_api = Dropbox::Sign::ApiAppApi.new - -oauth = Dropbox::Sign::SubOAuth.new -oauth.callback_url = "https://example.com/oauth" -oauth.scopes = %w[basic_account_info request_signature] - -white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new -white_labeling_options.primary_button_color = "#00b3e6" -white_labeling_options.primary_button_text_color = "#ffffff" - -custom_logo_file = File.new('./CustomLogoFile.png') - -data = Dropbox::Sign::ApiAppCreateRequest.new -data.name = "My Production App" -data.domains = ["example.com"] -data.oauth = oauth -data.white_labeling_options = white_labeling_options -data.custom_logo_file = custom_logo_file - -begin - result = api_app_api.api_app_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ApiAppCreate.ts b/examples/ApiAppCreate.ts deleted file mode 100644 index bcbec4d99..000000000 --- a/examples/ApiAppCreate.ts +++ /dev/null @@ -1,39 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth: DropboxSign.SubOAuth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - DropboxSign.SubOAuth.ScopesEnum.BasicAccountInfo, - DropboxSign.SubOAuth.ScopesEnum.RequestSignature, - ], -}; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppCreateRequest = { - name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppCreateExample.cs b/examples/ApiAppCreateExample.cs new file mode 100644 index 000000000..277e40121 --- /dev/null +++ b/examples/ApiAppCreateExample.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var oauth = new SubOAuth( + callbackUrl: "https://example.com/oauth", + scopes: [ + SubOAuth.ScopesEnum.BasicAccountInfo, + SubOAuth.ScopesEnum.RequestSignature, + ] + ); + + var whiteLabelingOptions = new SubWhiteLabelingOptions( + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff" + ); + + var apiAppCreateRequest = new ApiAppCreateRequest( + name: "My Production App", + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions + ); + + try + { + var response = new ApiAppApi(config).ApiAppCreate( + apiAppCreateRequest: apiAppCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ApiAppCreateExample.java b/examples/ApiAppCreateExample.java new file mode 100644 index 000000000..2d81a97b1 --- /dev/null +++ b/examples/ApiAppCreateExample.java @@ -0,0 +1,61 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppCreateRequest = new ApiAppCreateRequest(); + apiAppCreateRequest.name("My Production App"); + apiAppCreateRequest.domains(List.of ( + "example.com" + )); + apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppCreateRequest.oauth(oauth); + apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppCreate( + apiAppCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppCreate"); + 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/ApiAppCreateExample.php b/examples/ApiAppCreateExample.php new file mode 100644 index 000000000..7ec68a6f5 --- /dev/null +++ b/examples/ApiAppCreateExample.php @@ -0,0 +1,42 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_create_request = (new Dropbox\Sign\Model\ApiAppCreateRequest()) + ->setName("My Production App") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppCreate( + api_app_create_request: $api_app_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppCreate: {$e->getMessage()}"; +} diff --git a/examples/ApiAppCreateExample.py b/examples/ApiAppCreateExample.py new file mode 100644 index 000000000..345edd053 --- /dev/null +++ b/examples/ApiAppCreateExample.py @@ -0,0 +1,43 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=[ + "basic_account_info", + "request_signature", + ], + ) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + api_app_create_request = models.ApiAppCreateRequest( + name="My Production App", + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), + oauth=oauth, + white_labeling_options=white_labeling_options, + ) + + try: + response = api.ApiAppApi(api_client).api_app_create( + api_app_create_request=api_app_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_create: %s\n" % e) diff --git a/examples/ApiAppCreateExample.rb b/examples/ApiAppCreateExample.rb new file mode 100644 index 000000000..d2b959780 --- /dev/null +++ b/examples/ApiAppCreateExample.rb @@ -0,0 +1,37 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +oauth = Dropbox::Sign::SubOAuth.new +oauth.callback_url = "https://example.com/oauth" +oauth.scopes = [ + "basic_account_info", + "request_signature", +] + +white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new +white_labeling_options.primary_button_color = "#00b3e6" +white_labeling_options.primary_button_text_color = "#ffffff" + +api_app_create_request = Dropbox::Sign::ApiAppCreateRequest.new +api_app_create_request.name = "My Production App" +api_app_create_request.domains = [ + "example.com", +] +api_app_create_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_create_request.oauth = oauth +api_app_create_request.white_labeling_options = white_labeling_options + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_create( + api_app_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_create: #{e}" +end diff --git a/examples/ApiAppCreate.sh b/examples/ApiAppCreateExample.sh similarity index 100% rename from examples/ApiAppCreate.sh rename to examples/ApiAppCreateExample.sh diff --git a/examples/ApiAppCreateExample.ts b/examples/ApiAppCreateExample.ts new file mode 100644 index 000000000..82890bf18 --- /dev/null +++ b/examples/ApiAppCreateExample.ts @@ -0,0 +1,39 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppCreateRequest: models.ApiAppCreateRequest = { + name: "My Production App", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppCreate( + apiAppCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppCreate:"); + console.log(error.body); +}); diff --git a/examples/ApiAppDelete.cs b/examples/ApiAppDelete.cs deleted file mode 100644 index 540adfe0d..000000000 --- a/examples/ApiAppDelete.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try - { - apiAppApi.ApiAppDelete(clientId); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ApiAppDelete.java b/examples/ApiAppDelete.java deleted file mode 100644 index fe443187e..000000000 --- a/examples/ApiAppDelete.java +++ /dev/null @@ -1,31 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - apiAppApi.apiAppDelete(clientId); - } 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/ApiAppDelete.js b/examples/ApiAppDelete.js deleted file mode 100644 index 37f7b0e26..000000000 --- a/examples/ApiAppDelete.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppDelete.php b/examples/ApiAppDelete.php deleted file mode 100644 index d53477ba4..000000000 --- a/examples/ApiAppDelete.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $apiAppApi->apiAppDelete($clientId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppDelete.py b/examples/ApiAppDelete.py deleted file mode 100644 index 3733306cf..000000000 --- a/examples/ApiAppDelete.py +++ /dev/null @@ -1,18 +0,0 @@ -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - api_app_api.api_app_delete(client_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ApiAppDelete.rb b/examples/ApiAppDelete.rb deleted file mode 100644 index 6e69462bb..000000000 --- a/examples/ApiAppDelete.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api_app_api = Dropbox::Sign::ApiAppApi.new - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - -begin - result = api_app_api.api_app_delete(client_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ApiAppDelete.ts b/examples/ApiAppDelete.ts deleted file mode 100644 index 37f7b0e26..000000000 --- a/examples/ApiAppDelete.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppDeleteExample.cs b/examples/ApiAppDeleteExample.cs new file mode 100644 index 000000000..87235a6a3 --- /dev/null +++ b/examples/ApiAppDeleteExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new ApiAppApi(config).ApiAppDelete( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ApiAppDeleteExample.java b/examples/ApiAppDeleteExample.java new file mode 100644 index 000000000..aa23b5f0c --- /dev/null +++ b/examples/ApiAppDeleteExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new ApiAppApi(config).apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppDelete"); + 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/ApiAppDeleteExample.php b/examples/ApiAppDeleteExample.php new file mode 100644 index 000000000..0734efaf9 --- /dev/null +++ b/examples/ApiAppDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppDelete( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppDelete: {$e->getMessage()}"; +} diff --git a/examples/ApiAppDeleteExample.py b/examples/ApiAppDeleteExample.py new file mode 100644 index 000000000..bcfe5d65b --- /dev/null +++ b/examples/ApiAppDeleteExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.ApiAppApi(api_client).api_app_delete( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_delete: %s\n" % e) diff --git a/examples/ApiAppDeleteExample.rb b/examples/ApiAppDeleteExample.rb new file mode 100644 index 000000000..def7fb657 --- /dev/null +++ b/examples/ApiAppDeleteExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::ApiAppApi.new.api_app_delete( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_delete: #{e}" +end diff --git a/examples/ApiAppDelete.sh b/examples/ApiAppDeleteExample.sh similarity index 100% rename from examples/ApiAppDelete.sh rename to examples/ApiAppDeleteExample.sh diff --git a/examples/ApiAppDeleteExample.ts b/examples/ApiAppDeleteExample.ts new file mode 100644 index 000000000..1ffefb975 --- /dev/null +++ b/examples/ApiAppDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppDelete:"); + console.log(error.body); +}); diff --git a/examples/ApiAppGet.cs b/examples/ApiAppGet.cs deleted file mode 100644 index 260e5072e..000000000 --- a/examples/ApiAppGet.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try - { - var result = apiAppApi.ApiAppGet(clientId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ApiAppGet.java b/examples/ApiAppGet.java deleted file mode 100644 index 5d3a4bbd9..000000000 --- a/examples/ApiAppGet.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppGet(clientId); - 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/ApiAppGet.js b/examples/ApiAppGet.js deleted file mode 100644 index e300219e7..000000000 --- a/examples/ApiAppGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppGet.php b/examples/ApiAppGet.php deleted file mode 100644 index 4372cd629..000000000 --- a/examples/ApiAppGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $result = $apiAppApi->apiAppGet($clientId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppGet.py b/examples/ApiAppGet.py deleted file mode 100644 index 07330bf35..000000000 --- a/examples/ApiAppGet.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - response = api_app_api.api_app_get(client_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ApiAppGet.rb b/examples/ApiAppGet.rb deleted file mode 100644 index 37011b33b..000000000 --- a/examples/ApiAppGet.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api_app_api = Dropbox::Sign::ApiAppApi.new - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - -begin - result = api_app_api.api_app_get(client_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ApiAppGet.ts b/examples/ApiAppGet.ts deleted file mode 100644 index e300219e7..000000000 --- a/examples/ApiAppGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppGetExample.cs b/examples/ApiAppGetExample.cs new file mode 100644 index 000000000..8bbf80af4 --- /dev/null +++ b/examples/ApiAppGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new ApiAppApi(config).ApiAppGet( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ApiAppGetExample.java b/examples/ApiAppGetExample.java new file mode 100644 index 000000000..6ad075b4b --- /dev/null +++ b/examples/ApiAppGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppGet"); + 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/ApiAppGetExample.php b/examples/ApiAppGetExample.php new file mode 100644 index 000000000..f4dcc571b --- /dev/null +++ b/examples/ApiAppGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppGet( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppGet: {$e->getMessage()}"; +} diff --git a/examples/ApiAppGetExample.py b/examples/ApiAppGetExample.py new file mode 100644 index 000000000..0eee76c6a --- /dev/null +++ b/examples/ApiAppGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.ApiAppApi(api_client).api_app_get( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_get: %s\n" % e) diff --git a/examples/ApiAppGetExample.rb b/examples/ApiAppGetExample.rb new file mode 100644 index 000000000..f40c92b55 --- /dev/null +++ b/examples/ApiAppGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_get( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_get: #{e}" +end diff --git a/examples/ApiAppGet.sh b/examples/ApiAppGetExample.sh similarity index 100% rename from examples/ApiAppGet.sh rename to examples/ApiAppGetExample.sh diff --git a/examples/ApiAppGetExample.ts b/examples/ApiAppGetExample.ts new file mode 100644 index 000000000..4899769af --- /dev/null +++ b/examples/ApiAppGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppGet:"); + console.log(error.body); +}); diff --git a/examples/ApiAppList.cs b/examples/ApiAppList.cs deleted file mode 100644 index 094fb3b96..000000000 --- a/examples/ApiAppList.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var page = 1; - var pageSize = 2; - - try - { - var result = apiAppApi.ApiAppList(page, pageSize); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ApiAppList.java b/examples/ApiAppList.java deleted file mode 100644 index e16df1a70..000000000 --- a/examples/ApiAppList.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var page = 1; - var pageSize = 2; - - try { - ApiAppListResponse result = apiAppApi.apiAppList(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/ApiAppList.js b/examples/ApiAppList.js deleted file mode 100644 index 46638ebe7..000000000 --- a/examples/ApiAppList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppList.php b/examples/ApiAppList.php deleted file mode 100644 index 9fb6cca9e..000000000 --- a/examples/ApiAppList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$page = 1; -$pageSize = 2; - -try { - $result = $apiAppApi->apiAppList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppList.py b/examples/ApiAppList.py deleted file mode 100644 index 6c6ada0c8..000000000 --- a/examples/ApiAppList.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - page = 1 - page_size = 2 - - try: - response = api_app_api.api_app_list( - page=page, - page_size=page_size, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ApiAppList.rb b/examples/ApiAppList.rb deleted file mode 100644 index fa0d767f5..000000000 --- a/examples/ApiAppList.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api_app_api = Dropbox::Sign::ApiAppApi.new - -page = 1 -page_size = 2 - -begin - result = api_app_api.api_app_list({ page: page, page_size: page_size }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ApiAppList.ts b/examples/ApiAppList.ts deleted file mode 100644 index 46638ebe7..000000000 --- a/examples/ApiAppList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppListExample.cs b/examples/ApiAppListExample.cs new file mode 100644 index 000000000..be9060253 --- /dev/null +++ b/examples/ApiAppListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new ApiAppApi(config).ApiAppList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ApiAppListExample.java b/examples/ApiAppListExample.java new file mode 100644 index 000000000..073756800 --- /dev/null +++ b/examples/ApiAppListExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppList"); + 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/ApiAppListExample.php b/examples/ApiAppListExample.php new file mode 100644 index 000000000..6e9a8e5cb --- /dev/null +++ b/examples/ApiAppListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppList: {$e->getMessage()}"; +} diff --git a/examples/ApiAppListExample.py b/examples/ApiAppListExample.py new file mode 100644 index 000000000..c0bca67da --- /dev/null +++ b/examples/ApiAppListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.ApiAppApi(api_client).api_app_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_list: %s\n" % e) diff --git a/examples/ApiAppListExample.rb b/examples/ApiAppListExample.rb new file mode 100644 index 000000000..3e776c659 --- /dev/null +++ b/examples/ApiAppListExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_list: #{e}" +end diff --git a/examples/ApiAppList.sh b/examples/ApiAppListExample.sh similarity index 100% rename from examples/ApiAppList.sh rename to examples/ApiAppListExample.sh diff --git a/examples/ApiAppListExample.ts b/examples/ApiAppListExample.ts new file mode 100644 index 000000000..7304a9d1c --- /dev/null +++ b/examples/ApiAppListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppList:"); + console.log(error.body); +}); diff --git a/examples/ApiAppUpdate.cs b/examples/ApiAppUpdate.cs deleted file mode 100644 index 4bca7ccc4..000000000 --- a/examples/ApiAppUpdate.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var oauth = new SubOAuth( - callbackUrl: "https://example.com/oauth", - scopes: new List() { - SubOAuth.ScopesEnum.BasicAccountInfo, - SubOAuth.ScopesEnum.RequestSignature - } - ); - - var whiteLabelingOptions = new SubWhiteLabelingOptions( - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff" - ); - - var customLogoFile = new FileStream( - "CustomLogoFile.png", - FileMode.Open - ); - - var data = new ApiAppUpdateRequest( - name: "My Production App", - domains: new List(){"example.com"}, - oauth: oauth, - whiteLabelingOptions: whiteLabelingOptions, - customLogoFile: customLogoFile - ); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try - { - var result = apiAppApi.ApiAppUpdate(clientId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ApiAppUpdate.java b/examples/ApiAppUpdate.java deleted file mode 100644 index a65617313..000000000 --- a/examples/ApiAppUpdate.java +++ /dev/null @@ -1,53 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of(SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppUpdateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppUpdate(clientId, data); - 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/ApiAppUpdate.js b/examples/ApiAppUpdate.js deleted file mode 100644 index 940878909..000000000 --- a/examples/ApiAppUpdate.js +++ /dev/null @@ -1,32 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, -}; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppUpdate.php b/examples/ApiAppUpdate.php deleted file mode 100644 index 2e96f9e44..000000000 --- a/examples/ApiAppUpdate.php +++ /dev/null @@ -1,36 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") - ->setPrimaryButtonTextColor("#ffffff"); - -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppUpdateRequest(); -$data->setName("New Name") - ->setCallbackUrl("http://example.com/dropboxsign") - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -try { - $result = $apiAppApi->apiAppUpdate($clientId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ApiAppUpdate.py b/examples/ApiAppUpdate.py deleted file mode 100644 index 97ea06561..000000000 --- a/examples/ApiAppUpdate.py +++ /dev/null @@ -1,35 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - white_labeling_options = models.SubWhiteLabelingOptions( - primary_button_color="#00b3e6", - primary_button_text_color="#ffffff", - ) - - custom_logo_file = open("./CustomLogoFile.png", "rb") - - data = models.ApiAppUpdateRequest( - name="New Name", - callback_url="http://example.com/dropboxsign", - white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, - ) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - - try: - response = api_app_api.api_app_update(client_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ApiAppUpdate.rb b/examples/ApiAppUpdate.rb deleted file mode 100644 index 44572cfb8..000000000 --- a/examples/ApiAppUpdate.rb +++ /dev/null @@ -1,32 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api_app_api = Dropbox::Sign::ApiAppApi.new - -white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new -white_labeling_options.primary_button_color = "#00b3e6" -white_labeling_options.primary_button_text_color = "#ffffff" - -custom_logo_file = File.new('./CustomLogoFile.png') - -data = Dropbox::Sign::ApiAppUpdateRequest.new -data.name = "New Name" -data.callback_url = "http://example.com/dropboxsign" -data.white_labeling_options = white_labeling_options -data.custom_logo_file = custom_logo_file - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - -begin - result = api_app_api.api_app_update(client_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ApiAppUpdate.sh b/examples/ApiAppUpdate.sh deleted file mode 100644 index 99a6b5f40..000000000 --- a/examples/ApiAppUpdate.sh +++ /dev/null @@ -1,6 +0,0 @@ -curl -X PUT 'https://api.hellosign.com/v3/api_app/{client_id}' \ - -u 'YOUR_API_KEY:' \ - -F 'name=New Name' \ - -F 'callback_url=http://example.com/dropboxsign' \ - -F 'white_labeling_options[primary_button_color]=#00b3e6' \ - -F 'white_labeling_options[primary_button_text_color]=#ffffff' diff --git a/examples/ApiAppUpdate.ts b/examples/ApiAppUpdate.ts deleted file mode 100644 index fdbc25559..000000000 --- a/examples/ApiAppUpdate.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppUpdateRequest = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, -}; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ApiAppUpdateExample.cs b/examples/ApiAppUpdateExample.cs new file mode 100644 index 000000000..3eb03a1bf --- /dev/null +++ b/examples/ApiAppUpdateExample.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var oauth = new SubOAuth( + callbackUrl: "https://example.com/oauth", + scopes: [ + SubOAuth.ScopesEnum.BasicAccountInfo, + SubOAuth.ScopesEnum.RequestSignature, + ] + ); + + var whiteLabelingOptions = new SubWhiteLabelingOptions( + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff" + ); + + var apiAppUpdateRequest = new ApiAppUpdateRequest( + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions + ); + + try + { + var response = new ApiAppApi(config).ApiAppUpdate( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9", + apiAppUpdateRequest: apiAppUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ApiAppUpdateExample.java b/examples/ApiAppUpdateExample.java new file mode 100644 index 000000000..ee6290b5e --- /dev/null +++ b/examples/ApiAppUpdateExample.java @@ -0,0 +1,63 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppUpdateRequest = new ApiAppUpdateRequest(); + apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); + apiAppUpdateRequest.name("New Name"); + apiAppUpdateRequest.domains(List.of ( + "example.com" + )); + apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppUpdateRequest.oauth(oauth); + apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); + 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/ApiAppUpdateExample.php b/examples/ApiAppUpdateExample.php new file mode 100644 index 000000000..30c22c4eb --- /dev/null +++ b/examples/ApiAppUpdateExample.php @@ -0,0 +1,44 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_update_request = (new Dropbox\Sign\Model\ApiAppUpdateRequest()) + ->setCallbackUrl("https://example.com/dropboxsign") + ->setName("New Name") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppUpdate( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request: $api_app_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppUpdate: {$e->getMessage()}"; +} diff --git a/examples/ApiAppUpdateExample.py b/examples/ApiAppUpdateExample.py new file mode 100644 index 000000000..00212198f --- /dev/null +++ b/examples/ApiAppUpdateExample.py @@ -0,0 +1,45 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=[ + "basic_account_info", + "request_signature", + ], + ) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + api_app_update_request = models.ApiAppUpdateRequest( + callback_url="https://example.com/dropboxsign", + name="New Name", + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), + oauth=oauth, + white_labeling_options=white_labeling_options, + ) + + try: + response = api.ApiAppApi(api_client).api_app_update( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request=api_app_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_update: %s\n" % e) diff --git a/examples/ApiAppUpdateExample.rb b/examples/ApiAppUpdateExample.rb new file mode 100644 index 000000000..e973b3520 --- /dev/null +++ b/examples/ApiAppUpdateExample.rb @@ -0,0 +1,39 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +oauth = Dropbox::Sign::SubOAuth.new +oauth.callback_url = "https://example.com/oauth" +oauth.scopes = [ + "basic_account_info", + "request_signature", +] + +white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new +white_labeling_options.primary_button_color = "#00b3e6" +white_labeling_options.primary_button_text_color = "#ffffff" + +api_app_update_request = Dropbox::Sign::ApiAppUpdateRequest.new +api_app_update_request.callback_url = "https://example.com/dropboxsign" +api_app_update_request.name = "New Name" +api_app_update_request.domains = [ + "example.com", +] +api_app_update_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_update_request.oauth = oauth +api_app_update_request.white_labeling_options = white_labeling_options + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_update( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + api_app_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_update: #{e}" +end diff --git a/examples/ApiAppUpdateExample.sh b/examples/ApiAppUpdateExample.sh new file mode 100644 index 000000000..f8e22a9c8 --- /dev/null +++ b/examples/ApiAppUpdateExample.sh @@ -0,0 +1,6 @@ +curl -X PUT 'https://api.hellosign.com/v3/api_app/{client_id}' \ + -u 'YOUR_API_KEY:' \ + -F 'name=New Name' \ + -F 'callback_url=https://example.com/dropboxsign' \ + -F 'white_labeling_options[primary_button_color]=#00b3e6' \ + -F 'white_labeling_options[primary_button_text_color]=#ffffff' diff --git a/examples/ApiAppUpdateExample.ts b/examples/ApiAppUpdateExample.ts new file mode 100644 index 000000000..0331942c0 --- /dev/null +++ b/examples/ApiAppUpdateExample.ts @@ -0,0 +1,41 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppUpdateRequest: models.ApiAppUpdateRequest = { + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppUpdate:"); + console.log(error.body); +}); diff --git a/examples/BulkSendJobGet.cs b/examples/BulkSendJobGet.cs deleted file mode 100644 index 42a805c58..000000000 --- a/examples/BulkSendJobGet.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var bulkSendJobApi = new BulkSendJobApi(config); - - var bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - - try - { - var result = bulkSendJobApi.BulkSendJobGet(bulkSendJobId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/BulkSendJobGet.java b/examples/BulkSendJobGet.java deleted file mode 100644 index d79a46164..000000000 --- a/examples/BulkSendJobGet.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - - try { - BulkSendJobGetResponse result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); - 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/BulkSendJobGet.js b/examples/BulkSendJobGet.js deleted file mode 100644 index 7a1f5e043..000000000 --- a/examples/BulkSendJobGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobGet.php b/examples/BulkSendJobGet.php deleted file mode 100644 index 3b93304ce..000000000 --- a/examples/BulkSendJobGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -try { - $result = $bulkSendJobApi->bulkSendJobGet($bulkSendJobId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/BulkSendJobGet.py b/examples/BulkSendJobGet.py deleted file mode 100644 index ed92e9751..000000000 --- a/examples/BulkSendJobGet.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - - try: - response = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/BulkSendJobGet.rb b/examples/BulkSendJobGet.rb deleted file mode 100644 index 8ef33b282..000000000 --- a/examples/BulkSendJobGet.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -bulk_send_job_api = Dropbox::Sign::BulkSendJobApi.new - -bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - -begin - result = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/BulkSendJobGet.ts b/examples/BulkSendJobGet.ts deleted file mode 100644 index 7a1f5e043..000000000 --- a/examples/BulkSendJobGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobGetExample.cs b/examples/BulkSendJobGetExample.cs new file mode 100644 index 000000000..baa383c93 --- /dev/null +++ b/examples/BulkSendJobGetExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class BulkSendJobGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new BulkSendJobApi(config).BulkSendJobGet( + bulkSendJobId: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/BulkSendJobGetExample.java b/examples/BulkSendJobGetExample.java new file mode 100644 index 000000000..da4680b15 --- /dev/null +++ b/examples/BulkSendJobGetExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); + 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/BulkSendJobGetExample.php b/examples/BulkSendJobGetExample.php new file mode 100644 index 000000000..8b74043d9 --- /dev/null +++ b/examples/BulkSendJobGetExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobGet( + bulk_send_job_id: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobGet: {$e->getMessage()}"; +} diff --git a/examples/BulkSendJobGetExample.py b/examples/BulkSendJobGetExample.py new file mode 100644 index 000000000..58b865737 --- /dev/null +++ b/examples/BulkSendJobGetExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.BulkSendJobApi(api_client).bulk_send_job_get( + bulk_send_job_id="6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling BulkSendJobApi#bulk_send_job_get: %s\n" % e) diff --git a/examples/BulkSendJobGetExample.rb b/examples/BulkSendJobGetExample.rb new file mode 100644 index 000000000..bf4b58570 --- /dev/null +++ b/examples/BulkSendJobGetExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_get( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", # bulk_send_job_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling BulkSendJobApi#bulk_send_job_get: #{e}" +end diff --git a/examples/BulkSendJobGet.sh b/examples/BulkSendJobGetExample.sh similarity index 100% rename from examples/BulkSendJobGet.sh rename to examples/BulkSendJobGetExample.sh diff --git a/examples/BulkSendJobGetExample.ts b/examples/BulkSendJobGetExample.ts new file mode 100644 index 000000000..9c3e43eb9 --- /dev/null +++ b/examples/BulkSendJobGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); + console.log(error.body); +}); diff --git a/examples/BulkSendJobList.cs b/examples/BulkSendJobList.cs deleted file mode 100644 index 4bdbb0b59..000000000 --- a/examples/BulkSendJobList.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var bulkSendJobApi = new BulkSendJobApi(config); - - var page = 1; - var pageSize = 20; - - try - { - var result = bulkSendJobApi.BulkSendJobList(page, pageSize); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/BulkSendJobList.java b/examples/BulkSendJobList.java deleted file mode 100644 index 866f3352c..000000000 --- a/examples/BulkSendJobList.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var page = 1; - var pageSize = 20; - - try { - BulkSendJobListResponse result = bulkSendJobApi.bulkSendJobList(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/BulkSendJobList.js b/examples/BulkSendJobList.js deleted file mode 100644 index ceb35707d..000000000 --- a/examples/BulkSendJobList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobList.php b/examples/BulkSendJobList.php deleted file mode 100644 index 9e6639af1..000000000 --- a/examples/BulkSendJobList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$page = 1; -$pageSize = 20; - -try { - $result = $bulkSendJobApi->bulkSendJobList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/BulkSendJobList.py b/examples/BulkSendJobList.py deleted file mode 100644 index 61bf5117f..000000000 --- a/examples/BulkSendJobList.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - page = 1 - page_size = 20 - - try: - response = bulk_send_job_api.bulk_send_job_list( - page=page, - page_size=page_size, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/BulkSendJobList.rb b/examples/BulkSendJobList.rb deleted file mode 100644 index cb64c5df5..000000000 --- a/examples/BulkSendJobList.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -bulk_send_job_api = Dropbox::Sign::BulkSendJobApi.new - -page = 1 -page_size = 20 - -begin - result = bulk_send_job_api.bulk_send_job_list({ page: page, page_size: page_size }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/BulkSendJobList.ts b/examples/BulkSendJobList.ts deleted file mode 100644 index ceb35707d..000000000 --- a/examples/BulkSendJobList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/BulkSendJobListExample.cs b/examples/BulkSendJobListExample.cs new file mode 100644 index 000000000..d84e42e04 --- /dev/null +++ b/examples/BulkSendJobListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class BulkSendJobListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new BulkSendJobApi(config).BulkSendJobList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/BulkSendJobListExample.java b/examples/BulkSendJobListExample.java new file mode 100644 index 000000000..9c9b835e5 --- /dev/null +++ b/examples/BulkSendJobListExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); + 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/BulkSendJobListExample.php b/examples/BulkSendJobListExample.php new file mode 100644 index 000000000..9a566d561 --- /dev/null +++ b/examples/BulkSendJobListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobList: {$e->getMessage()}"; +} diff --git a/examples/BulkSendJobListExample.py b/examples/BulkSendJobListExample.py new file mode 100644 index 000000000..cb688f24d --- /dev/null +++ b/examples/BulkSendJobListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.BulkSendJobApi(api_client).bulk_send_job_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling BulkSendJobApi#bulk_send_job_list: %s\n" % e) diff --git a/examples/BulkSendJobListExample.rb b/examples/BulkSendJobListExample.rb new file mode 100644 index 000000000..60e8c1b50 --- /dev/null +++ b/examples/BulkSendJobListExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling BulkSendJobApi#bulk_send_job_list: #{e}" +end diff --git a/examples/BulkSendJobList.sh b/examples/BulkSendJobListExample.sh similarity index 100% rename from examples/BulkSendJobList.sh rename to examples/BulkSendJobListExample.sh diff --git a/examples/BulkSendJobListExample.ts b/examples/BulkSendJobListExample.ts new file mode 100644 index 000000000..4f8b1b33b --- /dev/null +++ b/examples/BulkSendJobListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobList:"); + console.log(error.body); +}); diff --git a/examples/EmbeddedEditUrl.cs b/examples/EmbeddedEditUrl.cs deleted file mode 100644 index 87479129f..000000000 --- a/examples/EmbeddedEditUrl.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var embeddedApi = new EmbeddedApi(config); - - var data = new EmbeddedEditUrlRequest( - ccRoles: new List(){""}, - mergeFields: new List() - ); - - var templateId = "5de8179668f2033afac48da1868d0093bf133266"; - - try - { - var result = embeddedApi.EmbeddedEditUrl(templateId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/EmbeddedEditUrl.java b/examples/EmbeddedEditUrl.java deleted file mode 100644 index 65a52a96a..000000000 --- a/examples/EmbeddedEditUrl.java +++ /dev/null @@ -1,39 +0,0 @@ -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 Main { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var data = new EmbeddedEditUrlRequest() - .ccRoles(List.of("")) - .mergeFields(List.of()); - - var templateId = "5de8179668f2033afac48da1868d0093bf133266"; - - try { - EmbeddedEditUrlResponse result = embeddedApi.embeddedEditUrl(templateId, data); - 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/EmbeddedEditUrl.js b/examples/EmbeddedEditUrl.js deleted file mode 100644 index a3fab55d9..000000000 --- a/examples/EmbeddedEditUrl.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedEditUrl.php b/examples/EmbeddedEditUrl.php deleted file mode 100644 index 452afd315..000000000 --- a/examples/EmbeddedEditUrl.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$data = new Dropbox\Sign\Model\EmbeddedEditUrlRequest(); -$data->setCcRoles([""]) - ->setMergeFields([]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $embeddedApi->embeddedEditUrl($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/EmbeddedEditUrl.py b/examples/EmbeddedEditUrl.py deleted file mode 100644 index dd657233d..000000000 --- a/examples/EmbeddedEditUrl.py +++ /dev/null @@ -1,26 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) - - data = models.EmbeddedEditUrlRequest( - cc_roles=[""], - merge_fields=[], - ) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = embedded_api.embedded_edit_url(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/EmbeddedEditUrl.rb b/examples/EmbeddedEditUrl.rb deleted file mode 100644 index 0eef4c2cf..000000000 --- a/examples/EmbeddedEditUrl.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api = Dropbox::Sign::EmbeddedApi.new - -data = Dropbox::Sign::EmbeddedEditUrlRequest.new -data.cc_roles = [""] -data.merge_fields = [] - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - result = embedded_api.embedded_edit_url(template_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/EmbeddedEditUrl.ts b/examples/EmbeddedEditUrl.ts deleted file mode 100644 index c6c93c259..000000000 --- a/examples/EmbeddedEditUrl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.EmbeddedEditUrlRequest = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedEditUrlExample.cs b/examples/EmbeddedEditUrlExample.cs new file mode 100644 index 000000000..f951e1751 --- /dev/null +++ b/examples/EmbeddedEditUrlExample.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class EmbeddedEditUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var mergeFields = new List(); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest( + ccRoles: [ + "", + ], + mergeFields: mergeFields + ); + + try + { + var response = new EmbeddedApi(config).EmbeddedEditUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + embeddedEditUrlRequest: embeddedEditUrlRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedEditUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/EmbeddedEditUrlExample.java b/examples/EmbeddedEditUrlExample.java new file mode 100644 index 000000000..a1097bd5c --- /dev/null +++ b/examples/EmbeddedEditUrlExample.java @@ -0,0 +1,50 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedEditUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var mergeFields = new ArrayList(List.of ()); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); + embeddedEditUrlRequest.ccRoles(List.of ( + "" + )); + embeddedEditUrlRequest.mergeFields(mergeFields); + + try + { + var response = new EmbeddedApi(config).embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); + 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/EmbeddedEditUrlExample.php b/examples/EmbeddedEditUrlExample.php new file mode 100644 index 000000000..cae4929eb --- /dev/null +++ b/examples/EmbeddedEditUrlExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$merge_fields = [ +]; + +$embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) + ->setCcRoles([ + "", + ]) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request: $embedded_edit_url_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$e->getMessage()}"; +} diff --git a/examples/EmbeddedEditUrlExample.py b/examples/EmbeddedEditUrlExample.py new file mode 100644 index 000000000..0c8577780 --- /dev/null +++ b/examples/EmbeddedEditUrlExample.py @@ -0,0 +1,31 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + merge_fields = [ + ] + + embedded_edit_url_request = models.EmbeddedEditUrlRequest( + cc_roles=[ + "", + ], + merge_fields=merge_fields, + ) + + try: + response = api.EmbeddedApi(api_client).embedded_edit_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request=embedded_edit_url_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling EmbeddedApi#embedded_edit_url: %s\n" % e) diff --git a/examples/EmbeddedEditUrlExample.rb b/examples/EmbeddedEditUrlExample.rb new file mode 100644 index 000000000..8c110f69d --- /dev/null +++ b/examples/EmbeddedEditUrlExample.rb @@ -0,0 +1,27 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +merge_fields = [ +] + +embedded_edit_url_request = Dropbox::Sign::EmbeddedEditUrlRequest.new +embedded_edit_url_request.cc_roles = [ + "", +] +embedded_edit_url_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::EmbeddedApi.new.embedded_edit_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + embedded_edit_url_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling EmbeddedApi#embedded_edit_url: #{e}" +end diff --git a/examples/EmbeddedEditUrl.sh b/examples/EmbeddedEditUrlExample.sh similarity index 100% rename from examples/EmbeddedEditUrl.sh rename to examples/EmbeddedEditUrlExample.sh diff --git a/examples/EmbeddedEditUrlExample.ts b/examples/EmbeddedEditUrlExample.ts new file mode 100644 index 000000000..cdfa90b80 --- /dev/null +++ b/examples/EmbeddedEditUrlExample.ts @@ -0,0 +1,27 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const mergeFields = [ +]; + +const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { + ccRoles: [ + "", + ], + mergeFields: mergeFields, +}; + +apiCaller.embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); + console.log(error.body); +}); diff --git a/examples/EmbeddedSignUrl.cs b/examples/EmbeddedSignUrl.cs deleted file mode 100644 index d8197bfeb..000000000 --- a/examples/EmbeddedSignUrl.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var embeddedApi = new EmbeddedApi(config); - - var signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - - try - { - var result = embeddedApi.EmbeddedSignUrl(signatureId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/EmbeddedSignUrl.java b/examples/EmbeddedSignUrl.java deleted file mode 100644 index 2ab5869ea..000000000 --- a/examples/EmbeddedSignUrl.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - - try { - EmbeddedSignUrlResponse result = embeddedApi.embeddedSignUrl(signatureId); - 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/EmbeddedSignUrl.js b/examples/EmbeddedSignUrl.js deleted file mode 100644 index e69bca023..000000000 --- a/examples/EmbeddedSignUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedSignUrl.php b/examples/EmbeddedSignUrl.php deleted file mode 100644 index 7b838a164..000000000 --- a/examples/EmbeddedSignUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -try { - $result = $embeddedApi->embeddedSignUrl($signatureId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/EmbeddedSignUrl.py b/examples/EmbeddedSignUrl.py deleted file mode 100644 index 64d5c20e1..000000000 --- a/examples/EmbeddedSignUrl.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) - - signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - - try: - response = embedded_api.embedded_sign_url(signature_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/EmbeddedSignUrl.rb b/examples/EmbeddedSignUrl.rb deleted file mode 100644 index e23571a5c..000000000 --- a/examples/EmbeddedSignUrl.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -api = Dropbox::Sign::EmbeddedApi.new - -signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - -begin - result = embedded_api.embedded_sign_url(signature_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/EmbeddedSignUrl.ts b/examples/EmbeddedSignUrl.ts deleted file mode 100644 index e69bca023..000000000 --- a/examples/EmbeddedSignUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/EmbeddedSignUrlExample.cs b/examples/EmbeddedSignUrlExample.cs new file mode 100644 index 000000000..a800f0b04 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class EmbeddedSignUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new EmbeddedApi(config).EmbeddedSignUrl( + signatureId: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedSignUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/EmbeddedSignUrlExample.java b/examples/EmbeddedSignUrlExample.java new file mode 100644 index 000000000..45b7f5040 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedSignUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new EmbeddedApi(config).embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); + 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/EmbeddedSignUrlExample.php b/examples/EmbeddedSignUrlExample.php new file mode 100644 index 000000000..b055ac6ed --- /dev/null +++ b/examples/EmbeddedSignUrlExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( + signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$e->getMessage()}"; +} diff --git a/examples/EmbeddedSignUrlExample.py b/examples/EmbeddedSignUrlExample.py new file mode 100644 index 000000000..903945d90 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.EmbeddedApi(api_client).embedded_sign_url( + signature_id="50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling EmbeddedApi#embedded_sign_url: %s\n" % e) diff --git a/examples/EmbeddedSignUrlExample.rb b/examples/EmbeddedSignUrlExample.rb new file mode 100644 index 000000000..dd08e5a6f --- /dev/null +++ b/examples/EmbeddedSignUrlExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::EmbeddedApi.new.embedded_sign_url( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", # signature_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling EmbeddedApi#embedded_sign_url: #{e}" +end diff --git a/examples/EmbeddedSignUrl.sh b/examples/EmbeddedSignUrlExample.sh similarity index 100% rename from examples/EmbeddedSignUrl.sh rename to examples/EmbeddedSignUrlExample.sh diff --git a/examples/EmbeddedSignUrlExample.ts b/examples/EmbeddedSignUrlExample.ts new file mode 100644 index 000000000..ec7da0536 --- /dev/null +++ b/examples/EmbeddedSignUrlExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); + console.log(error.body); +}); diff --git a/examples/EventCallback.cs b/examples/EventCallback.cs deleted file mode 100644 index bc287ff43..000000000 --- a/examples/EventCallback.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Newtonsoft.Json; -using Dropbox.Sign.Model; -using Dropbox.Sign; - -public class Example -{ - public static void Main() - { - // use your API key - var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; - - // callbackData represents data we send to you - var callbackData = new Dictionary() - { - ["event"] = new Dictionary() - { - ["event_type"] = "account_confirmed", - ["event_time"] = "1669926463", - ["event_hash"] = "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", - ["event_metadata"] = new Dictionary() - { - ["related_signature_id"] = null, - ["reported_for_account_id"] = "6421d70b9bd45059fa207d03ab8d1b96515b472c", - ["reported_for_app_id"] = null, - ["event_message"] = null, - } - } - }; - - var callbackEvent = EventCallbackRequest.Init(JsonConvert.SerializeObject(callbackData)); - - // verify that a callback came from HelloSign.com - if (EventCallbackHelper.IsValid(apiKey, callbackEvent)) - { - // one of "account_callback" or "api_app_callback" - var callbackType = EventCallbackHelper.GetCallbackType(callbackEvent); - - // do your magic below! - } - } -} diff --git a/examples/EventCallback.java b/examples/EventCallback.java deleted file mode 100644 index d712408f1..000000000 --- a/examples/EventCallback.java +++ /dev/null @@ -1,39 +0,0 @@ -import com.dropbox.sign.EventCallbackHelper; -import com.dropbox.sign.model.EventCallbackRequest; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.util.HashMap; - -public class Example { - public static void main(String[] args) throws Exception { - // use your API key - var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; - - // callbackData represents data we send to you - var callbackData = new HashMap<>() {{ - put("event", new HashMap<>() {{ - put("event_type", "account_confirmed"); - put("event_time", "1669926463"); - put("event_hash", "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f"); - put("event_metadata", new HashMap<>() {{ - put("related_signature_id", null); - put("reported_for_account_id", "6421d70b9bd45059fa207d03ab8d1b96515b472c"); - put("reported_for_app_id", null); - put("event_message", null); - }}); - }}); - }}; - - var callbackEvent = EventCallbackRequest.init( - new ObjectMapper().writeValueAsString(callbackData) - ); - - // verify that a callback came from HelloSign.com - if (EventCallbackHelper.isValid(apiKey, callbackEvent)) { - // one of "account_callback" or "api_app_callback" - var callbackType = EventCallbackHelper.getCallbackType(callbackEvent); - - // do your magic below! - } - } -} diff --git a/examples/EventCallback.php b/examples/EventCallback.php deleted file mode 100644 index 68ce6540f..000000000 --- a/examples/EventCallback.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - "event_type" => "account_confirmed", - "event_time" => "1669926463", - "event_hash" => "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", - "event_metadata" => [ - "related_signature_id" => null, - "reported_for_account_id" => "6421d70b9bd45059fa207d03ab8d1b96515b472c", - "reported_for_app_id" => null, - "event_message" => null, - ], - ], -]; - -$callback_event = Dropbox\Sign\Model\EventCallbackRequest::init($callback_data); - -// verify that a callback came from HelloSign.com -if (Dropbox\Sign\EventCallbackHelper::isValid($api_key, $callback_event)) { - // one of "account_callback" or "api_app_callback" - $callback_type = Dropbox\Sign\EventCallbackHelper::getCallbackType($callback_event); - - // do your magic below! -} diff --git a/examples/EventCallbackExample.cs b/examples/EventCallbackExample.cs new file mode 100644 index 000000000..c8610a8fe --- /dev/null +++ b/examples/EventCallbackExample.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using Newtonsoft.Json; +using Dropbox.Sign.Model; +using Dropbox.Sign; + +namespace Dropbox.SignSandbox; + +public class EventCallbackExample +{ + public static void Run() + { + // use your API key + var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; + + // callbackData represents data we send to you + var callbackData = new Dictionary() + { + ["event"] = new Dictionary() + { + ["event_type"] = "account_confirmed", + ["event_time"] = "1669926463", + ["event_hash"] = "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + ["event_metadata"] = new Dictionary() + { + ["related_signature_id"] = null, + ["reported_for_account_id"] = "6421d70b9bd45059fa207d03ab8d1b96515b472c", + ["reported_for_app_id"] = null, + ["event_message"] = null, + } + } + }; + + var callbackEvent = EventCallbackRequest.Init(JsonConvert.SerializeObject(callbackData)); + + // verify that a callback came from HelloSign.com + if (EventCallbackHelper.IsValid(apiKey, callbackEvent)) + { + // one of "account_callback" or "api_app_callback" + var callbackType = EventCallbackHelper.GetCallbackType(callbackEvent); + + // do your magic below! + } + } +} diff --git a/examples/EventCallbackExample.java b/examples/EventCallbackExample.java new file mode 100644 index 000000000..37d245133 --- /dev/null +++ b/examples/EventCallbackExample.java @@ -0,0 +1,39 @@ +import com.dropbox.sign.EventCallbackHelper; +import com.dropbox.sign.model.EventCallbackRequest; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.HashMap; + +public class EventCallbackExample { + public static void main(String[] args) throws Exception { + // use your API key + var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; + + // callbackData represents data we send to you + var callbackData = new HashMap<>() {{ + put("event", new HashMap<>() {{ + put("event_type", "account_confirmed"); + put("event_time", "1669926463"); + put("event_hash", "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f"); + put("event_metadata", new HashMap<>() {{ + put("related_signature_id", null); + put("reported_for_account_id", "6421d70b9bd45059fa207d03ab8d1b96515b472c"); + put("reported_for_app_id", null); + put("event_message", null); + }}); + }}); + }}; + + var callbackEvent = EventCallbackRequest.init( + new ObjectMapper().writeValueAsString(callbackData) + ); + + // verify that a callback came from HelloSign.com + if (EventCallbackHelper.isValid(apiKey, callbackEvent)) { + // one of "account_callback" or "api_app_callback" + var callbackType = EventCallbackHelper.getCallbackType(callbackEvent); + + // do your magic below! + } + } +} diff --git a/examples/EventCallbackExample.php b/examples/EventCallbackExample.php new file mode 100644 index 000000000..4a21d5cbf --- /dev/null +++ b/examples/EventCallbackExample.php @@ -0,0 +1,35 @@ + [ + "event_type" => "account_confirmed", + "event_time" => "1669926463", + "event_hash" => "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + "event_metadata" => [ + "related_signature_id" => null, + "reported_for_account_id" => "6421d70b9bd45059fa207d03ab8d1b96515b472c", + "reported_for_app_id" => null, + "event_message" => null, + ], + ], +]; + +$callback_event = Dropbox\Sign\Model\EventCallbackRequest::init($callback_data); + +// verify that a callback came from HelloSign.com +if (Dropbox\Sign\EventCallbackHelper::isValid($api_key, $callback_event)) { + // one of "account_callback" or "api_app_callback" + $callback_type = Dropbox\Sign\EventCallbackHelper::getCallbackType($callback_event); + + // do your magic below! +} diff --git a/examples/EventCallback.py b/examples/EventCallbackExample.py similarity index 100% rename from examples/EventCallback.py rename to examples/EventCallbackExample.py diff --git a/examples/EventCallback.rb b/examples/EventCallbackExample.rb similarity index 100% rename from examples/EventCallback.rb rename to examples/EventCallbackExample.rb diff --git a/examples/EventCallback.js b/examples/EventCallbackExample.ts similarity index 100% rename from examples/EventCallback.js rename to examples/EventCallbackExample.ts diff --git a/examples/FaxDelete.cs b/examples/FaxDelete.cs deleted file mode 100644 index 88a6ed074..000000000 --- a/examples/FaxDelete.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxApi = new FaxApi(config); - - try - { - faxApi.FaxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxDelete.java b/examples/FaxDelete.java deleted file mode 100644 index 794b74d94..000000000 --- a/examples/FaxDelete.java +++ /dev/null @@ -1,25 +0,0 @@ -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/FaxDelete.js b/examples/FaxDelete.js deleted file mode 100644 index 38492bd21..000000000 --- a/examples/FaxDelete.js +++ /dev/null @@ -1,13 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxDelete.php b/examples/FaxDelete.php deleted file mode 100644 index a5c62f5e9..000000000 --- a/examples/FaxDelete.php +++ /dev/null @@ -1,18 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -try { - $faxApi->faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxDelete.py b/examples/FaxDelete.py deleted file mode 100644 index adf2a5da8..000000000 --- a/examples/FaxDelete.py +++ /dev/null @@ -1,16 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - try: - fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxDelete.rb b/examples/FaxDelete.rb deleted file mode 100644 index f68be3440..000000000 --- a/examples/FaxDelete.rb +++ /dev/null @@ -1,14 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_api = Dropbox::Sign::FaxApi.new - -begin - fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxDelete.ts b/examples/FaxDelete.ts deleted file mode 100644 index 38492bd21..000000000 --- a/examples/FaxDelete.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxDeleteExample.cs b/examples/FaxDeleteExample.cs new file mode 100644 index 000000000..aa39f496d --- /dev/null +++ b/examples/FaxDeleteExample.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + new FaxApi(config).FaxDelete( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxDeleteExample.java b/examples/FaxDeleteExample.java new file mode 100644 index 000000000..f31f0ea99 --- /dev/null +++ b/examples/FaxDeleteExample.java @@ -0,0 +1,38 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new FaxApi(config).faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxDelete"); + 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/FaxDeleteExample.php b/examples/FaxDeleteExample.php new file mode 100644 index 000000000..96ba3c0d7 --- /dev/null +++ b/examples/FaxDeleteExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\FaxApi(config: $config))->faxDelete( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxDelete: {$e->getMessage()}"; +} diff --git a/examples/FaxDeleteExample.py b/examples/FaxDeleteExample.py new file mode 100644 index 000000000..76774d75b --- /dev/null +++ b/examples/FaxDeleteExample.py @@ -0,0 +1,17 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + api.FaxApi(api_client).fax_delete( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling FaxApi#fax_delete: %s\n" % e) diff --git a/examples/FaxDeleteExample.rb b/examples/FaxDeleteExample.rb new file mode 100644 index 000000000..6caa9d681 --- /dev/null +++ b/examples/FaxDeleteExample.rb @@ -0,0 +1,14 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + Dropbox::Sign::FaxApi.new.fax_delete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_delete: #{e}" +end diff --git a/examples/FaxDelete.sh b/examples/FaxDeleteExample.sh similarity index 100% rename from examples/FaxDelete.sh rename to examples/FaxDeleteExample.sh diff --git a/examples/FaxDeleteExample.ts b/examples/FaxDeleteExample.ts new file mode 100644 index 000000000..3afd7a63b --- /dev/null +++ b/examples/FaxDeleteExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).catch(error => { + console.log("Exception when calling FaxApi#faxDelete:"); + console.log(error.body); +}); diff --git a/examples/FaxFiles.cs b/examples/FaxFiles.cs deleted file mode 100644 index fbaf4166e..000000000 --- a/examples/FaxFiles.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxApi = new FaxApi(config); - - var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = faxApi.FaxFiles(faxId); - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); - fileStream.Close(); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxFiles.java b/examples/FaxFiles.java deleted file mode 100644 index bd6dcc5df..000000000 --- a/examples/FaxFiles.java +++ /dev/null @@ -1,28 +0,0 @@ -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/FaxFiles.js b/examples/FaxFiles.js deleted file mode 100644 index d7390cf60..000000000 --- a/examples/FaxFiles.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxFiles.php b/examples/FaxFiles.php deleted file mode 100644 index d543eea9c..000000000 --- a/examples/FaxFiles.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $faxApi->faxFiles($faxId); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxFiles.py b/examples/FaxFiles.py deleted file mode 100644 index 110a0f7b5..000000000 --- a/examples/FaxFiles.py +++ /dev/null @@ -1,19 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = fax_api.fax_files(fax_id) - open("file_response.pdf", "wb").write(response.read()) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxFiles.rb b/examples/FaxFiles.rb deleted file mode 100644 index 8f4955da8..000000000 --- a/examples/FaxFiles.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_api = Dropbox::Sign::FaxApi.new - -faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - file_bin = fax_api.fax_files(data) - FileUtils.cp(file_bin.path, "path/to/file.pdf") -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxFiles.ts b/examples/FaxFiles.ts deleted file mode 100644 index d7390cf60..000000000 --- a/examples/FaxFiles.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxFilesExample.cs b/examples/FaxFilesExample.cs new file mode 100644 index 000000000..278b90f8b --- /dev/null +++ b/examples/FaxFilesExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxFiles( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxFilesExample.java b/examples/FaxFilesExample.java new file mode 100644 index 000000000..a9e1f1728 --- /dev/null +++ b/examples/FaxFilesExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxFiles"); + 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/FaxFilesExample.php b/examples/FaxFilesExample.php new file mode 100644 index 000000000..01322d769 --- /dev/null +++ b/examples/FaxFilesExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxFiles( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxFiles: {$e->getMessage()}"; +} diff --git a/examples/FaxFilesExample.py b/examples/FaxFilesExample.py new file mode 100644 index 000000000..4bc18d604 --- /dev/null +++ b/examples/FaxFilesExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_files( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling FaxApi#fax_files: %s\n" % e) diff --git a/examples/FaxFilesExample.rb b/examples/FaxFilesExample.rb new file mode 100644 index 000000000..b44d604c4 --- /dev/null +++ b/examples/FaxFilesExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_files: #{e}" +end diff --git a/examples/FaxFiles.sh b/examples/FaxFilesExample.sh similarity index 100% rename from examples/FaxFiles.sh rename to examples/FaxFilesExample.sh diff --git a/examples/FaxFilesExample.ts b/examples/FaxFilesExample.ts new file mode 100644 index 000000000..d4360710d --- /dev/null +++ b/examples/FaxFilesExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxFiles:"); + console.log(error.body); +}); diff --git a/examples/FaxGet.cs b/examples/FaxGet.cs deleted file mode 100644 index 6396e0c34..000000000 --- a/examples/FaxGet.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - var faxApi = new FaxApi(config); - - var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = faxApi.FaxGet(faxId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxGet.java b/examples/FaxGet.java deleted file mode 100644 index a9cc433df..000000000 --- a/examples/FaxGet.java +++ /dev/null @@ -1,27 +0,0 @@ -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/FaxGet.js b/examples/FaxGet.js deleted file mode 100644 index 8a1dbbfda..000000000 --- a/examples/FaxGet.js +++ /dev/null @@ -1,16 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxGet.php b/examples/FaxGet.php deleted file mode 100644 index 43b7a1f3e..000000000 --- a/examples/FaxGet.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $faxApi->faxGet($faxId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxGet.py b/examples/FaxGet.py deleted file mode 100644 index c56656833..000000000 --- a/examples/FaxGet.py +++ /dev/null @@ -1,19 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = fax_api.fax_get(fax_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxGet.rb b/examples/FaxGet.rb deleted file mode 100644 index 64dc1c057..000000000 --- a/examples/FaxGet.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_api = Dropbox::Sign::FaxApi.new - -fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - result = fax_api.fax_get(fax_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxGet.ts b/examples/FaxGet.ts deleted file mode 100644 index 793f6e5d3..000000000 --- a/examples/FaxGet.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxGetExample.cs b/examples/FaxGetExample.cs new file mode 100644 index 000000000..8a15843d1 --- /dev/null +++ b/examples/FaxGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxGet( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxGetExample.java b/examples/FaxGetExample.java new file mode 100644 index 000000000..1500980aa --- /dev/null +++ b/examples/FaxGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxGet"); + 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/FaxGetExample.php b/examples/FaxGetExample.php new file mode 100644 index 000000000..50bb7c865 --- /dev/null +++ b/examples/FaxGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxGet( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxGet: {$e->getMessage()}"; +} diff --git a/examples/FaxGetExample.py b/examples/FaxGetExample.py new file mode 100644 index 000000000..e1288e656 --- /dev/null +++ b/examples/FaxGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_get( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_get: %s\n" % e) diff --git a/examples/FaxGetExample.rb b/examples/FaxGetExample.rb new file mode 100644 index 000000000..692ae1c99 --- /dev/null +++ b/examples/FaxGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_get: #{e}" +end diff --git a/examples/FaxGet.sh b/examples/FaxGetExample.sh similarity index 100% rename from examples/FaxGet.sh rename to examples/FaxGetExample.sh diff --git a/examples/FaxGetExample.ts b/examples/FaxGetExample.ts new file mode 100644 index 000000000..56a87dbe7 --- /dev/null +++ b/examples/FaxGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAddUser.cs b/examples/FaxLineAddUser.cs deleted file mode 100644 index de22f454f..000000000 --- a/examples/FaxLineAddUser.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineAddUserRequest( - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com" - ); - - try - { - var result = faxLineApi.FaxLineAddUser(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineAddUser.java b/examples/FaxLineAddUser.java deleted file mode 100644 index 34e455d5a..000000000 --- a/examples/FaxLineAddUser.java +++ /dev/null @@ -1,30 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineAddUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineAddUser(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/examples/FaxLineAddUser.js b/examples/FaxLineAddUser.js deleted file mode 100644 index 84e1e2c0e..000000000 --- a/examples/FaxLineAddUser.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAddUser.php b/examples/FaxLineAddUser.php deleted file mode 100644 index 8fb6c0fef..000000000 --- a/examples/FaxLineAddUser.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); -$data->setNumber("[FAX_NUMBER]") - ->setEmailAddress("member@dropboxsign.com"); - -try { - $result = $faxLineApi->faxLineAddUser($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineAddUser.py b/examples/FaxLineAddUser.py deleted file mode 100644 index cf5eceaab..000000000 --- a/examples/FaxLineAddUser.py +++ /dev/null @@ -1,22 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineAddUserRequest( - number="[FAX_NUMBER]", - email_address="member@dropboxsign.com", - ) - - try: - response = fax_line_api.fax_line_add_user(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineAddUser.rb b/examples/FaxLineAddUser.rb deleted file mode 100644 index 1ad855373..000000000 --- a/examples/FaxLineAddUser.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineAddUserRequest.new -data.number = "[FAX_NUMBER]" -data.email_address = "member@dropboxsign.com" - -begin - result = fax_line_api.fax_line_add_user(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineAddUser.ts b/examples/FaxLineAddUser.ts deleted file mode 100644 index e5d705e94..000000000 --- a/examples/FaxLineAddUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineAddUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAddUserExample.cs b/examples/FaxLineAddUserExample.cs new file mode 100644 index 000000000..cb9c642f7 --- /dev/null +++ b/examples/FaxLineAddUserExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineAddUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineAddUserRequest = new FaxLineAddUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var response = new FaxLineApi(config).FaxLineAddUser( + faxLineAddUserRequest: faxLineAddUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAddUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineAddUserExample.java b/examples/FaxLineAddUserExample.java new file mode 100644 index 000000000..d18bd73f6 --- /dev/null +++ b/examples/FaxLineAddUserExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineAddUserRequest = new FaxLineAddUserRequest(); + faxLineAddUserRequest.number("[FAX_NUMBER]"); + faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineAddUser( + faxLineAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); + 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/FaxLineAddUserExample.php b/examples/FaxLineAddUserExample.php new file mode 100644 index 000000000..cca56e766 --- /dev/null +++ b/examples/FaxLineAddUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_add_user_request = (new Dropbox\Sign\Model\FaxLineAddUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAddUser( + fax_line_add_user_request: $fax_line_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAddUser: {$e->getMessage()}"; +} diff --git a/examples/FaxLineAddUserExample.py b/examples/FaxLineAddUserExample.py new file mode 100644 index 000000000..255ac248b --- /dev/null +++ b/examples/FaxLineAddUserExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_add_user_request = models.FaxLineAddUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_add_user( + fax_line_add_user_request=fax_line_add_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_add_user: %s\n" % e) diff --git a/examples/FaxLineAddUserExample.rb b/examples/FaxLineAddUserExample.rb new file mode 100644 index 000000000..4d7f568bb --- /dev/null +++ b/examples/FaxLineAddUserExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_add_user_request = Dropbox::Sign::FaxLineAddUserRequest.new +fax_line_add_user_request.number = "[FAX_NUMBER]" +fax_line_add_user_request.email_address = "member@dropboxsign.com" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_add_user( + fax_line_add_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_add_user: #{e}" +end diff --git a/examples/FaxLineAddUser.sh b/examples/FaxLineAddUserExample.sh similarity index 100% rename from examples/FaxLineAddUser.sh rename to examples/FaxLineAddUserExample.sh diff --git a/examples/FaxLineAddUserExample.ts b/examples/FaxLineAddUserExample.ts new file mode 100644 index 000000000..07d056914 --- /dev/null +++ b/examples/FaxLineAddUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineAddUserRequest: models.FaxLineAddUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineAddUser( + faxLineAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAddUser:"); + console.log(error.body); +}); diff --git a/examples/FaxLineAreaCodeGet.cs b/examples/FaxLineAreaCodeGet.cs deleted file mode 100644 index 3beedfef1..000000000 --- a/examples/FaxLineAreaCodeGet.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - try - { - var result = faxLineApi.FaxLineAreaCodeGet("US", "CA"); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineAreaCodeGet.java b/examples/FaxLineAreaCodeGet.java deleted file mode 100644 index 1df071ab9..000000000 --- a/examples/FaxLineAreaCodeGet.java +++ /dev/null @@ -1,26 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); - 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/examples/FaxLineAreaCodeGet.js b/examples/FaxLineAreaCodeGet.js deleted file mode 100644 index bfc908f18..000000000 --- a/examples/FaxLineAreaCodeGet.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAreaCodeGet.php b/examples/FaxLineAreaCodeGet.php deleted file mode 100644 index c19f9e187..000000000 --- a/examples/FaxLineAreaCodeGet.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineAreaCodeGet.py b/examples/FaxLineAreaCodeGet.py deleted file mode 100644 index f001c0267..000000000 --- a/examples/FaxLineAreaCodeGet.py +++ /dev/null @@ -1,17 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_area_code_get("US", "CA") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineAreaCodeGet.rb b/examples/FaxLineAreaCodeGet.rb deleted file mode 100644 index 571fb4f58..000000000 --- a/examples/FaxLineAreaCodeGet.rb +++ /dev/null @@ -1,15 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -begin - result = fax_line_api.fax_line_area_code_get("US", "CA") - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineAreaCodeGet.ts b/examples/FaxLineAreaCodeGet.ts deleted file mode 100644 index bfc908f18..000000000 --- a/examples/FaxLineAreaCodeGet.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineAreaCodeGetExample.cs b/examples/FaxLineAreaCodeGetExample.cs new file mode 100644 index 000000000..403591924 --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineAreaCodeGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineAreaCodeGet( + country: "US" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAreaCodeGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineAreaCodeGetExample.java b/examples/FaxLineAreaCodeGetExample.java new file mode 100644 index 000000000..57d64b40b --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAreaCodeGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineAreaCodeGet( + "US", // country + null, // state + null, // province + null // city + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); + 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/FaxLineAreaCodeGetExample.php b/examples/FaxLineAreaCodeGetExample.php new file mode 100644 index 000000000..f8d4e717c --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( + country: "US", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; +} diff --git a/examples/FaxLineAreaCodeGetExample.py b/examples/FaxLineAreaCodeGetExample.py new file mode 100644 index 000000000..52310c75a --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_area_code_get( + country="US", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_area_code_get: %s\n" % e) diff --git a/examples/FaxLineAreaCodeGetExample.rb b/examples/FaxLineAreaCodeGetExample.rb new file mode 100644 index 000000000..75c3a3c3e --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_area_code_get( + "US", # country + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_area_code_get: #{e}" +end diff --git a/examples/FaxLineAreaCodeGet.sh b/examples/FaxLineAreaCodeGetExample.sh similarity index 100% rename from examples/FaxLineAreaCodeGet.sh rename to examples/FaxLineAreaCodeGetExample.sh diff --git a/examples/FaxLineAreaCodeGetExample.ts b/examples/FaxLineAreaCodeGetExample.ts new file mode 100644 index 000000000..0abb378b3 --- /dev/null +++ b/examples/FaxLineAreaCodeGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineAreaCodeGet( + "US", // country + undefined, // state + undefined, // province + undefined, // city +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineCreate.cs b/examples/FaxLineCreate.cs deleted file mode 100644 index 4d96ae5b0..000000000 --- a/examples/FaxLineCreate.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineCreateRequest( - areaCode: 209, - country: "US" - ); - - try - { - var result = faxLineApi.FaxLineCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineCreate.java b/examples/FaxLineCreate.java deleted file mode 100644 index fca101895..000000000 --- a/examples/FaxLineCreate.java +++ /dev/null @@ -1,30 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineCreateRequest() - .areaCode(209) - .country("US"); - - try { - FaxLineResponse result = faxLineApi.faxLineCreate(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/examples/FaxLineCreate.js b/examples/FaxLineCreate.js deleted file mode 100644 index c4ee72c59..000000000 --- a/examples/FaxLineCreate.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineCreate.php b/examples/FaxLineCreate.php deleted file mode 100644 index 27a0d2b8a..000000000 --- a/examples/FaxLineCreate.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); -$data->setAreaCode(209) - ->setCountry("US"); - -try { - $result = $faxLineApi->faxLineCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineCreate.py b/examples/FaxLineCreate.py deleted file mode 100644 index bcbd585ea..000000000 --- a/examples/FaxLineCreate.py +++ /dev/null @@ -1,22 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineCreateRequest( - area_code=209, - country="US", - ) - - try: - response = fax_line_api.fax_line_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineCreate.rb b/examples/FaxLineCreate.rb deleted file mode 100644 index 2619678ae..000000000 --- a/examples/FaxLineCreate.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineCreateRequest.new -data.area_code = 209 -data.country = "US" - -begin - result = fax_line_api.fax_line_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineCreate.ts b/examples/FaxLineCreate.ts deleted file mode 100644 index 6ceeb71da..000000000 --- a/examples/FaxLineCreate.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineCreateRequest = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineCreateExample.cs b/examples/FaxLineCreateExample.cs new file mode 100644 index 000000000..802ea4045 --- /dev/null +++ b/examples/FaxLineCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineCreateRequest = new FaxLineCreateRequest( + areaCode: 209, + country: FaxLineCreateRequest.CountryEnum.US + ); + + try + { + var response = new FaxLineApi(config).FaxLineCreate( + faxLineCreateRequest: faxLineCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineCreateExample.java b/examples/FaxLineCreateExample.java new file mode 100644 index 000000000..1c765fc97 --- /dev/null +++ b/examples/FaxLineCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineCreateRequest = new FaxLineCreateRequest(); + faxLineCreateRequest.areaCode(209); + faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); + + try + { + var response = new FaxLineApi(config).faxLineCreate( + faxLineCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineCreate"); + 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/FaxLineCreateExample.php b/examples/FaxLineCreateExample.php new file mode 100644 index 000000000..0a5ef5ec6 --- /dev/null +++ b/examples/FaxLineCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_create_request = (new Dropbox\Sign\Model\FaxLineCreateRequest()) + ->setAreaCode(209) + ->setCountry(Dropbox\Sign\Model\FaxLineCreateRequest::COUNTRY_US); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineCreate( + fax_line_create_request: $fax_line_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineCreate: {$e->getMessage()}"; +} diff --git a/examples/FaxLineCreateExample.py b/examples/FaxLineCreateExample.py new file mode 100644 index 000000000..3f7be1223 --- /dev/null +++ b/examples/FaxLineCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_create_request = models.FaxLineCreateRequest( + area_code=209, + country="US", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_create( + fax_line_create_request=fax_line_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_create: %s\n" % e) diff --git a/examples/FaxLineCreateExample.rb b/examples/FaxLineCreateExample.rb new file mode 100644 index 000000000..5342e5c31 --- /dev/null +++ b/examples/FaxLineCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_create_request = Dropbox::Sign::FaxLineCreateRequest.new +fax_line_create_request.area_code = 209 +fax_line_create_request.country = "US" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_create( + fax_line_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_create: #{e}" +end diff --git a/examples/FaxLineCreate.sh b/examples/FaxLineCreateExample.sh similarity index 100% rename from examples/FaxLineCreate.sh rename to examples/FaxLineCreateExample.sh diff --git a/examples/FaxLineCreateExample.ts b/examples/FaxLineCreateExample.ts new file mode 100644 index 000000000..5f1f5e2fd --- /dev/null +++ b/examples/FaxLineCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineCreateRequest: models.FaxLineCreateRequest = { + areaCode: 209, + country: models.FaxLineCreateRequest.CountryEnum.Us, +}; + +apiCaller.faxLineCreate( + faxLineCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineCreate:"); + console.log(error.body); +}); diff --git a/examples/FaxLineDelete.cs b/examples/FaxLineDelete.cs deleted file mode 100644 index 810e268a3..000000000 --- a/examples/FaxLineDelete.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineDeleteRequest( - number: "[FAX_NUMBER]" - ); - - try - { - faxLineApi.FaxLineDelete(data); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineDelete.java b/examples/FaxLineDelete.java deleted file mode 100644 index 6b989d287..000000000 --- a/examples/FaxLineDelete.java +++ /dev/null @@ -1,28 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineDeleteRequest() - .number("[FAX_NUMBER]"); - - try { - faxLineApi.faxLineDelete(data); - } 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/FaxLineDelete.js b/examples/FaxLineDelete.js deleted file mode 100644 index 1e8bdda7c..000000000 --- a/examples/FaxLineDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineDelete.php b/examples/FaxLineDelete.php deleted file mode 100644 index 8cc4ee01f..000000000 --- a/examples/FaxLineDelete.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); -$data->setNumber("[FAX_NUMBER]"); - -try { - $faxLineApi->faxLineDelete($data); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineDelete.py b/examples/FaxLineDelete.py deleted file mode 100644 index 060303934..000000000 --- a/examples/FaxLineDelete.py +++ /dev/null @@ -1,20 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineDeleteRequest( - number="[FAX_NUMBER]", - ) - - try: - fax_line_api.fax_line_delete(data) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineDelete.rb b/examples/FaxLineDelete.rb deleted file mode 100644 index 001cf6275..000000000 --- a/examples/FaxLineDelete.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineDeleteRequest.new -data.number = "[FAX_NUMBER]" - -begin - fax_line_api.fax_line_delete(data) -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineDelete.ts b/examples/FaxLineDelete.ts deleted file mode 100644 index 14efef4dc..000000000 --- a/examples/FaxLineDelete.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineDeleteRequest = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineDeleteExample.cs b/examples/FaxLineDeleteExample.cs new file mode 100644 index 000000000..42faed216 --- /dev/null +++ b/examples/FaxLineDeleteExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineDeleteRequest = new FaxLineDeleteRequest( + number: "[FAX_NUMBER]" + ); + + try + { + new FaxLineApi(config).FaxLineDelete( + faxLineDeleteRequest: faxLineDeleteRequest + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineDeleteExample.java b/examples/FaxLineDeleteExample.java new file mode 100644 index 000000000..8516f8f63 --- /dev/null +++ b/examples/FaxLineDeleteExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineDeleteRequest = new FaxLineDeleteRequest(); + faxLineDeleteRequest.number("[FAX_NUMBER]"); + + try + { + new FaxLineApi(config).faxLineDelete( + faxLineDeleteRequest + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineDelete"); + 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/FaxLineDeleteExample.php b/examples/FaxLineDeleteExample.php new file mode 100644 index 000000000..080db2960 --- /dev/null +++ b/examples/FaxLineDeleteExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_delete_request = (new Dropbox\Sign\Model\FaxLineDeleteRequest()) + ->setNumber("[FAX_NUMBER]"); + +try { + (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineDelete( + fax_line_delete_request: $fax_line_delete_request, + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineDelete: {$e->getMessage()}"; +} diff --git a/examples/FaxLineDeleteExample.py b/examples/FaxLineDeleteExample.py new file mode 100644 index 000000000..e5e7c23ea --- /dev/null +++ b/examples/FaxLineDeleteExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_delete_request = models.FaxLineDeleteRequest( + number="[FAX_NUMBER]", + ) + + try: + api.FaxLineApi(api_client).fax_line_delete( + fax_line_delete_request=fax_line_delete_request, + ) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_delete: %s\n" % e) diff --git a/examples/FaxLineDeleteExample.rb b/examples/FaxLineDeleteExample.rb new file mode 100644 index 000000000..c54da52b1 --- /dev/null +++ b/examples/FaxLineDeleteExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_delete_request = Dropbox::Sign::FaxLineDeleteRequest.new +fax_line_delete_request.number = "[FAX_NUMBER]" + +begin + Dropbox::Sign::FaxLineApi.new.fax_line_delete( + fax_line_delete_request, + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_delete: #{e}" +end diff --git a/examples/FaxLineDelete.sh b/examples/FaxLineDeleteExample.sh similarity index 100% rename from examples/FaxLineDelete.sh rename to examples/FaxLineDeleteExample.sh diff --git a/examples/FaxLineDeleteExample.ts b/examples/FaxLineDeleteExample.ts new file mode 100644 index 000000000..834fe8a96 --- /dev/null +++ b/examples/FaxLineDeleteExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineDeleteRequest: models.FaxLineDeleteRequest = { + number: "[FAX_NUMBER]", +}; + +apiCaller.faxLineDelete( + faxLineDeleteRequest, +).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineDelete:"); + console.log(error.body); +}); diff --git a/examples/FaxLineGet.cs b/examples/FaxLineGet.cs deleted file mode 100644 index d18c82fab..000000000 --- a/examples/FaxLineGet.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - try - { - var result = faxLineApi.FaxLineGet("[FAX_NUMBER]"); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineGet.java b/examples/FaxLineGet.java deleted file mode 100644 index 69281b342..000000000 --- a/examples/FaxLineGet.java +++ /dev/null @@ -1,26 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); - 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/examples/FaxLineGet.js b/examples/FaxLineGet.js deleted file mode 100644 index e9643abe9..000000000 --- a/examples/FaxLineGet.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineGet.php b/examples/FaxLineGet.php deleted file mode 100644 index 75dd77b5c..000000000 --- a/examples/FaxLineGet.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineGet.py b/examples/FaxLineGet.py deleted file mode 100644 index f550474fa..000000000 --- a/examples/FaxLineGet.py +++ /dev/null @@ -1,17 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_get("[FAX_NUMBER]") - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineGet.rb b/examples/FaxLineGet.rb deleted file mode 100644 index 090c2bdd8..000000000 --- a/examples/FaxLineGet.rb +++ /dev/null @@ -1,15 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -begin - result = fax_line_api.fax_line_get("[NUMBER]") - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineGet.ts b/examples/FaxLineGet.ts deleted file mode 100644 index e9643abe9..000000000 --- a/examples/FaxLineGet.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineGetExample.cs b/examples/FaxLineGetExample.cs new file mode 100644 index 000000000..690a65360 --- /dev/null +++ b/examples/FaxLineGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineGet( + number: "123-123-1234" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineGetExample.java b/examples/FaxLineGetExample.java new file mode 100644 index 000000000..5784253bb --- /dev/null +++ b/examples/FaxLineGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineGet( + "123-123-1234" // number + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineGet"); + 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/FaxLineGetExample.php b/examples/FaxLineGetExample.php new file mode 100644 index 000000000..70004942a --- /dev/null +++ b/examples/FaxLineGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineGet( + number: "123-123-1234", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineGet: {$e->getMessage()}"; +} diff --git a/examples/FaxLineGetExample.py b/examples/FaxLineGetExample.py new file mode 100644 index 000000000..56d2a204d --- /dev/null +++ b/examples/FaxLineGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_get( + number="123-123-1234", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_get: %s\n" % e) diff --git a/examples/FaxLineGetExample.rb b/examples/FaxLineGetExample.rb new file mode 100644 index 000000000..d4a749bd8 --- /dev/null +++ b/examples/FaxLineGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_get( + "123-123-1234", # number + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_get: #{e}" +end diff --git a/examples/FaxLineGet.sh b/examples/FaxLineGetExample.sh similarity index 100% rename from examples/FaxLineGet.sh rename to examples/FaxLineGetExample.sh diff --git a/examples/FaxLineGetExample.ts b/examples/FaxLineGetExample.ts new file mode 100644 index 000000000..e5ee2fd0f --- /dev/null +++ b/examples/FaxLineGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineGet( + "123-123-1234", // number +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineGet:"); + console.log(error.body); +}); diff --git a/examples/FaxLineList.cs b/examples/FaxLineList.cs deleted file mode 100644 index 96d7f0c28..000000000 --- a/examples/FaxLineList.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - try - { - var result = faxLineApi.FaxLineList(); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineList.java b/examples/FaxLineList.java deleted file mode 100644 index df1d0bd13..000000000 --- a/examples/FaxLineList.java +++ /dev/null @@ -1,26 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineListResponse result = faxLineApi.faxLineList(); - 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/examples/FaxLineList.js b/examples/FaxLineList.js deleted file mode 100644 index f40c60dfa..000000000 --- a/examples/FaxLineList.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineList.php b/examples/FaxLineList.php deleted file mode 100644 index 6056a2427..000000000 --- a/examples/FaxLineList.php +++ /dev/null @@ -1,19 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -try { - $result = $faxLineApi->faxLineList(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineList.py b/examples/FaxLineList.py deleted file mode 100644 index f868cd43c..000000000 --- a/examples/FaxLineList.py +++ /dev/null @@ -1,17 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - try: - response = fax_line_api.fax_line_list() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineList.rb b/examples/FaxLineList.rb deleted file mode 100644 index 23a0ec845..000000000 --- a/examples/FaxLineList.rb +++ /dev/null @@ -1,15 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -begin - result = fax_line_api.fax_line_list() - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineList.ts b/examples/FaxLineList.ts deleted file mode 100644 index f40c60dfa..000000000 --- a/examples/FaxLineList.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineListExample.cs b/examples/FaxLineListExample.cs new file mode 100644 index 000000000..278eeea74 --- /dev/null +++ b/examples/FaxLineListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineList( + accountId: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineListExample.java b/examples/FaxLineListExample.java new file mode 100644 index 000000000..0facd7cfe --- /dev/null +++ b/examples/FaxLineListExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + null // showTeamLines + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineList"); + 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/FaxLineListExample.php b/examples/FaxLineListExample.php new file mode 100644 index 000000000..c759934e9 --- /dev/null +++ b/examples/FaxLineListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineList( + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineList: {$e->getMessage()}"; +} diff --git a/examples/FaxLineListExample.py b/examples/FaxLineListExample.py new file mode 100644 index 000000000..5e3822e75 --- /dev/null +++ b/examples/FaxLineListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_list( + account_id="ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_list: %s\n" % e) diff --git a/examples/FaxLineListExample.rb b/examples/FaxLineListExample.rb new file mode 100644 index 000000000..0da5a39e4 --- /dev/null +++ b/examples/FaxLineListExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_list( + { + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + show_team_lines: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_list: #{e}" +end diff --git a/examples/FaxLineList.sh b/examples/FaxLineListExample.sh similarity index 100% rename from examples/FaxLineList.sh rename to examples/FaxLineListExample.sh diff --git a/examples/FaxLineListExample.ts b/examples/FaxLineListExample.ts new file mode 100644 index 000000000..aa547afce --- /dev/null +++ b/examples/FaxLineListExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + undefined, // showTeamLines +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineList:"); + console.log(error.body); +}); diff --git a/examples/FaxLineRemoveUser.cs b/examples/FaxLineRemoveUser.cs deleted file mode 100644 index 1dd562ed6..000000000 --- a/examples/FaxLineRemoveUser.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineRemoveUserRequest( - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com" - ); - - try - { - var result = faxLineApi.FaxLineRemoveUser(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxLineRemoveUser.java b/examples/FaxLineRemoveUser.java deleted file mode 100644 index 7864b05ab..000000000 --- a/examples/FaxLineRemoveUser.java +++ /dev/null @@ -1,30 +0,0 @@ -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 faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineRemoveUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineRemoveUser(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/examples/FaxLineRemoveUser.js b/examples/FaxLineRemoveUser.js deleted file mode 100644 index 64f247924..000000000 --- a/examples/FaxLineRemoveUser.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineRemoveUser.php b/examples/FaxLineRemoveUser.php deleted file mode 100644 index 60132fedc..000000000 --- a/examples/FaxLineRemoveUser.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); - -$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); -$data->setNumber("[FAX_NUMBER]") - ->setEmailAddress("member@dropboxsign.com"); - -try { - $result = $faxLineApi->faxLineRemoveUser($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxLineRemoveUser.py b/examples/FaxLineRemoveUser.py deleted file mode 100644 index d6929502b..000000000 --- a/examples/FaxLineRemoveUser.py +++ /dev/null @@ -1,22 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineRemoveUserRequest( - number="[FAX_NUMBER]", - email_address="member@dropboxsign.com", - ) - - try: - response = fax_line_api.fax_line_remove_user(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxLineRemoveUser.rb b/examples/FaxLineRemoveUser.rb deleted file mode 100644 index 98bb7a047..000000000 --- a/examples/FaxLineRemoveUser.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineRemoveUserRequest.new -data.number = "[FAX_NUMBER]" -data.email_address = "member@dropboxsign.com" - -begin - result = fax_line_api.fax_line_remove_user(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxLineRemoveUser.ts b/examples/FaxLineRemoveUser.ts deleted file mode 100644 index 91dc3066b..000000000 --- a/examples/FaxLineRemoveUser.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineRemoveUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxLineRemoveUserExample.cs b/examples/FaxLineRemoveUserExample.cs new file mode 100644 index 000000000..809b89a4e --- /dev/null +++ b/examples/FaxLineRemoveUserExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineRemoveUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var response = new FaxLineApi(config).FaxLineRemoveUser( + faxLineRemoveUserRequest: faxLineRemoveUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineRemoveUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxLineRemoveUserExample.java b/examples/FaxLineRemoveUserExample.java new file mode 100644 index 000000000..f815f362b --- /dev/null +++ b/examples/FaxLineRemoveUserExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); + faxLineRemoveUserRequest.number("[FAX_NUMBER]"); + faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineRemoveUser( + faxLineRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); + 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/FaxLineRemoveUserExample.php b/examples/FaxLineRemoveUserExample.php new file mode 100644 index 000000000..95d117971 --- /dev/null +++ b/examples/FaxLineRemoveUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_remove_user_request = (new Dropbox\Sign\Model\FaxLineRemoveUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineRemoveUser( + fax_line_remove_user_request: $fax_line_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineRemoveUser: {$e->getMessage()}"; +} diff --git a/examples/FaxLineRemoveUserExample.py b/examples/FaxLineRemoveUserExample.py new file mode 100644 index 000000000..366957bac --- /dev/null +++ b/examples/FaxLineRemoveUserExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_remove_user_request = models.FaxLineRemoveUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_remove_user( + fax_line_remove_user_request=fax_line_remove_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_remove_user: %s\n" % e) diff --git a/examples/FaxLineRemoveUserExample.rb b/examples/FaxLineRemoveUserExample.rb new file mode 100644 index 000000000..4f67f7e11 --- /dev/null +++ b/examples/FaxLineRemoveUserExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_remove_user_request = Dropbox::Sign::FaxLineRemoveUserRequest.new +fax_line_remove_user_request.number = "[FAX_NUMBER]" +fax_line_remove_user_request.email_address = "member@dropboxsign.com" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_remove_user( + fax_line_remove_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_remove_user: #{e}" +end diff --git a/examples/FaxLineRemoveUser.sh b/examples/FaxLineRemoveUserExample.sh similarity index 100% rename from examples/FaxLineRemoveUser.sh rename to examples/FaxLineRemoveUserExample.sh diff --git a/examples/FaxLineRemoveUserExample.ts b/examples/FaxLineRemoveUserExample.ts new file mode 100644 index 000000000..6daea08ee --- /dev/null +++ b/examples/FaxLineRemoveUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineRemoveUserRequest: models.FaxLineRemoveUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineRemoveUser( + faxLineRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineRemoveUser:"); + console.log(error.body); +}); diff --git a/examples/FaxList.cs b/examples/FaxList.cs deleted file mode 100644 index f87d9b8f2..000000000 --- a/examples/FaxList.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - var faxApi = new FaxApi(config); - - var page = 1; - var pageSize = 2; - - try - { - var result = faxApi.FaxList(page, pageSize); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxList.java b/examples/FaxList.java deleted file mode 100644 index 042bb7107..000000000 --- a/examples/FaxList.java +++ /dev/null @@ -1,28 +0,0 @@ -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/FaxList.js b/examples/FaxList.js deleted file mode 100644 index 385f44779..000000000 --- a/examples/FaxList.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxList.php b/examples/FaxList.php deleted file mode 100644 index d2a513c21..000000000 --- a/examples/FaxList.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$page = 1; -$pageSize = 2; - -try { - $result = $faxApi->faxList($page, $pageSize); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxList.py b/examples/FaxList.py deleted file mode 100644 index 6b71f79b6..000000000 --- a/examples/FaxList.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - page = 1 - page_size = 2 - - try: - response = fax_api.fax_list( - page=page, - page_size=page_size, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxList.rb b/examples/FaxList.rb deleted file mode 100644 index 3f37a71ea..000000000 --- a/examples/FaxList.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_api = Dropbox::Sign::FaxApi.new - -page = 1 -page_size = 2 - -begin - result = fax_api.fax_list({ page: page, page_size: page_size }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxList.ts b/examples/FaxList.ts deleted file mode 100644 index 385f44779..000000000 --- a/examples/FaxList.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxListExample.cs b/examples/FaxListExample.cs new file mode 100644 index 000000000..64450619d --- /dev/null +++ b/examples/FaxListExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxListExample.java b/examples/FaxListExample.java new file mode 100644 index 000000000..c44f536b9 --- /dev/null +++ b/examples/FaxListExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxList"); + 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/FaxListExample.php b/examples/FaxListExample.php new file mode 100644 index 000000000..c0d432351 --- /dev/null +++ b/examples/FaxListExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxList: {$e->getMessage()}"; +} diff --git a/examples/FaxListExample.py b/examples/FaxListExample.py new file mode 100644 index 000000000..44f840a7f --- /dev/null +++ b/examples/FaxListExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_list: %s\n" % e) diff --git a/examples/FaxListExample.rb b/examples/FaxListExample.rb new file mode 100644 index 000000000..519e04dad --- /dev/null +++ b/examples/FaxListExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_list: #{e}" +end diff --git a/examples/FaxList.sh b/examples/FaxListExample.sh similarity index 100% rename from examples/FaxList.sh rename to examples/FaxListExample.sh diff --git a/examples/FaxListExample.ts b/examples/FaxListExample.ts new file mode 100644 index 000000000..70b904d6f --- /dev/null +++ b/examples/FaxListExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxList:"); + console.log(error.body); +}); diff --git a/examples/FaxSend.cs b/examples/FaxSend.cs deleted file mode 100644 index 8e72a4f93..000000000 --- a/examples/FaxSend.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - config.Username = "YOUR_API_KEY"; - - var faxApi = new FaxApi(config); - - var files = new List { - new FileStream( - "./example_fax.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new FaxSendRequest( - files: files, - 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 - { - var result = faxApi.FaxSend(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/FaxSend.java b/examples/FaxSend.java deleted file mode 100644 index 4e764da83..000000000 --- a/examples/FaxSend.java +++ /dev/null @@ -1,37 +0,0 @@ -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/examples/FaxSend.js b/examples/FaxSend.js deleted file mode 100644 index 4b0eef2da..000000000 --- a/examples/FaxSend.js +++ /dev/null @@ -1,47 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - files: [ file, fileBuffer, fileBufferAlt ], - 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!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxSend.php b/examples/FaxSend.php deleted file mode 100644 index 2dd42d386..000000000 --- a/examples/FaxSend.php +++ /dev/null @@ -1,29 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$faxApi = new Dropbox\Sign\Api\FaxApi($config); - -$data = new Dropbox\Sign\Model\FaxSendRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTestMode(true) - ->setRecipient("16690000001") - ->setSender("16690000000") - ->setCoverPageTo("Jill Fax") - ->setCoverPageMessage("I'm sending you a fax!") - ->setCoverPageFrom("Faxer Faxerson") - ->setTitle("This is what the fax is about!"); - -try { - $result = $faxApi->faxSend($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/FaxSend.py b/examples/FaxSend.py deleted file mode 100644 index c24d6ada7..000000000 --- a/examples/FaxSend.py +++ /dev/null @@ -1,28 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", -) - -with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - data = models.FaxSendRequest( - files=[open("example_signature_request.pdf", "rb")], - 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!", - ) - - try: - response = fax_api.fax_send(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/FaxSend.rb b/examples/FaxSend.rb deleted file mode 100644 index c37cbbd10..000000000 --- a/examples/FaxSend.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" -end - -fax_api = Dropbox::Sign::FaxApi.new - -data = Dropbox::Sign::FaxSendRequest.new -data.files = [File.new("example_signature_request.pdf", "r")] -data.test_mode = true -data.recipient = "16690000001" -data.sender = "16690000000" -data.cover_page_to = "Jill Fax" -data.cover_page_message = "I'm sending you a fax!" -data.cover_page_from = "Faxer Faxerson" -data.title = "This is what the fax is about!" - -begin - result = fax_api.fax_send(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/FaxSend.ts b/examples/FaxSend.ts deleted file mode 100644 index 2f3f6e25d..000000000 --- a/examples/FaxSend.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.FaxSendRequest = { - files: [ file, fileBuffer, fileBufferAlt ], - 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!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/FaxSendExample.cs b/examples/FaxSendExample.cs new file mode 100644 index 000000000..e6a2270be --- /dev/null +++ b/examples/FaxSendExample.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxSendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxSendRequest = new FaxSendRequest( + recipient: "16690000001", + sender: "16690000000", + testMode: true, + coverPageTo: "Jill Fax", + coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", + title: "This is what the fax is about!", + files: new List + { + new FileStream( + path: "./example_fax.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new FaxApi(config).FaxSend( + faxSendRequest: faxSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/FaxSendExample.java b/examples/FaxSendExample.java new file mode 100644 index 000000000..9648b871a --- /dev/null +++ b/examples/FaxSendExample.java @@ -0,0 +1,52 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxSendRequest = new FaxSendRequest(); + faxSendRequest.recipient("16690000001"); + faxSendRequest.sender("16690000000"); + faxSendRequest.testMode(true); + faxSendRequest.coverPageTo("Jill Fax"); + faxSendRequest.coverPageFrom("Faxer Faxerson"); + faxSendRequest.coverPageMessage("I'm sending you a fax!"); + faxSendRequest.title("This is what the fax is about!"); + faxSendRequest.files(List.of ( + new File("./example_fax.pdf") + )); + + try + { + var response = new FaxApi(config).faxSend( + faxSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxSend"); + 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/FaxSendExample.php b/examples/FaxSendExample.php new file mode 100644 index 000000000..707e8ce25 --- /dev/null +++ b/examples/FaxSendExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); + +$fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) + ->setRecipient("16690000001") + ->setSender("16690000000") + ->setTestMode(true) + ->setCoverPageTo("Jill Fax") + ->setCoverPageFrom("Faxer Faxerson") + ->setCoverPageMessage("I'm sending you a fax!") + ->setTitle("This is what the fax is about!") + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( + fax_send_request: $fax_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; +} diff --git a/examples/FaxSendExample.py b/examples/FaxSendExample.py new file mode 100644 index 000000000..77fbf8bbf --- /dev/null +++ b/examples/FaxSendExample.py @@ -0,0 +1,32 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_send_request = models.FaxSendRequest( + recipient="16690000001", + sender="16690000000", + test_mode=True, + cover_page_to="Jill Fax", + cover_page_from="Faxer Faxerson", + cover_page_message="I'm sending you a fax!", + title="This is what the fax is about!", + files=[ + open("./example_fax.pdf", "rb").read(), + ], + ) + + try: + response = api.FaxApi(api_client).fax_send( + fax_send_request=fax_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_send: %s\n" % e) diff --git a/examples/FaxSendExample.rb b/examples/FaxSendExample.rb new file mode 100644 index 000000000..4faeaa725 --- /dev/null +++ b/examples/FaxSendExample.rb @@ -0,0 +1,28 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_send_request = Dropbox::Sign::FaxSendRequest.new +fax_send_request.recipient = "16690000001" +fax_send_request.sender = "16690000000" +fax_send_request.test_mode = true +fax_send_request.cover_page_to = "Jill Fax" +fax_send_request.cover_page_from = "Faxer Faxerson" +fax_send_request.cover_page_message = "I'm sending you a fax!" +fax_send_request.title = "This is what the fax is about!" +fax_send_request.files = [ + File.new("./example_fax.pdf", "r"), +] + +begin + response = Dropbox::Sign::FaxApi.new.fax_send( + fax_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_send: #{e}" +end diff --git a/examples/FaxSend.sh b/examples/FaxSendExample.sh similarity index 100% rename from examples/FaxSend.sh rename to examples/FaxSendExample.sh diff --git a/examples/FaxSendExample.ts b/examples/FaxSendExample.ts new file mode 100644 index 000000000..190caf070 --- /dev/null +++ b/examples/FaxSendExample.ts @@ -0,0 +1,28 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxSendRequest: models.FaxSendRequest = { + recipient: "16690000001", + sender: "16690000000", + testMode: true, + coverPageTo: "Jill Fax", + coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", + title: "This is what the fax is about!", + files: [ + fs.createReadStream("./example_fax.pdf"), + ], +}; + +apiCaller.faxSend( + faxSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxSend:"); + console.log(error.body); +}); diff --git a/examples/OauthTokenGenerate.cs b/examples/OauthTokenGenerate.cs deleted file mode 100644 index f76153ba4..000000000 --- a/examples/OauthTokenGenerate.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - - var oAuthApi = new OAuthApi(config); - - var data = new OAuthTokenGenerateRequest( - state: "900e06e2", - code: "1b0d28d90c86c141", - clientId: "cc91c61d00f8bb2ece1428035716b", - clientSecret: "1d14434088507ffa390e6f5528465" - ); - - try - { - var result = oAuthApi.OauthTokenGenerate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/OauthTokenGenerate.java b/examples/OauthTokenGenerate.java deleted file mode 100644 index b8a5ebf30..000000000 --- a/examples/OauthTokenGenerate.java +++ /dev/null @@ -1,30 +0,0 @@ -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(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenGenerateRequest() - .state("900e06e2") - .code("1b0d28d90c86c141") - .clientId("cc91c61d00f8bb2ece1428035716b") - .clientSecret("1d14434088507ffa390e6f5528465"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenGenerate(data); - 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/OauthTokenGenerate.js b/examples/OauthTokenGenerate.js deleted file mode 100644 index 20a34133c..000000000 --- a/examples/OauthTokenGenerate.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenGenerate.php b/examples/OauthTokenGenerate.php deleted file mode 100644 index d90201e92..000000000 --- a/examples/OauthTokenGenerate.php +++ /dev/null @@ -1,22 +0,0 @@ -setState("900e06e2") - ->setCode("1b0d28d90c86c141") - ->setClientId("cc91c61d00f8bb2ece1428035716b") - ->setClientSecret("1d14434088507ffa390e6f5528465"); - -try { - $result = $oauthApi->oauthTokenGenerate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/OauthTokenGenerate.py b/examples/OauthTokenGenerate.py deleted file mode 100644 index abe76c7e0..000000000 --- a/examples/OauthTokenGenerate.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration() - -with ApiClient(configuration) as api_client: - oauth_api = apis.OAuthApi(api_client) - - data = models.OAuthTokenGenerateRequest( - state="900e06e2", - code="1b0d28d90c86c141", - client_id="cc91c61d00f8bb2ece1428035716b", - client_secret="1d14434088507ffa390e6f5528465", - ) - - try: - response = oauth_api.oauth_token_generate(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/OauthTokenGenerate.rb b/examples/OauthTokenGenerate.rb deleted file mode 100644 index b5b38c8fe..000000000 --- a/examples/OauthTokenGenerate.rb +++ /dev/null @@ -1,16 +0,0 @@ -require "dropbox-sign" - -oauth_api = Dropbox::Sign::OAuthApi.new - -data = Dropbox::Sign::OAuthTokenGenerateRequest.new -data.state = "900e06e2" -data.code = "1b0d28d90c86c141" -data.client_id = "cc91c61d00f8bb2ece1428035716b" -data.client_secret = "1d14434088507ffa390e6f5528465" - -begin - result = oauth_api.oauth_token_generate(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/OauthTokenGenerate.ts b/examples/OauthTokenGenerate.ts deleted file mode 100644 index 20a34133c..000000000 --- a/examples/OauthTokenGenerate.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenGenerateExample.cs b/examples/OauthTokenGenerateExample.cs new file mode 100644 index 000000000..7d8da2fca --- /dev/null +++ b/examples/OauthTokenGenerateExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class OauthTokenGenerateExample +{ + public static void Run() + { + var config = new Configuration(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest( + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code" + ); + + try + { + var response = new OAuthApi(config).OauthTokenGenerate( + oAuthTokenGenerateRequest: oAuthTokenGenerateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling OAuthApi#OauthTokenGenerate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/OauthTokenGenerateExample.java b/examples/OauthTokenGenerateExample.java new file mode 100644 index 000000000..24bbb65c6 --- /dev/null +++ b/examples/OauthTokenGenerateExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenGenerateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); + oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); + oAuthTokenGenerateRequest.state("900e06e2"); + oAuthTokenGenerateRequest.grantType("authorization_code"); + + try + { + var response = new OAuthApi(config).oauthTokenGenerate( + oAuthTokenGenerateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); + 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/OauthTokenGenerateExample.php b/examples/OauthTokenGenerateExample.php new file mode 100644 index 000000000..9b2df4a08 --- /dev/null +++ b/examples/OauthTokenGenerateExample.php @@ -0,0 +1,27 @@ +setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465") + ->setCode("1b0d28d90c86c141") + ->setState("900e06e2") + ->setGrantType("authorization_code"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenGenerate( + o_auth_token_generate_request: $o_auth_token_generate_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenGenerate: {$e->getMessage()}"; +} diff --git a/examples/OauthTokenGenerateExample.py b/examples/OauthTokenGenerateExample.py new file mode 100644 index 000000000..69cec3ffd --- /dev/null +++ b/examples/OauthTokenGenerateExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( +) + +with ApiClient(configuration) as api_client: + o_auth_token_generate_request = models.OAuthTokenGenerateRequest( + client_id="cc91c61d00f8bb2ece1428035716b", + client_secret="1d14434088507ffa390e6f5528465", + code="1b0d28d90c86c141", + state="900e06e2", + grant_type="authorization_code", + ) + + try: + response = api.OAuthApi(api_client).oauth_token_generate( + o_auth_token_generate_request=o_auth_token_generate_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling OAuthApi#oauth_token_generate: %s\n" % e) diff --git a/examples/OauthTokenGenerateExample.rb b/examples/OauthTokenGenerateExample.rb new file mode 100644 index 000000000..47553822e --- /dev/null +++ b/examples/OauthTokenGenerateExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| +end + +o_auth_token_generate_request = Dropbox::Sign::OAuthTokenGenerateRequest.new +o_auth_token_generate_request.client_id = "cc91c61d00f8bb2ece1428035716b" +o_auth_token_generate_request.client_secret = "1d14434088507ffa390e6f5528465" +o_auth_token_generate_request.code = "1b0d28d90c86c141" +o_auth_token_generate_request.state = "900e06e2" +o_auth_token_generate_request.grant_type = "authorization_code" + +begin + response = Dropbox::Sign::OAuthApi.new.oauth_token_generate( + o_auth_token_generate_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling OAuthApi#oauth_token_generate: #{e}" +end diff --git a/examples/OauthTokenGenerate.sh b/examples/OauthTokenGenerateExample.sh similarity index 100% rename from examples/OauthTokenGenerate.sh rename to examples/OauthTokenGenerateExample.sh diff --git a/examples/OauthTokenGenerateExample.ts b/examples/OauthTokenGenerateExample.ts new file mode 100644 index 000000000..80e6adf5e --- /dev/null +++ b/examples/OauthTokenGenerateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenGenerateRequest: models.OAuthTokenGenerateRequest = { + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code", +}; + +apiCaller.oauthTokenGenerate( + oAuthTokenGenerateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenGenerate:"); + console.log(error.body); +}); diff --git a/examples/OauthTokenRefresh.cs b/examples/OauthTokenRefresh.cs deleted file mode 100644 index 41f3235ee..000000000 --- a/examples/OauthTokenRefresh.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - - var oAuthApi = new OAuthApi(config); - - var data = new OAuthTokenRefreshRequest( - refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" - ); - - try - { - var result = oAuthApi.OauthTokenRefresh(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/OauthTokenRefresh.java b/examples/OauthTokenRefresh.java deleted file mode 100644 index 8add0c186..000000000 --- a/examples/OauthTokenRefresh.java +++ /dev/null @@ -1,27 +0,0 @@ -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(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenRefreshRequest() - .refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenRefresh(data); - 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/OauthTokenRefresh.js b/examples/OauthTokenRefresh.js deleted file mode 100644 index da46f9f1e..000000000 --- a/examples/OauthTokenRefresh.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenRefresh.php b/examples/OauthTokenRefresh.php deleted file mode 100644 index ad3e7ad26..000000000 --- a/examples/OauthTokenRefresh.php +++ /dev/null @@ -1,19 +0,0 @@ -setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - -try { - $result = $oauthApi->oauthTokenRefresh($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/OauthTokenRefresh.py b/examples/OauthTokenRefresh.py deleted file mode 100644 index fb6d5e36d..000000000 --- a/examples/OauthTokenRefresh.py +++ /dev/null @@ -1,18 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration() - -with ApiClient(configuration) as api_client: - oauth_api = apis.OAuthApi(api_client) - - data = models.OAuthTokenRefreshRequest( - refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", - ) - - try: - response = oauth_api.oauth_token_refresh(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/OauthTokenRefresh.rb b/examples/OauthTokenRefresh.rb deleted file mode 100644 index bac7eb63c..000000000 --- a/examples/OauthTokenRefresh.rb +++ /dev/null @@ -1,13 +0,0 @@ -require "dropbox-sign" - -oauth_api = Dropbox::Sign::OAuthApi.new - -data = Dropbox::Sign::OAuthTokenRefreshRequest.new -data.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" - -begin - result = oauth_api.oauth_token_refresh(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/OauthTokenRefresh.ts b/examples/OauthTokenRefresh.ts deleted file mode 100644 index da46f9f1e..000000000 --- a/examples/OauthTokenRefresh.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/OauthTokenRefreshExample.cs b/examples/OauthTokenRefreshExample.cs new file mode 100644 index 000000000..21c40d14c --- /dev/null +++ b/examples/OauthTokenRefreshExample.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class OauthTokenRefreshExample +{ + public static void Run() + { + var config = new Configuration(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest( + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" + ); + + try + { + var response = new OAuthApi(config).OauthTokenRefresh( + oAuthTokenRefreshRequest: oAuthTokenRefreshRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling OAuthApi#OauthTokenRefresh: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/OauthTokenRefreshExample.java b/examples/OauthTokenRefreshExample.java new file mode 100644 index 000000000..f79562e02 --- /dev/null +++ b/examples/OauthTokenRefreshExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenRefreshExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); + oAuthTokenRefreshRequest.grantType("refresh_token"); + oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + + try + { + var response = new OAuthApi(config).oauthTokenRefresh( + oAuthTokenRefreshRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); + 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/OauthTokenRefreshExample.php b/examples/OauthTokenRefreshExample.php new file mode 100644 index 000000000..519db72d1 --- /dev/null +++ b/examples/OauthTokenRefreshExample.php @@ -0,0 +1,24 @@ +setGrantType("refresh_token") + ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh( + o_auth_token_refresh_request: $o_auth_token_refresh_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}"; +} diff --git a/examples/OauthTokenRefreshExample.py b/examples/OauthTokenRefreshExample.py new file mode 100644 index 000000000..7bd30fbf8 --- /dev/null +++ b/examples/OauthTokenRefreshExample.py @@ -0,0 +1,23 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( +) + +with ApiClient(configuration) as api_client: + o_auth_token_refresh_request = models.OAuthTokenRefreshRequest( + grant_type="refresh_token", + refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", + ) + + try: + response = api.OAuthApi(api_client).oauth_token_refresh( + o_auth_token_refresh_request=o_auth_token_refresh_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling OAuthApi#oauth_token_refresh: %s\n" % e) diff --git a/examples/OauthTokenRefreshExample.rb b/examples/OauthTokenRefreshExample.rb new file mode 100644 index 000000000..5068b44da --- /dev/null +++ b/examples/OauthTokenRefreshExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| +end + +o_auth_token_refresh_request = Dropbox::Sign::OAuthTokenRefreshRequest.new +o_auth_token_refresh_request.grant_type = "refresh_token" +o_auth_token_refresh_request.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" + +begin + response = Dropbox::Sign::OAuthApi.new.oauth_token_refresh( + o_auth_token_refresh_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling OAuthApi#oauth_token_refresh: #{e}" +end diff --git a/examples/OauthTokenRefresh.sh b/examples/OauthTokenRefreshExample.sh similarity index 100% rename from examples/OauthTokenRefresh.sh rename to examples/OauthTokenRefreshExample.sh diff --git a/examples/OauthTokenRefreshExample.ts b/examples/OauthTokenRefreshExample.ts new file mode 100644 index 000000000..351d689e0 --- /dev/null +++ b/examples/OauthTokenRefreshExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = { + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", +}; + +apiCaller.oauthTokenRefresh( + oAuthTokenRefreshRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenRefresh:"); + console.log(error.body); +}); diff --git a/examples/ReportCreate.cs b/examples/ReportCreate.cs deleted file mode 100644 index 994169a54..000000000 --- a/examples/ReportCreate.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var reportApi = new ReportApi(config); - - var data = new ReportCreateRequest( - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: new List() { - ReportCreateRequest.ReportTypeEnum.UserActivity, - ReportCreateRequest.ReportTypeEnum.DocumentStatus, - } - ); - - try - { - var result = reportApi.OauthCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/ReportCreate.java b/examples/ReportCreate.java deleted file mode 100644 index 038f03b9f..000000000 --- a/examples/ReportCreate.java +++ /dev/null @@ -1,41 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var reportApi = new ReportApi(apiClient); - - var data = new ReportCreateRequest() - .startDate("09/01/2020") - .endDate("09/01/2020") - .reportType(List.of( - ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, - ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS - )); - - try { - ReportCreateResponse result = reportApi.reportCreate(data); - 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/ReportCreate.js b/examples/ReportCreate.js deleted file mode 100644 index 738b12ac3..000000000 --- a/examples/ReportCreate.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - "user_activity", - "document_status", - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ReportCreate.php b/examples/ReportCreate.php deleted file mode 100644 index 1f030f6e5..000000000 --- a/examples/ReportCreate.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$reportApi = new Dropbox\Sign\Api\ReportApi($config); - -$data = new Dropbox\Sign\Model\ReportCreateRequest(); -$data->setStartDate("09/01/2020") - ->setEndDate("09/01/2020") - ->setReportType([ - Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, - Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, - ]); - -try { - $result = $reportApi->reportCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/ReportCreate.py b/examples/ReportCreate.py deleted file mode 100644 index e736c4a77..000000000 --- a/examples/ReportCreate.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - report_api = apis.ReportApi(api_client) - - data = models.ReportCreateRequest( - start_date="09/01/2020", - end_date="09/01/2020", - report_type=["user_activity" "document_status"], - ) - - try: - response = report_api.report_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/ReportCreate.rb b/examples/ReportCreate.rb deleted file mode 100644 index 71da9d1f6..000000000 --- a/examples/ReportCreate.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -report_api = Dropbox::Sign::ReportApi.new - -data = Dropbox::Sign::ReportCreateRequest.new -data.start_date = "09/01/2020" -data.end_date = "09/01/2020" -data.report_type = %w[user_activity document_status] - -begin - result = report_api.report_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/ReportCreate.ts b/examples/ReportCreate.ts deleted file mode 100644 index 39da03ca6..000000000 --- a/examples/ReportCreate.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.ReportCreateRequest = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - DropboxSign.ReportCreateRequest.ReportTypeEnum.UserActivity, - DropboxSign.ReportCreateRequest.ReportTypeEnum.DocumentStatus, - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/ReportCreateExample.cs b/examples/ReportCreateExample.cs new file mode 100644 index 000000000..769bd3a18 --- /dev/null +++ b/examples/ReportCreateExample.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ReportCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var reportCreateRequest = new ReportCreateRequest( + startDate: "09/01/2020", + endDate: "09/01/2020", + reportType: [ + ReportCreateRequest.ReportTypeEnum.UserActivity, + ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ] + ); + + try + { + var response = new ReportApi(config).ReportCreate( + reportCreateRequest: reportCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ReportApi#ReportCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/ReportCreateExample.java b/examples/ReportCreateExample.java new file mode 100644 index 000000000..2f0013c1a --- /dev/null +++ b/examples/ReportCreateExample.java @@ -0,0 +1,48 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ReportCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var reportCreateRequest = new ReportCreateRequest(); + reportCreateRequest.startDate("09/01/2020"); + reportCreateRequest.endDate("09/01/2020"); + reportCreateRequest.reportType(List.of ( + ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, + ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS + )); + + try + { + var response = new ReportApi(config).reportCreate( + reportCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ReportApi#reportCreate"); + 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/ReportCreateExample.php b/examples/ReportCreateExample.php new file mode 100644 index 000000000..18d8d09ea --- /dev/null +++ b/examples/ReportCreateExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); + +$report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) + ->setStartDate("09/01/2020") + ->setEndDate("09/01/2020") + ->setReportType([ + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, + ]); + +try { + $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( + report_create_request: $report_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; +} diff --git a/examples/ReportCreateExample.py b/examples/ReportCreateExample.py new file mode 100644 index 000000000..cfcc85d84 --- /dev/null +++ b/examples/ReportCreateExample.py @@ -0,0 +1,28 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + report_create_request = models.ReportCreateRequest( + start_date="09/01/2020", + end_date="09/01/2020", + report_type=[ + "user_activity", + "document_status", + ], + ) + + try: + response = api.ReportApi(api_client).report_create( + report_create_request=report_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ReportApi#report_create: %s\n" % e) diff --git a/examples/ReportCreateExample.rb b/examples/ReportCreateExample.rb new file mode 100644 index 000000000..d5169ca61 --- /dev/null +++ b/examples/ReportCreateExample.rb @@ -0,0 +1,24 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +report_create_request = Dropbox::Sign::ReportCreateRequest.new +report_create_request.start_date = "09/01/2020" +report_create_request.end_date = "09/01/2020" +report_create_request.report_type = [ + "user_activity", + "document_status", +] + +begin + response = Dropbox::Sign::ReportApi.new.report_create( + report_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ReportApi#report_create: #{e}" +end diff --git a/examples/ReportCreate.sh b/examples/ReportCreateExample.sh similarity index 100% rename from examples/ReportCreate.sh rename to examples/ReportCreateExample.sh diff --git a/examples/ReportCreateExample.ts b/examples/ReportCreateExample.ts new file mode 100644 index 000000000..7195512ab --- /dev/null +++ b/examples/ReportCreateExample.ts @@ -0,0 +1,24 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ReportApi(); +apiCaller.username = "YOUR_API_KEY"; + +const reportCreateRequest: models.ReportCreateRequest = { + startDate: "09/01/2020", + endDate: "09/01/2020", + reportType: [ + models.ReportCreateRequest.ReportTypeEnum.UserActivity, + models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ], +}; + +apiCaller.reportCreate( + reportCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ReportApi#reportCreate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs deleted file mode 100644 index d87fd12fb..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signerList1Signer = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td" - ); - - var signerList1CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "ABC Corp" - ); - - var signerList1 = new SubBulkSignerList( - signers: new List(){signerList1Signer}, - customFields: new List(){signerList1CustomFields} - ); - - var signerList2Signer = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b" - ); - - var signerList2CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "123 Corp" - ); - - var signerList2 = new SubBulkSignerList( - signers: new List(){signerList2Signer}, - customFields: new List(){signerList2CustomFields} - ); - - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@email.com" - ); - - var data = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest( - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: new List(){signerList1, signerList2}, - ccs: new List(){cc1}, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestBulkCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java deleted file mode 100644 index babaca310..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java +++ /dev/null @@ -1,73 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC().role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); - 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/SignatureRequestBulkCreateEmbeddedWithTemplate.js b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js deleted file mode 100644 index 6a303bafd..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,66 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields = { - name: "company", - value: "123 LLC", -}; - -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php deleted file mode 100644 index 6c3de5c16..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com") - ->setPin("d79a3td"); - -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); - -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); - -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$data = new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); -$data->setClientId("1a659d9ad95bccd307ecad78d72192f8") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestBulkCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py deleted file mode 100644 index 71bcd0bb5..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py +++ /dev/null @@ -1,72 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", - ) - - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="ABC Corp", - ) - - signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], - ) - - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", - ) - - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", - ) - - signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( - client_id="1a659d9ad95bccd307ecad78d72192f8", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], - test_mode=True, - ) - - try: - response = ( - signature_request_api.signature_request_bulk_create_embedded_with_template( - data - ) - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb deleted file mode 100644 index e20babf4c..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb +++ /dev/null @@ -1,59 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_list_1_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_1_signer.role = "Client" -signer_list_1_signer.name = "George" -signer_list_1_signer.email_address = "george@example.com" -signer_list_1_signer.pin = "d79a3td" - -signer_list_1_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_1_custom_fields.name = "company" -signer_list_1_custom_fields.value = "ABC Corp" - -signer_list_1 = Dropbox::Sign::SubBulkSignerList.new -signer_list_1.signers = [signer_list_1_signer] -signer_list_1.custom_fields = [signer_list_1_custom_fields] - -signer_list_2_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_2_signer.role = "Client" -signer_list_2_signer.name = "Mary" -signer_list_2_signer.email_address = "mary@example.com" -signer_list_2_signer.pin = "gd9as5b" - -signer_list_2_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_2_custom_fields.name = "company" -signer_list_2_custom_fields.value = "123 LLC" - -signer_list_2 = Dropbox::Sign::SubBulkSignerList.new -signer_list_2.signers = [signer_list_2_signer] -signer_list_2.custom_fields = [signer_list_2_custom_fields] - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -data = Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest.new -data.client_id = "1a659d9ad95bccd307ecad78d72192f8" -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signer_list = [signer_list_1, signer_list_2] -data.ccs = [cc_1] -data.test_mode = true - -begin - result = signature_request_api.signature_request_bulk_create_embedded_with_template(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts deleted file mode 100644 index acb3aa5ae..000000000 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "ABC Corp", -}; - -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..9fd344a94 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); + + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" + ); + + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "ABC Corp" + ); + + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" + ); + + var signerList1Signers = new List + { + signerList1Signers1, + }; + + var signerList1 = new SubBulkSignerList( + customFields: signerList1CustomFields, + signers: signerList1Signers + ); + + var signerList2 = new SubBulkSignerList( + customFields: signerList2CustomFields, + signers: signerList2Signers + ); + + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + clientId: "1a659d9ad95bccd307ecad78d72192f8", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest: signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..a5bec1fb9 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,108 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); + 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/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..1727df311 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest()) + ->setClientId("1a659d9ad95bccd307ecad78d72192f8") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkCreateEmbeddedWithTemplate( + signature_request_bulk_create_embedded_with_template_request: $signature_request_bulk_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..b2cb98a38 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] + + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] + + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + + signer_list_1 = models.SubBulkSignerList( + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, + ) + + signer_list_2 = models.SubBulkSignerList( + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, + ) + + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + signature_request_bulk_create_embedded_with_template_request = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + client_id="1a659d9ad95bccd307ecad78d72192f8", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: %s\n" % e) diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..e01b04f47 --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,84 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" + +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] + +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" + +signer_list_2_signers = [ + signer_list_2_signers_1, +] + +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" + +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] + +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers + +signer_list_2 = Dropbox::Sign::SubBulkSignerList.new +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers + +signer_list = [ + signer_list_1, + signer_list_2, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest.new +signature_request_bulk_create_embedded_with_template_request.client_id = "1a659d9ad95bccd307ecad78d72192f8" +signature_request_bulk_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_bulk_create_embedded_with_template_request.test_mode = true +signature_request_bulk_create_embedded_with_template_request.signer_list = signer_list +signature_request_bulk_create_embedded_with_template_request.ccs = ccs + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: #{e}" +end diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh rename to examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..9c95521ee --- /dev/null +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { + clientId: "1a659d9ad95bccd307ecad78d72192f8", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestBulkSendWithTemplate.cs b/examples/SignatureRequestBulkSendWithTemplate.cs deleted file mode 100644 index bf1851b5b..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signerList1Signer = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td" - ); - - var signerList1CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "ABC Corp" - ); - - var signerList1 = new SubBulkSignerList( - signers: new List(){signerList1Signer}, - customFields: new List(){signerList1CustomFields} - ); - - var signerList2Signer = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b" - ); - - var signerList2CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "123 Corp" - ); - - var signerList2 = new SubBulkSignerList( - signers: new List(){signerList2Signer}, - customFields: new List(){signerList2CustomFields} - ); - - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@email.com" - ); - - var data = new SignatureRequestBulkSendWithTemplateRequest( - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: new List(){signerList1, signerList2}, - ccs: new List(){cc1}, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestBulkSendWithTemplate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestBulkSendWithTemplate.java b/examples/SignatureRequestBulkSendWithTemplate.java deleted file mode 100644 index 960d1cbe8..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.java +++ /dev/null @@ -1,73 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); - 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/SignatureRequestBulkSendWithTemplate.js b/examples/SignatureRequestBulkSendWithTemplate.js deleted file mode 100644 index 088d2e1cf..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.js +++ /dev/null @@ -1,65 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields = { - name: "company", - value: "123 LLC", -}; - -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkSendWithTemplate.php b/examples/SignatureRequestBulkSendWithTemplate.php deleted file mode 100644 index 0b147a75e..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.php +++ /dev/null @@ -1,62 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com") - ->setPin("d79a3td"); - -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); - -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); - -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$data = new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestBulkSendWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestBulkSendWithTemplate.py b/examples/SignatureRequestBulkSendWithTemplate.py deleted file mode 100644 index f1206792d..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.py +++ /dev/null @@ -1,67 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", - ) - - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="ABC Corp", - ) - - signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], - ) - - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( - role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", - ) - - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", - ) - - signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.SignatureRequestBulkSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_bulk_send_with_template(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestBulkSendWithTemplate.rb b/examples/SignatureRequestBulkSendWithTemplate.rb deleted file mode 100644 index 125bc06ea..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.rb +++ /dev/null @@ -1,58 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_list_1_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_1_signer.role = "Client" -signer_list_1_signer.name = "George" -signer_list_1_signer.email_address = "george@example.com" -signer_list_1_signer.pin = "d79a3td" - -signer_list_1_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_1_custom_fields.name = "company" -signer_list_1_custom_fields.value = "ABC Corp" - -signer_list_1 = Dropbox::Sign::SubBulkSignerList.new -signer_list_1.signers = [signer_list_1_signer] -signer_list_1.custom_fields = [signer_list_1_custom_fields] - -signer_list_2_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_2_signer.role = "Client" -signer_list_2_signer.name = "Mary" -signer_list_2_signer.email_address = "mary@example.com" -signer_list_2_signer.pin = "gd9as5b" - -signer_list_2_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_2_custom_fields.name = "company" -signer_list_2_custom_fields.value = "123 LLC" - -signer_list_2 = Dropbox::Sign::SubBulkSignerList.new -signer_list_2.signers = [signer_list_2_signer] -signer_list_2.custom_fields = [signer_list_2_custom_fields] - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -data = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signer_list = [signer_list_1, signer_list_2] -data.ccs = [cc_1] -data.test_mode = true - -begin - result = signature_request_api.signature_request_bulk_send_with_template(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestBulkSendWithTemplate.ts b/examples/SignatureRequestBulkSendWithTemplate.ts deleted file mode 100644 index b2eb7a923..000000000 --- a/examples/SignatureRequestBulkSendWithTemplate.ts +++ /dev/null @@ -1,65 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "ABC Corp", -}; - -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; - -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", -}; - -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.cs b/examples/SignatureRequestBulkSendWithTemplateExample.cs new file mode 100644 index 000000000..3c95fdb32 --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); + + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" + ); + + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "ABC Corp" + ); + + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" + ); + + var signerList1Signers = new List + { + signerList1Signers1, + }; + + var signerList1 = new SubBulkSignerList( + customFields: signerList1CustomFields, + signers: signerList1Signers + ); + + var signerList2 = new SubBulkSignerList( + customFields: signerList2CustomFields, + signers: signerList2Signers + ); + + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest( + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest: signatureRequestBulkSendWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkSendWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.java b/examples/SignatureRequestBulkSendWithTemplateExample.java new file mode 100644 index 000000000..b539626e0 --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.java @@ -0,0 +1,108 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); + signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkSendWithTemplateRequest.testMode(true); + signatureRequestBulkSendWithTemplateRequest.signerList(signerList); + signatureRequestBulkSendWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); + 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/SignatureRequestBulkSendWithTemplateExample.php b/examples/SignatureRequestBulkSendWithTemplateExample.php new file mode 100644 index 000000000..7574361ff --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest()) + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate( + signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.py b/examples/SignatureRequestBulkSendWithTemplateExample.py new file mode 100644 index 000000000..4a8fb41c5 --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] + + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] + + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + + signer_list_1 = models.SubBulkSignerList( + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, + ) + + signer_list_2 = models.SubBulkSignerList( + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, + ) + + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + signature_request_bulk_send_with_template_request = models.SignatureRequestBulkSendWithTemplateRequest( + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: %s\n" % e) diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.rb b/examples/SignatureRequestBulkSendWithTemplateExample.rb new file mode 100644 index 000000000..27f2d66d5 --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.rb @@ -0,0 +1,84 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" + +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] + +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" + +signer_list_2_signers = [ + signer_list_2_signers_1, +] + +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" + +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] + +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers + +signer_list_2 = Dropbox::Sign::SubBulkSignerList.new +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers + +signer_list = [ + signer_list_1, + signer_list_2, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_send_with_template_request = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new +signature_request_bulk_send_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_send_with_template_request.subject = "Purchase Order" +signature_request_bulk_send_with_template_request.test_mode = true +signature_request_bulk_send_with_template_request.signer_list = signer_list +signature_request_bulk_send_with_template_request.ccs = ccs + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: #{e}" +end diff --git a/examples/SignatureRequestBulkSendWithTemplate.sh b/examples/SignatureRequestBulkSendWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestBulkSendWithTemplate.sh rename to examples/SignatureRequestBulkSendWithTemplateExample.sh diff --git a/examples/SignatureRequestBulkSendWithTemplateExample.ts b/examples/SignatureRequestBulkSendWithTemplateExample.ts new file mode 100644 index 000000000..a8c7d7bbd --- /dev/null +++ b/examples/SignatureRequestBulkSendWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCancel.cs b/examples/SignatureRequestCancel.cs deleted file mode 100644 index cb9549f8f..000000000 --- a/examples/SignatureRequestCancel.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - signatureRequestApi.SignatureRequestCancel(signatureRequestId); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestCancel.java b/examples/SignatureRequestCancel.java deleted file mode 100644 index 20c165993..000000000 --- a/examples/SignatureRequestCancel.java +++ /dev/null @@ -1,31 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try { - signatureRequestApi.signatureRequestCancel(signatureRequestId); - } 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/SignatureRequestCancel.js b/examples/SignatureRequestCancel.js deleted file mode 100644 index ba378c467..000000000 --- a/examples/SignatureRequestCancel.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCancel.php b/examples/SignatureRequestCancel.php deleted file mode 100644 index 154dbab93..000000000 --- a/examples/SignatureRequestCancel.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $signatureRequestApi->signatureRequestCancel($signatureRequestId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCancel.py b/examples/SignatureRequestCancel.py deleted file mode 100644 index 5330623b6..000000000 --- a/examples/SignatureRequestCancel.py +++ /dev/null @@ -1,18 +0,0 @@ -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - signature_request_api.signature_request_cancel(signature_request_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestCancel.rb b/examples/SignatureRequestCancel.rb deleted file mode 100644 index aab12770d..000000000 --- a/examples/SignatureRequestCancel.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_cancel(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestCancel.ts b/examples/SignatureRequestCancel.ts deleted file mode 100644 index ba378c467..000000000 --- a/examples/SignatureRequestCancel.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCancelExample.cs b/examples/SignatureRequestCancelExample.cs new file mode 100644 index 000000000..4d18209eb --- /dev/null +++ b/examples/SignatureRequestCancelExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCancelExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new SignatureRequestApi(config).SignatureRequestCancel( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCancel: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestCancelExample.java b/examples/SignatureRequestCancelExample.java new file mode 100644 index 000000000..076a73d1d --- /dev/null +++ b/examples/SignatureRequestCancelExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCancelExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new SignatureRequestApi(config).signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); + 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/SignatureRequestCancelExample.php b/examples/SignatureRequestCancelExample.php new file mode 100644 index 000000000..969a67683 --- /dev/null +++ b/examples/SignatureRequestCancelExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCancelExample.py b/examples/SignatureRequestCancelExample.py new file mode 100644 index 000000000..6a0e62bc1 --- /dev/null +++ b/examples/SignatureRequestCancelExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.SignatureRequestApi(api_client).signature_request_cancel( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_cancel: %s\n" % e) diff --git a/examples/SignatureRequestCancelExample.rb b/examples/SignatureRequestCancelExample.rb new file mode 100644 index 000000000..9f3ff955e --- /dev/null +++ b/examples/SignatureRequestCancelExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::SignatureRequestApi.new.signature_request_cancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_cancel: #{e}" +end diff --git a/examples/SignatureRequestCancel.sh b/examples/SignatureRequestCancelExample.sh similarity index 100% rename from examples/SignatureRequestCancel.sh rename to examples/SignatureRequestCancelExample.sh diff --git a/examples/SignatureRequestCancelExample.ts b/examples/SignatureRequestCancelExample.ts new file mode 100644 index 000000000..d6207b3bd --- /dev/null +++ b/examples/SignatureRequestCancelExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbedded.cs b/examples/SignatureRequestCreateEmbedded.cs deleted file mode 100644 index 1f587c951..000000000 --- a/examples/SignatureRequestCreateEmbedded.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new SignatureRequestCreateEmbeddedRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - signingOptions: signingOptions, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestCreateEmbedded(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestCreateEmbedded.java b/examples/SignatureRequestCreateEmbedded.java deleted file mode 100644 index 3697f2167..000000000 --- a/examples/SignatureRequestCreateEmbedded.java +++ /dev/null @@ -1,62 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbedded(data); - 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/SignatureRequestCreateEmbedded.js b/examples/SignatureRequestCreateEmbedded.js deleted file mode 100644 index 14dca9a26..000000000 --- a/examples/SignatureRequestCreateEmbedded.js +++ /dev/null @@ -1,53 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbedded.php b/examples/SignatureRequestCreateEmbedded.php deleted file mode 100644 index 9b416917c..000000000 --- a/examples/SignatureRequestCreateEmbedded.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestCreateEmbedded($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCreateEmbedded.py b/examples/SignatureRequestCreateEmbedded.py deleted file mode 100644 index d35615c96..000000000 --- a/examples/SignatureRequestCreateEmbedded.py +++ /dev/null @@ -1,51 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"], - files=[open("example_signature_request.pdf", "rb")], - signing_options=signing_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_create_embedded(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestCreateEmbedded.rb b/examples/SignatureRequestCreateEmbedded.rb deleted file mode 100644 index 4cec8fa11..000000000 --- a/examples/SignatureRequestCreateEmbedded.rb +++ /dev/null @@ -1,46 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = ["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"] -data.files = [File.new("example_signature_request.pdf", "r")] -data.signing_options = signing_options -data.test_mode = true - -begin - result = signature_request_api.signature_request_create_embedded(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestCreateEmbedded.ts b/examples/SignatureRequestCreateEmbedded.ts deleted file mode 100644 index cad168590..000000000 --- a/examples/SignatureRequestCreateEmbedded.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedExample.cs b/examples/SignatureRequestCreateEmbeddedExample.cs new file mode 100644 index 000000000..7f9786caf --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestCreateEmbeddedExample.java b/examples/SignatureRequestCreateEmbeddedExample.java new file mode 100644 index 000000000..5193cee20 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.java @@ -0,0 +1,79 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); + 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/SignatureRequestCreateEmbeddedExample.php b/examples/SignatureRequestCreateEmbeddedExample.php new file mode 100644 index 000000000..61d74044e --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.php @@ -0,0 +1,59 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbeddedExample.py b/examples/SignatureRequestCreateEmbeddedExample.py new file mode 100644 index 000000000..2e1b93c1d --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.py @@ -0,0 +1,62 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded( + signature_request_create_embedded_request=signature_request_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" % e) diff --git a/examples/SignatureRequestCreateEmbeddedExample.rb b/examples/SignatureRequestCreateEmbeddedExample.rb new file mode 100644 index 000000000..55db08ca7 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.rb @@ -0,0 +1,55 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new +signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_create_embedded_request.subject = "The NDA we talked about" +signature_request_create_embedded_request.test_mode = true +signature_request_create_embedded_request.title = "NDA with Acme Co." +signature_request_create_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_create_embedded_request.signing_options = signing_options +signature_request_create_embedded_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( + signature_request_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{e}" +end diff --git a/examples/SignatureRequestCreateEmbedded.sh b/examples/SignatureRequestCreateEmbeddedExample.sh similarity index 100% rename from examples/SignatureRequestCreateEmbedded.sh rename to examples/SignatureRequestCreateEmbeddedExample.sh diff --git a/examples/SignatureRequestCreateEmbeddedExample.ts b/examples/SignatureRequestCreateEmbeddedExample.ts new file mode 100644 index 000000000..a2c620a2e --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedExample.ts @@ -0,0 +1,58 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.cs b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.cs new file mode 100644 index 000000000..40cbcbc51 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.java b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.java new file mode 100644 index 000000000..b069e2001 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.java @@ -0,0 +1,105 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); + 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/SignatureRequestCreateEmbeddedGroupedSignersExample.php b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php new file mode 100644 index 000000000..f7ea5d39a --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.php @@ -0,0 +1,86 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.py b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.py new file mode 100644 index 000000000..8bc255e6f --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.py @@ -0,0 +1,92 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded( + signature_request_create_embedded_request=signature_request_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" % e) diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.rb b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.rb new file mode 100644 index 000000000..9910ee894 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.rb @@ -0,0 +1,81 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new +signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_create_embedded_request.subject = "The NDA we talked about" +signature_request_create_embedded_request.test_mode = true +signature_request_create_embedded_request.title = "NDA with Acme Co." +signature_request_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_create_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_create_embedded_request.signing_options = signing_options +signature_request_create_embedded_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( + signature_request_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{e}" +end diff --git a/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts new file mode 100644 index 000000000..a79b117ad --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedGroupedSignersExample.ts @@ -0,0 +1,88 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.cs b/examples/SignatureRequestCreateEmbeddedWithTemplate.cs deleted file mode 100644 index ff9da4a75..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "George" - ); - - var subSigningOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var data = new SignatureRequestCreateEmbeddedWithTemplateRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - signingOptions: subSigningOptions, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.java b/examples/SignatureRequestCreateEmbeddedWithTemplate.java deleted file mode 100644 index 96d14e58b..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.java +++ /dev/null @@ -1,53 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George"); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedWithTemplateRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .signingOptions(subSigningOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); - 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/SignatureRequestCreateEmbeddedWithTemplate.js b/examples/SignatureRequestCreateEmbeddedWithTemplate.js deleted file mode 100644 index 12ba7fc3c..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,41 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.php b/examples/SignatureRequestCreateEmbeddedWithTemplate.php deleted file mode 100644 index 3ff087edb..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,43 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.py b/examples/SignatureRequestCreateEmbeddedWithTemplate.py deleted file mode 100644 index 1b60db43c..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.py +++ /dev/null @@ -1,45 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="jack@example.com", - name="Jack", - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - signing_options=signing_options, - test_mode=True, - ) - - try: - response = ( - signature_request_api.signature_request_create_embedded_with_template(data) - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.rb b/examples/SignatureRequestCreateEmbeddedWithTemplate.rb deleted file mode 100644 index 6aba3fd28..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.rb +++ /dev/null @@ -1,39 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.signing_options = signing_options -data.test_mode = true - -begin - result = signature_request_api.signature_request_create_embedded_with_template(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.ts b/examples/SignatureRequestCreateEmbeddedWithTemplate.ts deleted file mode 100644 index 993efd82f..000000000 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..d40f34240 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest: signatureRequestCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.java b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..309d422ee --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,68 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); + signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); + 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/SignatureRequestCreateEmbeddedWithTemplateExample.php b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..3ff0454e8 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate( + signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.py b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..6a5835760 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,50 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_create_embedded_with_template_request = models.SignatureRequestCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: %s\n" % e) diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..2de72cf8a --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,44 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new +signature_request_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_create_embedded_with_template_request.test_mode = true +signature_request_create_embedded_with_template_request.signing_options = signing_options +signature_request_create_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: #{e}" +end diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.sh b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestCreateEmbeddedWithTemplate.sh rename to examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..a2ee15e46 --- /dev/null +++ b/examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEdit.cs b/examples/SignatureRequestEdit.cs deleted file mode 100644 index 02c197f63..000000000 --- a/examples/SignatureRequestEdit.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var metadata = new Dictionary() - { - ["custom_id"] = 1234, - ["custom_text"] = "NDA #9" - }; - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new SignatureRequestEditRequest( - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - metadata: metadata, - signingOptions: signingOptions, - fieldOptions: subFieldOptions, - testMode: true - ); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestEdit(signatureRequestId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestEdit.java b/examples/SignatureRequestEdit.java deleted file mode 100644 index 163b663b0..000000000 --- a/examples/SignatureRequestEdit.java +++ /dev/null @@ -1,69 +0,0 @@ -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; -import java.util.List; -import java.util.Map; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestEditRequest() - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(signingOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestEdit(signatureRequestId, data); - 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/SignatureRequestEdit.js b/examples/SignatureRequestEdit.js deleted file mode 100644 index 797ffc59e..000000000 --- a/examples/SignatureRequestEdit.js +++ /dev/null @@ -1,84 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestEditRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEdit(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEdit.php b/examples/SignatureRequestEdit.php deleted file mode 100644 index 67b7c92a5..000000000 --- a/examples/SignatureRequestEdit.php +++ /dev/null @@ -1,62 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\SignatureRequestEditRequest(); -$data->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEdit($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEdit.py b/examples/SignatureRequestEdit.py deleted file mode 100644 index 213bed8b4..000000000 --- a/examples/SignatureRequestEdit.py +++ /dev/null @@ -1,66 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.SignatureRequestEditRequest( - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, - test_mode=True, - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_edit( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEdit.rb b/examples/SignatureRequestEdit.rb deleted file mode 100644 index b8db7b6b4..000000000 --- a/examples/SignatureRequestEdit.rb +++ /dev/null @@ -1,58 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::SignatureRequestEditRequest.new -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", -] -data.files = [File.new("example_signature_request.pdf", "r")] -data.metadata = { - custom_id: 1234, - custom_text: "NDA #9", -} -data.signing_options = signing_options -data.field_options = field_options -data.test_mode = true - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_edit(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestEdit.ts b/examples/SignatureRequestEdit.ts deleted file mode 100644 index 634c0ba86..000000000 --- a/examples/SignatureRequestEdit.ts +++ /dev/null @@ -1,85 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestEditRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - -const result = signatureRequestApi.signatureRequestEdit(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbedded.cs b/examples/SignatureRequestEditEmbedded.cs deleted file mode 100644 index 87d7d731b..000000000 --- a/examples/SignatureRequestEditEmbedded.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new SignatureRequestEditEmbeddedRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - signingOptions: signingOptions, - testMode: true - ); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestEditEmbedded( - signatureRequestId, - data - ); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestEditEmbedded.java b/examples/SignatureRequestEditEmbedded.java deleted file mode 100644 index a9e0ddd22..000000000 --- a/examples/SignatureRequestEditEmbedded.java +++ /dev/null @@ -1,67 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestEditEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestEditEmbedded( - signatureRequestId, - data - ); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); - 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/SignatureRequestEditEmbedded.js b/examples/SignatureRequestEditEmbedded.js deleted file mode 100644 index c3b4ae01d..000000000 --- a/examples/SignatureRequestEditEmbedded.js +++ /dev/null @@ -1,58 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbedded( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbedded.php b/examples/SignatureRequestEditEmbedded.php deleted file mode 100644 index 7af9b39b1..000000000 --- a/examples/SignatureRequestEditEmbedded.php +++ /dev/null @@ -1,58 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditEmbedded( - $signatureRequestId, - $data - ); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditEmbedded.py b/examples/SignatureRequestEditEmbedded.py deleted file mode 100644 index 1bbac3c2e..000000000 --- a/examples/SignatureRequestEditEmbedded.py +++ /dev/null @@ -1,55 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestEditEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"], - files=[open("example_signature_request.pdf", "rb")], - signing_options=signing_options, - test_mode=True, - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_edit_embedded( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbedded.rb b/examples/SignatureRequestEditEmbedded.rb deleted file mode 100644 index 6b5d379d4..000000000 --- a/examples/SignatureRequestEditEmbedded.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = ["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"] -data.files = [File.new("example_signature_request.pdf", "r")] -data.signing_options = signing_options -data.test_mode = true - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_edit_embedded(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestEditEmbedded.ts b/examples/SignatureRequestEditEmbedded.ts deleted file mode 100644 index 49c15b51b..000000000 --- a/examples/SignatureRequestEditEmbedded.ts +++ /dev/null @@ -1,58 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestEditEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbedded( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedExample.cs b/examples/SignatureRequestEditEmbeddedExample.cs new file mode 100644 index 000000000..356603bf6 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbedded( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedRequest: signatureRequestEditEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditEmbeddedExample.java b/examples/SignatureRequestEditEmbeddedExample.java new file mode 100644 index 000000000..c69cc85e4 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.java @@ -0,0 +1,80 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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/SignatureRequestEditEmbeddedExample.php b/examples/SignatureRequestEditEmbeddedExample.php new file mode 100644 index 000000000..868c62562 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.php @@ -0,0 +1,60 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditEmbeddedExample.py b/examples/SignatureRequestEditEmbeddedExample.py new file mode 100644 index 000000000..e3e5f1a87 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.py @@ -0,0 +1,63 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_embedded_request = models.SignatureRequestEditEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbeddedExample.rb b/examples/SignatureRequestEditEmbeddedExample.rb new file mode 100644 index 000000000..0e192377c --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.rb @@ -0,0 +1,56 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_embedded_request = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new +signature_request_edit_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_embedded_request.subject = "The NDA we talked about" +signature_request_edit_embedded_request.test_mode = true +signature_request_edit_embedded_request.title = "NDA with Acme Co." +signature_request_edit_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_embedded_request.signing_options = signing_options +signature_request_edit_embedded_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded: #{e}" +end diff --git a/examples/SignatureRequestEditEmbedded.sh b/examples/SignatureRequestEditEmbeddedExample.sh similarity index 100% rename from examples/SignatureRequestEditEmbedded.sh rename to examples/SignatureRequestEditEmbeddedExample.sh diff --git a/examples/SignatureRequestEditEmbeddedExample.ts b/examples/SignatureRequestEditEmbeddedExample.ts new file mode 100644 index 000000000..f0f7580cc --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedExample.ts @@ -0,0 +1,59 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.cs b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.cs new file mode 100644 index 000000000..3be9c8142 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbedded( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedRequest: signatureRequestEditEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.java b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.java new file mode 100644 index 000000000..d526e3d88 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.java @@ -0,0 +1,106 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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/SignatureRequestEditEmbeddedGroupedSignersExample.php b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.php new file mode 100644 index 000000000..08ebeac0a --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.php @@ -0,0 +1,87 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.py b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.py new file mode 100644 index 000000000..9c26905c3 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.py @@ -0,0 +1,93 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_edit_embedded_request = models.SignatureRequestEditEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.rb b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.rb new file mode 100644 index 000000000..0fc7bc7a3 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.rb @@ -0,0 +1,82 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_edit_embedded_request = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new +signature_request_edit_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_embedded_request.subject = "The NDA we talked about" +signature_request_edit_embedded_request.test_mode = true +signature_request_edit_embedded_request.title = "NDA with Acme Co." +signature_request_edit_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_edit_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_embedded_request.signing_options = signing_options +signature_request_edit_embedded_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded: #{e}" +end diff --git a/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts new file mode 100644 index 000000000..3d828dbf8 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedGroupedSignersExample.ts @@ -0,0 +1,89 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.cs b/examples/SignatureRequestEditEmbeddedWithTemplate.cs deleted file mode 100644 index 12a591d17..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestTemplateSigner( - role: "Client", - name: "George" - ); - - var subSigningOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var data = new SignatureRequestEditEmbeddedWithTemplateRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - signingOptions: subSigningOptions, - testMode: true - ); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data - ); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.java b/examples/SignatureRequestEditEmbeddedWithTemplate.java deleted file mode 100644 index c9b68d068..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.java +++ /dev/null @@ -1,58 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George"); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestEditEmbeddedWithTemplateRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .signingOptions(subSigningOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data - ); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#editEmbeddedWithTemplate"); - 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/SignatureRequestEditEmbeddedWithTemplate.js b/examples/SignatureRequestEditEmbeddedWithTemplate.js deleted file mode 100644 index b4207e848..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.js +++ /dev/null @@ -1,46 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.php b/examples/SignatureRequestEditEmbeddedWithTemplate.php deleted file mode 100644 index 2ab8d4739..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.php +++ /dev/null @@ -1,48 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditEmbeddedWithTemplate( - $signatureRequestId, - $data - ); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.py b/examples/SignatureRequestEditEmbeddedWithTemplate.py deleted file mode 100644 index 2e0be015e..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.py +++ /dev/null @@ -1,47 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="jack@example.com", - name="Jack", - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - data = models.SignatureRequestEditEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - signing_options=signing_options, - test_mode=True, - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_edit_embedded_with_template( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.rb b/examples/SignatureRequestEditEmbeddedWithTemplate.rb deleted file mode 100644 index 4dc4c9e2f..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.rb +++ /dev/null @@ -1,41 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.signing_options = signing_options -data.test_mode = true - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_edit_embedded_with_template(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.ts b/examples/SignatureRequestEditEmbeddedWithTemplate.ts deleted file mode 100644 index cfe6cdc55..000000000 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestEditEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditEmbeddedWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.cs b/examples/SignatureRequestEditEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..fff755e13 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbeddedWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedWithTemplateRequest: signatureRequestEditEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.java b/examples/SignatureRequestEditEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..b0c034f3b --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.java @@ -0,0 +1,69 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); + signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); + 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/SignatureRequestEditEmbeddedWithTemplateExample.php b/examples/SignatureRequestEditEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..640f35dfc --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.php @@ -0,0 +1,50 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_edit_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbeddedWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request: $signature_request_edit_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.py b/examples/SignatureRequestEditEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..92f0378ef --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.py @@ -0,0 +1,51 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_edit_embedded_with_template_request = models.SignatureRequestEditEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.rb b/examples/SignatureRequestEditEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..f504f1944 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.rb @@ -0,0 +1,45 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_edit_embedded_with_template_request = Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest.new +signature_request_edit_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_edit_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_embedded_with_template_request.subject = "Purchase Order" +signature_request_edit_embedded_with_template_request.test_mode = true +signature_request_edit_embedded_with_template_request.signing_options = signing_options +signature_request_edit_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: #{e}" +end diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.sh b/examples/SignatureRequestEditEmbeddedWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestEditEmbeddedWithTemplate.sh rename to examples/SignatureRequestEditEmbeddedWithTemplateExample.sh diff --git a/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts b/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..0deff76bc --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplateExample.ts @@ -0,0 +1,47 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestEditEmbeddedWithTemplateRequest: models.SignatureRequestEditEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditExample.cs b/examples/SignatureRequestEditExample.cs new file mode 100644 index 000000000..b3542b75f --- /dev/null +++ b/examples/SignatureRequestEditExample.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestEditRequest = new SignatureRequestEditRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEdit( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditRequest: signatureRequestEditRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEdit: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditExample.java b/examples/SignatureRequestEditExample.java new file mode 100644 index 000000000..ee628deef --- /dev/null +++ b/examples/SignatureRequestEditExample.java @@ -0,0 +1,89 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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/SignatureRequestEditExample.php b/examples/SignatureRequestEditExample.php new file mode 100644 index 000000000..92d3747c5 --- /dev/null +++ b/examples/SignatureRequestEditExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditExample.py b/examples/SignatureRequestEditExample.py new file mode 100644 index 000000000..4c6fc1e74 --- /dev/null +++ b/examples/SignatureRequestEditExample.py @@ -0,0 +1,73 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_request = models.SignatureRequestEditRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request=signature_request_edit_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit: %s\n" % e) diff --git a/examples/SignatureRequestEditExample.rb b/examples/SignatureRequestEditExample.rb new file mode 100644 index 000000000..e55d7beee --- /dev/null +++ b/examples/SignatureRequestEditExample.rb @@ -0,0 +1,66 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_request = Dropbox::Sign::SignatureRequestEditRequest.new +signature_request_edit_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_request.subject = "The NDA we talked about" +signature_request_edit_request.test_mode = true +signature_request_edit_request.title = "NDA with Acme Co." +signature_request_edit_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_edit_request.field_options = field_options +signature_request_edit_request.signing_options = signing_options +signature_request_edit_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit: #{e}" +end diff --git a/examples/SignatureRequestEdit.sh b/examples/SignatureRequestEditExample.sh similarity index 100% rename from examples/SignatureRequestEdit.sh rename to examples/SignatureRequestEditExample.sh diff --git a/examples/SignatureRequestEditExample.ts b/examples/SignatureRequestEditExample.ts new file mode 100644 index 000000000..86e3fd1b6 --- /dev/null +++ b/examples/SignatureRequestEditExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditGroupedSignersExample.cs b/examples/SignatureRequestEditGroupedSignersExample.cs new file mode 100644 index 000000000..35a41afa4 --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestEditRequest = new SignatureRequestEditRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEdit( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditRequest: signatureRequestEditRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEdit: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditGroupedSignersExample.java b/examples/SignatureRequestEditGroupedSignersExample.java new file mode 100644 index 000000000..934764bdd --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.java @@ -0,0 +1,115 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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/SignatureRequestEditGroupedSignersExample.php b/examples/SignatureRequestEditGroupedSignersExample.php new file mode 100644 index 000000000..af25d631a --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.php @@ -0,0 +1,96 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditGroupedSignersExample.py b/examples/SignatureRequestEditGroupedSignersExample.py new file mode 100644 index 000000000..41f5a54dc --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.py @@ -0,0 +1,103 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_edit_request = models.SignatureRequestEditRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request=signature_request_edit_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit: %s\n" % e) diff --git a/examples/SignatureRequestEditGroupedSignersExample.rb b/examples/SignatureRequestEditGroupedSignersExample.rb new file mode 100644 index 000000000..2b19ffabb --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.rb @@ -0,0 +1,92 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_edit_request = Dropbox::Sign::SignatureRequestEditRequest.new +signature_request_edit_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_request.subject = "The NDA we talked about" +signature_request_edit_request.test_mode = true +signature_request_edit_request.title = "NDA with Acme Co." +signature_request_edit_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_edit_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_edit_request.field_options = field_options +signature_request_edit_request.signing_options = signing_options +signature_request_edit_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit: #{e}" +end diff --git a/examples/SignatureRequestEditGroupedSignersExample.ts b/examples/SignatureRequestEditGroupedSignersExample.ts new file mode 100644 index 000000000..7b300f742 --- /dev/null +++ b/examples/SignatureRequestEditGroupedSignersExample.ts @@ -0,0 +1,97 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestEditWithTemplate.cs b/examples/SignatureRequestEditWithTemplate.cs deleted file mode 100644 index 22038ee87..000000000 --- a/examples/SignatureRequestEditWithTemplate.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestTemplateSigner( - role: "Client", - emailAddress: "george@example.com", - name: "George" - ); - - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@emaple.com" - ); - - var customField1 = new SubCustomField( - name: "Cost", - value: "$20,000", - editor: "Client", - required: true - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var data = new SignatureRequestEditWithTemplateRequest( - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - ccs: new List(){cc1}, - customFields: new List(){customField1}, - signingOptions: signingOptions, - testMode: true - ); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestEditWithTemplate(signatureRequestId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestEditWithTemplate.java b/examples/SignatureRequestEditWithTemplate.java deleted file mode 100644 index da6677231..000000000 --- a/examples/SignatureRequestEditWithTemplate.java +++ /dev/null @@ -1,70 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .emailAddress("george@example.com") - .name("George"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@emaple.com"); - - var customField1 = new SubCustomField() - .name("Cost") - .value("$20,000") - .editor("Client") - .required(true); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestEditWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .ccs(List.of(cc1)) - .customFields(List.of(customField1)) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestEditWithTemplate( - signatureRequestId, - data - ); - 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/SignatureRequestEditWithTemplate.js b/examples/SignatureRequestEditWithTemplate.js deleted file mode 100644 index 3bc93e246..000000000 --- a/examples/SignatureRequestEditWithTemplate.js +++ /dev/null @@ -1,59 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1 = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditWithTemplate( - signatureRequestId, - data, -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditWithTemplate.php b/examples/SignatureRequestEditWithTemplate.php deleted file mode 100644 index d9fe64d46..000000000 --- a/examples/SignatureRequestEditWithTemplate.php +++ /dev/null @@ -1,56 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") - ->setEditor("Client") - ->setRequired(true); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestEditWithTemplate($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestEditWithTemplate.py b/examples/SignatureRequestEditWithTemplate.py deleted file mode 100644 index 399b51697..000000000 --- a/examples/SignatureRequestEditWithTemplate.py +++ /dev/null @@ -1,60 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="george@example.com", - name="George", - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - custom_field_1 = models.SubCustomField( - name="Cost", - value="$20,000", - editor="Client", - required=True, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - data = models.SignatureRequestSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - ccs=[cc_1], - custom_fields=[custom_field_1], - signing_options=signing_options, - test_mode=True, - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_edit_with_template( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditWithTemplate.rb b/examples/SignatureRequestEditWithTemplate.rb deleted file mode 100644 index dacbaba5f..000000000 --- a/examples/SignatureRequestEditWithTemplate.rb +++ /dev/null @@ -1,52 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "george@example.com" -signer_1.name = "George" - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -custom_field_1 = Dropbox::Sign::SubCustomField.new -custom_field_1.name = "Cost" -custom_field_1.value = "$20,000" -custom_field_1.editor = "Client" -custom_field_1.required = true - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = false -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.ccs = [cc_1] -data.custom_fields = [custom_field_1] -data.signing_options = signing_options -data.test_mode = true - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_edit_with_template(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestEditWithTemplate.ts b/examples/SignatureRequestEditWithTemplate.ts deleted file mode 100644 index d18720403..000000000 --- a/examples/SignatureRequestEditWithTemplate.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestEditWithTemplate( - signatureRequestId, - data -); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestEditWithTemplateExample.cs b/examples/SignatureRequestEditWithTemplateExample.cs new file mode 100644 index 000000000..172f24b6c --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( + name: "Cost", + editor: "Client", + required: true, + value: "$20,000" + ); + + var customFields = new List + { + customFields1, + }; + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditWithTemplateRequest: signatureRequestEditWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestEditWithTemplateExample.java b/examples/SignatureRequestEditWithTemplateExample.java new file mode 100644 index 000000000..d755e4e03 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.java @@ -0,0 +1,88 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); + signatureRequestEditWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditWithTemplateRequest.testMode(true); + signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditWithTemplateRequest.signers(signers); + signatureRequestEditWithTemplateRequest.ccs(ccs); + signatureRequestEditWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); + 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/SignatureRequestEditWithTemplateExample.php b/examples/SignatureRequestEditWithTemplateExample.php new file mode 100644 index 000000000..a6f2c9f10 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_edit_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request: $signature_request_edit_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestEditWithTemplateExample.py b/examples/SignatureRequestEditWithTemplateExample.py new file mode 100644 index 000000000..4e8653475 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.py @@ -0,0 +1,72 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( + name="Cost", + editor="Client", + required=True, + value="$20,000", + ) + + custom_fields = [ + custom_fields_1, + ] + + signature_request_edit_with_template_request = models.SignatureRequestEditWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request=signature_request_edit_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_with_template: %s\n" % e) diff --git a/examples/SignatureRequestEditWithTemplateExample.rb b/examples/SignatureRequestEditWithTemplateExample.rb new file mode 100644 index 000000000..f3c2d8ed6 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.rb @@ -0,0 +1,64 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_edit_with_template_request = Dropbox::Sign::SignatureRequestEditWithTemplateRequest.new +signature_request_edit_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_edit_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_with_template_request.subject = "Purchase Order" +signature_request_edit_with_template_request.test_mode = true +signature_request_edit_with_template_request.signing_options = signing_options +signature_request_edit_with_template_request.signers = signers +signature_request_edit_with_template_request.ccs = ccs +signature_request_edit_with_template_request.custom_fields = custom_fields + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_with_template: #{e}" +end diff --git a/examples/SignatureRequestEditWithTemplate.sh b/examples/SignatureRequestEditWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestEditWithTemplate.sh rename to examples/SignatureRequestEditWithTemplateExample.sh diff --git a/examples/SignatureRequestEditWithTemplateExample.ts b/examples/SignatureRequestEditWithTemplateExample.ts new file mode 100644 index 000000000..f8e8cd074 --- /dev/null +++ b/examples/SignatureRequestEditWithTemplateExample.ts @@ -0,0 +1,68 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestEditWithTemplateRequest: models.SignatureRequestEditWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFiles.cs b/examples/SignatureRequestFiles.cs deleted file mode 100644 index d9ceb40a6..000000000 --- a/examples/SignatureRequestFiles.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = signatureRequestApi.SignatureRequestFiles(signatureRequestId, "pdf"); - - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); - fileStream.Close(); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestFiles.java b/examples/SignatureRequestFiles.java deleted file mode 100644 index ca70f2321..000000000 --- a/examples/SignatureRequestFiles.java +++ /dev/null @@ -1,34 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -import java.io.File; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - File result = signatureRequestApi.signatureRequestFiles(signatureRequestId, "pdf"); - result.renameTo(new File("file_response.pdf")); - } 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/SignatureRequestFiles.js b/examples/SignatureRequestFiles.js deleted file mode 100644 index 309fea4d9..000000000 --- a/examples/SignatureRequestFiles.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; - -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); - -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFiles.php b/examples/SignatureRequestFiles.php deleted file mode 100644 index 9fc70c7c2..000000000 --- a/examples/SignatureRequestFiles.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -$fileType = "pdf"; - -try { - $result = $signatureRequestApi->signatureRequestFiles($signatureRequestId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFiles.py b/examples/SignatureRequestFiles.py deleted file mode 100644 index 1c32d32c4..000000000 --- a/examples/SignatureRequestFiles.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = signature_request_api.signature_request_files( - signature_request_id, file_type="pdf" - ) - open("file_response.pdf", "wb").write(response.read()) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFiles.rb b/examples/SignatureRequestFiles.rb deleted file mode 100644 index 171082637..000000000 --- a/examples/SignatureRequestFiles.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - file_bin = signature_request_api.signature_request_files(signature_request_id) - FileUtils.cp(file_bin.path, "path/to/file.pdf") -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestFiles.ts b/examples/SignatureRequestFiles.ts deleted file mode 100644 index 309fea4d9..000000000 --- a/examples/SignatureRequestFiles.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; - -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); - -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUri.cs b/examples/SignatureRequestFilesAsDataUri.cs deleted file mode 100644 index 5ca7ca5bc..000000000 --- a/examples/SignatureRequestFilesAsDataUri.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = signatureRequestApi.SignatureRequestFilesAsDataUri(signatureRequestId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestFilesAsDataUri.java b/examples/SignatureRequestFilesAsDataUri.java deleted file mode 100644 index b90222308..000000000 --- a/examples/SignatureRequestFilesAsDataUri.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - FileResponseDataUri result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); - 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/SignatureRequestFilesAsDataUri.js b/examples/SignatureRequestFilesAsDataUri.js deleted file mode 100644 index 6836ecc1a..000000000 --- a/examples/SignatureRequestFilesAsDataUri.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUri.php b/examples/SignatureRequestFilesAsDataUri.php deleted file mode 100644 index 7ae6b9df1..000000000 --- a/examples/SignatureRequestFilesAsDataUri.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestFilesAsDataUri($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFilesAsDataUri.py b/examples/SignatureRequestFilesAsDataUri.py deleted file mode 100644 index 46bb01562..000000000 --- a/examples/SignatureRequestFilesAsDataUri.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = signature_request_api.signature_request_files_as_data_uri( - signature_request_id - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsDataUri.rb b/examples/SignatureRequestFilesAsDataUri.rb deleted file mode 100644 index b95c37443..000000000 --- a/examples/SignatureRequestFilesAsDataUri.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - result = signature_request_api.signature_request_files_as_data_uri(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestFilesAsDataUri.ts b/examples/SignatureRequestFilesAsDataUri.ts deleted file mode 100644 index 6836ecc1a..000000000 --- a/examples/SignatureRequestFilesAsDataUri.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsDataUriExample.cs b/examples/SignatureRequestFilesAsDataUriExample.cs new file mode 100644 index 000000000..60f837089 --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsDataUriExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFilesAsDataUri( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsDataUri: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestFilesAsDataUriExample.java b/examples/SignatureRequestFilesAsDataUriExample.java new file mode 100644 index 000000000..a7e5a36e8 --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); + 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/SignatureRequestFilesAsDataUriExample.php b/examples/SignatureRequestFilesAsDataUriExample.php new file mode 100644 index 000000000..0d8d71902 --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsDataUri( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFilesAsDataUriExample.py b/examples/SignatureRequestFilesAsDataUriExample.py new file mode 100644 index 000000000..09a50923d --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files_as_data_uri( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsDataUriExample.rb b/examples/SignatureRequestFilesAsDataUriExample.rb new file mode 100644 index 000000000..9f9390e41 --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_data_uri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: #{e}" +end diff --git a/examples/SignatureRequestFilesAsDataUri.sh b/examples/SignatureRequestFilesAsDataUriExample.sh similarity index 100% rename from examples/SignatureRequestFilesAsDataUri.sh rename to examples/SignatureRequestFilesAsDataUriExample.sh diff --git a/examples/SignatureRequestFilesAsDataUriExample.ts b/examples/SignatureRequestFilesAsDataUriExample.ts new file mode 100644 index 000000000..58630aeaa --- /dev/null +++ b/examples/SignatureRequestFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFilesAsFileUrl.cs b/examples/SignatureRequestFilesAsFileUrl.cs deleted file mode 100644 index b3e92efd1..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = signatureRequestApi.SignatureRequestFilesAsFileUrl(signatureRequestId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestFilesAsFileUrl.java b/examples/SignatureRequestFilesAsFileUrl.java deleted file mode 100644 index 7bf3b9907..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - FileResponse result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); - 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/SignatureRequestFilesAsFileUrl.js b/examples/SignatureRequestFilesAsFileUrl.js deleted file mode 100644 index bb866605d..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsFileUrl.php b/examples/SignatureRequestFilesAsFileUrl.php deleted file mode 100644 index 91af0a41c..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestFilesAsFileUrl($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestFilesAsFileUrl.py b/examples/SignatureRequestFilesAsFileUrl.py deleted file mode 100644 index 9c6a5da4f..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = signature_request_api.signature_request_files_as_file_url( - signature_request_id - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsFileUrl.rb b/examples/SignatureRequestFilesAsFileUrl.rb deleted file mode 100644 index a4294a288..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - result = signature_request_api.signature_request_files_as_file_url(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestFilesAsFileUrl.ts b/examples/SignatureRequestFilesAsFileUrl.ts deleted file mode 100644 index bb866605d..000000000 --- a/examples/SignatureRequestFilesAsFileUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestFilesAsFileUrlExample.cs b/examples/SignatureRequestFilesAsFileUrlExample.cs new file mode 100644 index 000000000..f3bfe667a --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsFileUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFilesAsFileUrl( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + forceDownload: 1 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsFileUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestFilesAsFileUrlExample.java b/examples/SignatureRequestFilesAsFileUrlExample.java new file mode 100644 index 000000000..2a024ee7d --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); + 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/SignatureRequestFilesAsFileUrlExample.php b/examples/SignatureRequestFilesAsFileUrlExample.php new file mode 100644 index 000000000..feb6ac055 --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsFileUrl( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFilesAsFileUrlExample.py b/examples/SignatureRequestFilesAsFileUrlExample.py new file mode 100644 index 000000000..9cd19e6db --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files_as_file_url( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download=1, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files_as_file_url: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsFileUrlExample.rb b/examples/SignatureRequestFilesAsFileUrlExample.rb new file mode 100644 index 000000000..14abf28bf --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_file_url( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + force_download: 1, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files_as_file_url: #{e}" +end diff --git a/examples/SignatureRequestFilesAsFileUrl.sh b/examples/SignatureRequestFilesAsFileUrlExample.sh similarity index 100% rename from examples/SignatureRequestFilesAsFileUrl.sh rename to examples/SignatureRequestFilesAsFileUrlExample.sh diff --git a/examples/SignatureRequestFilesAsFileUrlExample.ts b/examples/SignatureRequestFilesAsFileUrlExample.ts new file mode 100644 index 000000000..5ca65d932 --- /dev/null +++ b/examples/SignatureRequestFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestFilesExample.cs b/examples/SignatureRequestFilesExample.cs new file mode 100644 index 000000000..879127eda --- /dev/null +++ b/examples/SignatureRequestFilesExample.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFiles( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + fileType: "pdf" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestFilesExample.java b/examples/SignatureRequestFilesExample.java new file mode 100644 index 000000000..53e828103 --- /dev/null +++ b/examples/SignatureRequestFilesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf" // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); + 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/SignatureRequestFilesExample.php b/examples/SignatureRequestFilesExample.php new file mode 100644 index 000000000..b11f5ae30 --- /dev/null +++ b/examples/SignatureRequestFilesExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFiles( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type: "pdf", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFiles: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestFilesExample.py b/examples/SignatureRequestFilesExample.py new file mode 100644 index 000000000..12694cc53 --- /dev/null +++ b/examples/SignatureRequestFilesExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type="pdf", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files: %s\n" % e) diff --git a/examples/SignatureRequestFilesExample.rb b/examples/SignatureRequestFilesExample.rb new file mode 100644 index 000000000..1d891d696 --- /dev/null +++ b/examples/SignatureRequestFilesExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + file_type: "pdf", + }, + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files: #{e}" +end diff --git a/examples/SignatureRequestFiles.sh b/examples/SignatureRequestFilesExample.sh similarity index 100% rename from examples/SignatureRequestFiles.sh rename to examples/SignatureRequestFilesExample.sh diff --git a/examples/SignatureRequestFilesExample.ts b/examples/SignatureRequestFilesExample.ts new file mode 100644 index 000000000..88762904f --- /dev/null +++ b/examples/SignatureRequestFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf", // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFiles:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestGet.cs b/examples/SignatureRequestGet.cs deleted file mode 100644 index 33425be0a..000000000 --- a/examples/SignatureRequestGet.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try - { - var result = signatureRequestApi.SignatureRequestGet(signatureRequestId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestGet.java b/examples/SignatureRequestGet.java deleted file mode 100644 index 78e4af53c..000000000 --- a/examples/SignatureRequestGet.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestGet(signatureRequestId); - 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/SignatureRequestGet.js b/examples/SignatureRequestGet.js deleted file mode 100644 index 894f53bcc..000000000 --- a/examples/SignatureRequestGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestGet.php b/examples/SignatureRequestGet.php deleted file mode 100644 index a7eed1bb0..000000000 --- a/examples/SignatureRequestGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -try { - $result = $signatureRequestApi->signatureRequestGet($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestGet.py b/examples/SignatureRequestGet.py deleted file mode 100644 index 50d34099e..000000000 --- a/examples/SignatureRequestGet.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - - try: - response = signature_request_api.signature_request_get(signature_request_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestGet.rb b/examples/SignatureRequestGet.rb deleted file mode 100644 index 35721b8f9..000000000 --- a/examples/SignatureRequestGet.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -begin - result = signature_request_api.signature_request_get(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestGet.ts b/examples/SignatureRequestGet.ts deleted file mode 100644 index 894f53bcc..000000000 --- a/examples/SignatureRequestGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestGetExample.cs b/examples/SignatureRequestGetExample.cs new file mode 100644 index 000000000..388861f1f --- /dev/null +++ b/examples/SignatureRequestGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestGet( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestGetExample.java b/examples/SignatureRequestGetExample.java new file mode 100644 index 000000000..dc912723d --- /dev/null +++ b/examples/SignatureRequestGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); + 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/SignatureRequestGetExample.php b/examples/SignatureRequestGetExample.php new file mode 100644 index 000000000..dfb79eda9 --- /dev/null +++ b/examples/SignatureRequestGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestGetExample.py b/examples/SignatureRequestGetExample.py new file mode 100644 index 000000000..47359ef9c --- /dev/null +++ b/examples/SignatureRequestGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_get( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_get: %s\n" % e) diff --git a/examples/SignatureRequestGetExample.rb b/examples/SignatureRequestGetExample.rb new file mode 100644 index 000000000..6399f34f6 --- /dev/null +++ b/examples/SignatureRequestGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_get: #{e}" +end diff --git a/examples/SignatureRequestGet.sh b/examples/SignatureRequestGetExample.sh similarity index 100% rename from examples/SignatureRequestGet.sh rename to examples/SignatureRequestGetExample.sh diff --git a/examples/SignatureRequestGetExample.ts b/examples/SignatureRequestGetExample.ts new file mode 100644 index 000000000..05ea209b6 --- /dev/null +++ b/examples/SignatureRequestGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestList.cs b/examples/SignatureRequestList.cs deleted file mode 100644 index 56129479b..000000000 --- a/examples/SignatureRequestList.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var accountId = "accountId"; - - try - { - var result = signatureRequestApi.SignatureRequestList(accountId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestList.java b/examples/SignatureRequestList.java deleted file mode 100644 index 1afcd8b34..000000000 --- a/examples/SignatureRequestList.java +++ /dev/null @@ -1,41 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var accountId = "accountId"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - SignatureRequestListResponse result = signatureRequestApi.signatureRequestList( - accountId, - page, - pageSize, - query - ); - 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/SignatureRequestList.js b/examples/SignatureRequestList.js deleted file mode 100644 index a25f34433..000000000 --- a/examples/SignatureRequestList.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestList.php b/examples/SignatureRequestList.php deleted file mode 100644 index 16ef2306e..000000000 --- a/examples/SignatureRequestList.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$accountId = null; -$page = 1; - -try { - $result = $signatureRequestApi->signatureRequestList($accountId, $page); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestList.py b/examples/SignatureRequestList.py deleted file mode 100644 index b35f92b06..000000000 --- a/examples/SignatureRequestList.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - account_id = None - page = 1 - - try: - response = signature_request_api.signature_request_list( - account_id=account_id, - page=page, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestList.rb b/examples/SignatureRequestList.rb deleted file mode 100644 index 30a4c49fd..000000000 --- a/examples/SignatureRequestList.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -account_id = null -page = 1 - -begin - result = signature_request_api.signature_request_list({ account_id: account_id, page: page }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestList.ts b/examples/SignatureRequestList.ts deleted file mode 100644 index a25f34433..000000000 --- a/examples/SignatureRequestList.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestListExample.cs b/examples/SignatureRequestListExample.cs new file mode 100644 index 000000000..8092e5330 --- /dev/null +++ b/examples/SignatureRequestListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestListExample.java b/examples/SignatureRequestListExample.java new file mode 100644 index 000000000..72048a036 --- /dev/null +++ b/examples/SignatureRequestListExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); + 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/SignatureRequestListExample.php b/examples/SignatureRequestListExample.php new file mode 100644 index 000000000..9cf737c26 --- /dev/null +++ b/examples/SignatureRequestListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestList: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestListExample.py b/examples/SignatureRequestListExample.py new file mode 100644 index 000000000..3255d2cc6 --- /dev/null +++ b/examples/SignatureRequestListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_list: %s\n" % e) diff --git a/examples/SignatureRequestListExample.rb b/examples/SignatureRequestListExample.rb new file mode 100644 index 000000000..2fcc01276 --- /dev/null +++ b/examples/SignatureRequestListExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_list: #{e}" +end diff --git a/examples/SignatureRequestList.sh b/examples/SignatureRequestListExample.sh similarity index 100% rename from examples/SignatureRequestList.sh rename to examples/SignatureRequestListExample.sh diff --git a/examples/SignatureRequestListExample.ts b/examples/SignatureRequestListExample.ts new file mode 100644 index 000000000..20d63eddb --- /dev/null +++ b/examples/SignatureRequestListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestList:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestReleaseHold.cs b/examples/SignatureRequestReleaseHold.cs deleted file mode 100644 index 5819bb9a7..000000000 --- a/examples/SignatureRequestReleaseHold.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestReleaseHold(signatureRequestId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestReleaseHold.java b/examples/SignatureRequestReleaseHold.java deleted file mode 100644 index c17085aca..000000000 --- a/examples/SignatureRequestReleaseHold.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); - 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/SignatureRequestReleaseHold.js b/examples/SignatureRequestReleaseHold.js deleted file mode 100644 index be4707943..000000000 --- a/examples/SignatureRequestReleaseHold.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestReleaseHold.php b/examples/SignatureRequestReleaseHold.php deleted file mode 100644 index cfaf1104b..000000000 --- a/examples/SignatureRequestReleaseHold.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestReleaseHold($signatureRequestId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestReleaseHold.py b/examples/SignatureRequestReleaseHold.py deleted file mode 100644 index 4f6b26a0b..000000000 --- a/examples/SignatureRequestReleaseHold.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_release_hold( - signature_request_id - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestReleaseHold.rb b/examples/SignatureRequestReleaseHold.rb deleted file mode 100644 index e31f863fd..000000000 --- a/examples/SignatureRequestReleaseHold.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_release_hold(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestReleaseHold.ts b/examples/SignatureRequestReleaseHold.ts deleted file mode 100644 index be4707943..000000000 --- a/examples/SignatureRequestReleaseHold.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestReleaseHoldExample.cs b/examples/SignatureRequestReleaseHoldExample.cs new file mode 100644 index 000000000..9b64cd74c --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestReleaseHoldExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestReleaseHold( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestReleaseHold: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestReleaseHoldExample.java b/examples/SignatureRequestReleaseHoldExample.java new file mode 100644 index 000000000..a7fd42c40 --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestReleaseHoldExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); + 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/SignatureRequestReleaseHoldExample.php b/examples/SignatureRequestReleaseHoldExample.php new file mode 100644 index 000000000..dcbbd1b31 --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestReleaseHold( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestReleaseHold: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestReleaseHoldExample.py b/examples/SignatureRequestReleaseHoldExample.py new file mode 100644 index 000000000..e584b4fd2 --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_release_hold( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_release_hold: %s\n" % e) diff --git a/examples/SignatureRequestReleaseHoldExample.rb b/examples/SignatureRequestReleaseHoldExample.rb new file mode 100644 index 000000000..422ab2d05 --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_release_hold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_release_hold: #{e}" +end diff --git a/examples/SignatureRequestReleaseHold.sh b/examples/SignatureRequestReleaseHoldExample.sh similarity index 100% rename from examples/SignatureRequestReleaseHold.sh rename to examples/SignatureRequestReleaseHoldExample.sh diff --git a/examples/SignatureRequestReleaseHoldExample.ts b/examples/SignatureRequestReleaseHoldExample.ts new file mode 100644 index 000000000..3dca1e10d --- /dev/null +++ b/examples/SignatureRequestReleaseHoldExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestReleaseHold:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestRemind.cs b/examples/SignatureRequestRemind.cs deleted file mode 100644 index 1dc8f6d68..000000000 --- a/examples/SignatureRequestRemind.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var data = new SignatureRequestRemindRequest( - emailAddress: "john@example.com" - ); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - var result = signatureRequestApi.SignatureRequestRemind(signatureRequestId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestRemind.java b/examples/SignatureRequestRemind.java deleted file mode 100644 index be5d42a1a..000000000 --- a/examples/SignatureRequestRemind.java +++ /dev/null @@ -1,36 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestRemindRequest() - .emailAddress("john@example.com"); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); - 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/SignatureRequestRemind.js b/examples/SignatureRequestRemind.js deleted file mode 100644 index 3e582ed72..000000000 --- a/examples/SignatureRequestRemind.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemind.php b/examples/SignatureRequestRemind.php deleted file mode 100644 index 059803134..000000000 --- a/examples/SignatureRequestRemind.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestRemindRequest(); -$data->setEmailAddress("john@example.com"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestRemind($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestRemind.py b/examples/SignatureRequestRemind.py deleted file mode 100644 index 52d093fe8..000000000 --- a/examples/SignatureRequestRemind.py +++ /dev/null @@ -1,27 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestRemindRequest( - email_address="john@example.com", - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_remind( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestRemind.rb b/examples/SignatureRequestRemind.rb deleted file mode 100644 index 10979a437..000000000 --- a/examples/SignatureRequestRemind.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -data = Dropbox::Sign::SignatureRequestRemindRequest.new -data.email_address = "john@example.com" - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_remind(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestRemind.ts b/examples/SignatureRequestRemind.ts deleted file mode 100644 index cfe7cef10..000000000 --- a/examples/SignatureRequestRemind.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestRemindRequest = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemindExample.cs b/examples/SignatureRequestRemindExample.cs new file mode 100644 index 000000000..bef1acbf1 --- /dev/null +++ b/examples/SignatureRequestRemindExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemindExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest( + emailAddress: "john@example.com" + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestRemind( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestRemindRequest: signatureRequestRemindRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemind: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestRemindExample.java b/examples/SignatureRequestRemindExample.java new file mode 100644 index 000000000..ce292ba16 --- /dev/null +++ b/examples/SignatureRequestRemindExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemindExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); + signatureRequestRemindRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); + 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/SignatureRequestRemindExample.php b/examples/SignatureRequestRemindExample.php new file mode 100644 index 000000000..10b5086a4 --- /dev/null +++ b/examples/SignatureRequestRemindExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_remind_request = (new Dropbox\Sign\Model\SignatureRequestRemindRequest()) + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemind( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request: $signature_request_remind_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemind: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestRemindExample.py b/examples/SignatureRequestRemindExample.py new file mode 100644 index 000000000..048db3092 --- /dev/null +++ b/examples/SignatureRequestRemindExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signature_request_remind_request = models.SignatureRequestRemindRequest( + email_address="john@example.com", + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_remind( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request=signature_request_remind_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_remind: %s\n" % e) diff --git a/examples/SignatureRequestRemindExample.rb b/examples/SignatureRequestRemindExample.rb new file mode 100644 index 000000000..722928d9e --- /dev/null +++ b/examples/SignatureRequestRemindExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signature_request_remind_request = Dropbox::Sign::SignatureRequestRemindRequest.new +signature_request_remind_request.email_address = "john@example.com" + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_remind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_remind_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_remind: #{e}" +end diff --git a/examples/SignatureRequestRemind.sh b/examples/SignatureRequestRemindExample.sh similarity index 100% rename from examples/SignatureRequestRemind.sh rename to examples/SignatureRequestRemindExample.sh diff --git a/examples/SignatureRequestRemindExample.ts b/examples/SignatureRequestRemindExample.ts new file mode 100644 index 000000000..4801d7087 --- /dev/null +++ b/examples/SignatureRequestRemindExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestRemindRequest: models.SignatureRequestRemindRequest = { + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemind:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestRemove.cs b/examples/SignatureRequestRemove.cs deleted file mode 100644 index f60968345..000000000 --- a/examples/SignatureRequestRemove.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try - { - signatureRequestApi.SignatureRequestRemove(signatureRequestId); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestRemove.java b/examples/SignatureRequestRemove.java deleted file mode 100644 index 90ba45bf3..000000000 --- a/examples/SignatureRequestRemove.java +++ /dev/null @@ -1,31 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - try { - signatureRequestApi.signatureRequestRemove(signatureRequestId); - } 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/SignatureRequestRemove.js b/examples/SignatureRequestRemove.js deleted file mode 100644 index 189a44578..000000000 --- a/examples/SignatureRequestRemove.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemove.php b/examples/SignatureRequestRemove.php deleted file mode 100644 index ad60276c6..000000000 --- a/examples/SignatureRequestRemove.php +++ /dev/null @@ -1,20 +0,0 @@ -setUsername("YOUR_API_KEY"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $signatureRequestApi->signatureRequestRemove($signatureRequestId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestRemove.py b/examples/SignatureRequestRemove.py deleted file mode 100644 index 0663bf869..000000000 --- a/examples/SignatureRequestRemove.py +++ /dev/null @@ -1,18 +0,0 @@ -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - signature_request_api.signature_request_remove(signature_request_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestRemove.rb b/examples/SignatureRequestRemove.rb deleted file mode 100644 index 63937f53e..000000000 --- a/examples/SignatureRequestRemove.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_remove(signature_request_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestRemove.ts b/examples/SignatureRequestRemove.ts deleted file mode 100644 index 189a44578..000000000 --- a/examples/SignatureRequestRemove.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestRemoveExample.cs b/examples/SignatureRequestRemoveExample.cs new file mode 100644 index 000000000..f0b9cf86e --- /dev/null +++ b/examples/SignatureRequestRemoveExample.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemoveExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + new SignatureRequestApi(config).SignatureRequestRemove( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemove: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestRemoveExample.java b/examples/SignatureRequestRemoveExample.java new file mode 100644 index 000000000..e9b030a26 --- /dev/null +++ b/examples/SignatureRequestRemoveExample.java @@ -0,0 +1,38 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemoveExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new SignatureRequestApi(config).signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); + 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/SignatureRequestRemoveExample.php b/examples/SignatureRequestRemoveExample.php new file mode 100644 index 000000000..87ecc7e6f --- /dev/null +++ b/examples/SignatureRequestRemoveExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemove( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemove: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestRemoveExample.py b/examples/SignatureRequestRemoveExample.py new file mode 100644 index 000000000..3a380080b --- /dev/null +++ b/examples/SignatureRequestRemoveExample.py @@ -0,0 +1,17 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + api.SignatureRequestApi(api_client).signature_request_remove( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_remove: %s\n" % e) diff --git a/examples/SignatureRequestRemoveExample.rb b/examples/SignatureRequestRemoveExample.rb new file mode 100644 index 000000000..7940519df --- /dev/null +++ b/examples/SignatureRequestRemoveExample.rb @@ -0,0 +1,14 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + Dropbox::Sign::SignatureRequestApi.new.signature_request_remove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_remove: #{e}" +end diff --git a/examples/SignatureRequestRemove.sh b/examples/SignatureRequestRemoveExample.sh similarity index 100% rename from examples/SignatureRequestRemove.sh rename to examples/SignatureRequestRemoveExample.sh diff --git a/examples/SignatureRequestRemoveExample.ts b/examples/SignatureRequestRemoveExample.ts new file mode 100644 index 000000000..7f76eb5a2 --- /dev/null +++ b/examples/SignatureRequestRemoveExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemove:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSend.cs b/examples/SignatureRequestSend.cs deleted file mode 100644 index c1d45d1f1..000000000 --- a/examples/SignatureRequestSend.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var metadata = new Dictionary() - { - ["custom_id"] = 1234, - ["custom_text"] = "NDA #9" - }; - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new SignatureRequestSendRequest( - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - metadata: metadata, - signingOptions: signingOptions, - fieldOptions: subFieldOptions, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestSend(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestSend.java b/examples/SignatureRequestSend.java deleted file mode 100644 index 4382c852b..000000000 --- a/examples/SignatureRequestSend.java +++ /dev/null @@ -1,67 +0,0 @@ -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; -import java.util.List; -import java.util.Map; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new SignatureRequestSendRequest() - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(signingOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSend(data); - 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/SignatureRequestSend.js b/examples/SignatureRequestSend.js deleted file mode 100644 index 1735a30a9..000000000 --- a/examples/SignatureRequestSend.js +++ /dev/null @@ -1,82 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSend.php b/examples/SignatureRequestSend.php deleted file mode 100644 index 419d7acd9..000000000 --- a/examples/SignatureRequestSend.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\SignatureRequestSendRequest(); -$data->setTitle("NDA with Acme Co.") - ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestSend($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestSend.py b/examples/SignatureRequestSend.py deleted file mode 100644 index 74a624e5d..000000000 --- a/examples/SignatureRequestSend.py +++ /dev/null @@ -1,62 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=True, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.SignatureRequestSendRequest( - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_send(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestSend.rb b/examples/SignatureRequestSend.rb deleted file mode 100644 index d6981f2b2..000000000 --- a/examples/SignatureRequestSend.rb +++ /dev/null @@ -1,56 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::SignatureRequestSendRequest.new -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", -] -data.files = [File.new("example_signature_request.pdf", "r")] -data.metadata = { - custom_id: 1234, - custom_text: "NDA #9", -} -data.signing_options = signing_options -data.field_options = field_options -data.test_mode = true - -begin - result = signature_request_api.signature_request_send(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestSend.ts b/examples/SignatureRequestSend.ts deleted file mode 100644 index ca321ca9a..000000000 --- a/examples/SignatureRequestSend.ts +++ /dev/null @@ -1,82 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestSendRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendExample.cs b/examples/SignatureRequestSendExample.cs new file mode 100644 index 000000000..2958c264c --- /dev/null +++ b/examples/SignatureRequestSendExample.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestSendRequest = new SignatureRequestSendRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSend( + signatureRequestSendRequest: signatureRequestSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestSendExample.java b/examples/SignatureRequestSendExample.java new file mode 100644 index 000000000..313b895b7 --- /dev/null +++ b/examples/SignatureRequestSendExample.java @@ -0,0 +1,88 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); + 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/SignatureRequestSendExample.php b/examples/SignatureRequestSendExample.php new file mode 100644 index 000000000..f922a579e --- /dev/null +++ b/examples/SignatureRequestSendExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSendExample.py b/examples/SignatureRequestSendExample.py new file mode 100644 index 000000000..21b1bfc26 --- /dev/null +++ b/examples/SignatureRequestSendExample.py @@ -0,0 +1,72 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_send_request = models.SignatureRequestSendRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send( + signature_request_send_request=signature_request_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send: %s\n" % e) diff --git a/examples/SignatureRequestSendExample.rb b/examples/SignatureRequestSendExample.rb new file mode 100644 index 000000000..28905902d --- /dev/null +++ b/examples/SignatureRequestSendExample.rb @@ -0,0 +1,65 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new +signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_send_request.subject = "The NDA we talked about" +signature_request_send_request.test_mode = true +signature_request_send_request.title = "NDA with Acme Co." +signature_request_send_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_send_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_send_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_send_request.field_options = field_options +signature_request_send_request.signing_options = signing_options +signature_request_send_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( + signature_request_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send: #{e}" +end diff --git a/examples/SignatureRequestSend.sh b/examples/SignatureRequestSendExample.sh similarity index 100% rename from examples/SignatureRequestSend.sh rename to examples/SignatureRequestSendExample.sh diff --git a/examples/SignatureRequestSendExample.ts b/examples/SignatureRequestSendExample.ts new file mode 100644 index 000000000..910a66743 --- /dev/null +++ b/examples/SignatureRequestSendExample.ts @@ -0,0 +1,66 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSendGroupedSignersExample.cs b/examples/SignatureRequestSendGroupedSignersExample.cs new file mode 100644 index 000000000..8263d9170 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestSendRequest = new SignatureRequestSendRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSend( + signatureRequestSendRequest: signatureRequestSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestSendGroupedSignersExample.java b/examples/SignatureRequestSendGroupedSignersExample.java new file mode 100644 index 000000000..ba078573a --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.java @@ -0,0 +1,114 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); + 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/SignatureRequestSendGroupedSignersExample.php b/examples/SignatureRequestSendGroupedSignersExample.php new file mode 100644 index 000000000..bec0368b8 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.php @@ -0,0 +1,95 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSendGroupedSignersExample.py b/examples/SignatureRequestSendGroupedSignersExample.py new file mode 100644 index 000000000..3a7e649c6 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.py @@ -0,0 +1,102 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_send_request = models.SignatureRequestSendRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send( + signature_request_send_request=signature_request_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send: %s\n" % e) diff --git a/examples/SignatureRequestSendGroupedSignersExample.rb b/examples/SignatureRequestSendGroupedSignersExample.rb new file mode 100644 index 000000000..dec38e89c --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.rb @@ -0,0 +1,91 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new +signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_send_request.subject = "The NDA we talked about" +signature_request_send_request.test_mode = true +signature_request_send_request.title = "NDA with Acme Co." +signature_request_send_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_send_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_send_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_send_request.field_options = field_options +signature_request_send_request.signing_options = signing_options +signature_request_send_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( + signature_request_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send: #{e}" +end diff --git a/examples/SignatureRequestSendGroupedSignersExample.ts b/examples/SignatureRequestSendGroupedSignersExample.ts new file mode 100644 index 000000000..110567251 --- /dev/null +++ b/examples/SignatureRequestSendGroupedSignersExample.ts @@ -0,0 +1,96 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestSendWithTemplate.cs b/examples/SignatureRequestSendWithTemplate.cs deleted file mode 100644 index 7c78edcc2..000000000 --- a/examples/SignatureRequestSendWithTemplate.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestTemplateSigner( - role: "Client", - emailAddress: "george@example.com", - name: "George" - ); - - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@emaple.com" - ); - - var customField1 = new SubCustomField( - name: "Cost", - value: "$20,000", - editor: "Client", - required: true - ); - - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var data = new SignatureRequestSendWithTemplateRequest( - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - ccs: new List(){cc1}, - customFields: new List(){customField1}, - signingOptions: signingOptions, - testMode: true - ); - - try - { - var result = signatureRequestApi.SignatureRequestSendWithTemplate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestSendWithTemplate.java b/examples/SignatureRequestSendWithTemplate.java deleted file mode 100644 index 1907e4d89..000000000 --- a/examples/SignatureRequestSendWithTemplate.java +++ /dev/null @@ -1,65 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .emailAddress("george@example.com") - .name("George"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@emaple.com"); - - var customField1 = new SubCustomField() - .name("Cost") - .value("$20,000") - .editor("Client") - .required(true); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .ccs(List.of(cc1)) - .customFields(List.of(customField1)) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSendWithTemplate(data); - 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/SignatureRequestSendWithTemplate.js b/examples/SignatureRequestSendWithTemplate.js deleted file mode 100644 index cbbb998b2..000000000 --- a/examples/SignatureRequestSendWithTemplate.js +++ /dev/null @@ -1,54 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1 = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendWithTemplate.php b/examples/SignatureRequestSendWithTemplate.php deleted file mode 100644 index 665105770..000000000 --- a/examples/SignatureRequestSendWithTemplate.php +++ /dev/null @@ -1,54 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@example.com"); - -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") - ->setEditor("Client") - ->setRequired(true); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$data = new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") - ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); - -try { - $result = $signatureRequestApi->signatureRequestSendWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestSendWithTemplate.py b/examples/SignatureRequestSendWithTemplate.py deleted file mode 100644 index 239036605..000000000 --- a/examples/SignatureRequestSendWithTemplate.py +++ /dev/null @@ -1,56 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="george@example.com", - name="George", - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - custom_field_1 = models.SubCustomField( - name="Cost", - value="$20,000", - editor="Client", - required=True, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - data = models.SignatureRequestSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - ccs=[cc_1], - custom_fields=[custom_field_1], - signing_options=signing_options, - test_mode=True, - ) - - try: - response = signature_request_api.signature_request_send_with_template(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestSendWithTemplate.rb b/examples/SignatureRequestSendWithTemplate.rb deleted file mode 100644 index a31f711ab..000000000 --- a/examples/SignatureRequestSendWithTemplate.rb +++ /dev/null @@ -1,50 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "george@example.com" -signer_1.name = "George" - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -custom_field_1 = Dropbox::Sign::SubCustomField.new -custom_field_1.name = "Cost" -custom_field_1.value = "$20,000" -custom_field_1.editor = "Client" -custom_field_1.required = true - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = false -signing_options.default_type = "draw" - -data = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.ccs = [cc_1] -data.custom_fields = [custom_field_1] -data.signing_options = signing_options -data.test_mode = true - -begin - result = signature_request_api.signature_request_send_with_template(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestSendWithTemplate.ts b/examples/SignatureRequestSendWithTemplate.ts deleted file mode 100644 index 2f2135094..000000000 --- a/examples/SignatureRequestSendWithTemplate.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, -}; - -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestSendWithTemplateExample.cs b/examples/SignatureRequestSendWithTemplateExample.cs new file mode 100644 index 000000000..024b92ce8 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( + name: "Cost", + editor: "Client", + required: true, + value: "$20,000" + ); + + var customFields = new List + { + customFields1, + }; + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest: signatureRequestSendWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSendWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestSendWithTemplateExample.java b/examples/SignatureRequestSendWithTemplateExample.java new file mode 100644 index 000000000..f44a67ed9 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.java @@ -0,0 +1,87 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); + signatureRequestSendWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestSendWithTemplateRequest.testMode(true); + signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); + signatureRequestSendWithTemplateRequest.signers(signers); + signatureRequestSendWithTemplateRequest.ccs(ccs); + signatureRequestSendWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); + 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/SignatureRequestSendWithTemplateExample.php b/examples/SignatureRequestSendWithTemplateExample.php new file mode 100644 index 000000000..d68205392 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSendWithTemplate( + signature_request_send_with_template_request: $signature_request_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestSendWithTemplateExample.py b/examples/SignatureRequestSendWithTemplateExample.py new file mode 100644 index 000000000..468a6b101 --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.py @@ -0,0 +1,71 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( + name="Cost", + editor="Client", + required=True, + value="$20,000", + ) + + custom_fields = [ + custom_fields_1, + ] + + signature_request_send_with_template_request = models.SignatureRequestSendWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send_with_template( + signature_request_send_with_template_request=signature_request_send_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send_with_template: %s\n" % e) diff --git a/examples/SignatureRequestSendWithTemplateExample.rb b/examples/SignatureRequestSendWithTemplateExample.rb new file mode 100644 index 000000000..4ee78fded --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.rb @@ -0,0 +1,63 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_send_with_template_request = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new +signature_request_send_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_send_with_template_request.subject = "Purchase Order" +signature_request_send_with_template_request.test_mode = true +signature_request_send_with_template_request.signing_options = signing_options +signature_request_send_with_template_request.signers = signers +signature_request_send_with_template_request.ccs = ccs +signature_request_send_with_template_request.custom_fields = custom_fields + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send_with_template( + signature_request_send_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send_with_template: #{e}" +end diff --git a/examples/SignatureRequestSendWithTemplate.sh b/examples/SignatureRequestSendWithTemplateExample.sh similarity index 100% rename from examples/SignatureRequestSendWithTemplate.sh rename to examples/SignatureRequestSendWithTemplateExample.sh diff --git a/examples/SignatureRequestSendWithTemplateExample.ts b/examples/SignatureRequestSendWithTemplateExample.ts new file mode 100644 index 000000000..88219107a --- /dev/null +++ b/examples/SignatureRequestSendWithTemplateExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestSendWithTemplateRequest: models.SignatureRequestSendWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/SignatureRequestUpdate.cs b/examples/SignatureRequestUpdate.cs deleted file mode 100644 index b8d73b2d0..000000000 --- a/examples/SignatureRequestUpdate.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestUpdateRequest( - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3" - ); - - try - { - var result = signatureRequestApi.SignatureRequestUpdate(signatureRequestId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/SignatureRequestUpdate.java b/examples/SignatureRequestUpdate.java deleted file mode 100644 index aca14a22b..000000000 --- a/examples/SignatureRequestUpdate.java +++ /dev/null @@ -1,37 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestUpdateRequest() - .emailAddress("john@example.com") - .signatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); - 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/SignatureRequestUpdate.js b/examples/SignatureRequestUpdate.js deleted file mode 100644 index 87372e748..000000000 --- a/examples/SignatureRequestUpdate.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestUpdate.php b/examples/SignatureRequestUpdate.php deleted file mode 100644 index eda22b742..000000000 --- a/examples/SignatureRequestUpdate.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestUpdateRequest(); -$data->setEmailAddress("john@example.com") - ->setSignatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -try { - $result = $signatureRequestApi->signatureRequestUpdate($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/SignatureRequestUpdate.py b/examples/SignatureRequestUpdate.py deleted file mode 100644 index 369000092..000000000 --- a/examples/SignatureRequestUpdate.py +++ /dev/null @@ -1,28 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestUpdateRequest( - email_address="john@example.com", - signature_id="78caf2a1d01cd39cea2bc1cbb340dac3", - ) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - - try: - response = signature_request_api.signature_request_update( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestUpdate.rb b/examples/SignatureRequestUpdate.rb deleted file mode 100644 index 8294a4410..000000000 --- a/examples/SignatureRequestUpdate.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -data = Dropbox::Sign::SignatureRequestUpdateRequest.new -data.email_address = "john@example.com" -data.signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3" - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - -begin - result = signature_request_api.signature_request_update(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/SignatureRequestUpdate.ts b/examples/SignatureRequestUpdate.ts deleted file mode 100644 index 61a7c7466..000000000 --- a/examples/SignatureRequestUpdate.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestUpdateRequest = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/SignatureRequestUpdateExample.cs b/examples/SignatureRequestUpdateExample.cs new file mode 100644 index 000000000..7d9551620 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest( + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com" + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestUpdate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestUpdateRequest: signatureRequestUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/SignatureRequestUpdateExample.java b/examples/SignatureRequestUpdateExample.java new file mode 100644 index 000000000..3500c76c5 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); + signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); + signatureRequestUpdateRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); + 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/SignatureRequestUpdateExample.php b/examples/SignatureRequestUpdateExample.php new file mode 100644 index 000000000..818add598 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_update_request = (new Dropbox\Sign\Model\SignatureRequestUpdateRequest()) + ->setSignatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f") + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestUpdate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request: $signature_request_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestUpdate: {$e->getMessage()}"; +} diff --git a/examples/SignatureRequestUpdateExample.py b/examples/SignatureRequestUpdateExample.py new file mode 100644 index 000000000..0d9bc45fb --- /dev/null +++ b/examples/SignatureRequestUpdateExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signature_request_update_request = models.SignatureRequestUpdateRequest( + signature_id="2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + email_address="john@example.com", + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_update( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request=signature_request_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_update: %s\n" % e) diff --git a/examples/SignatureRequestUpdateExample.rb b/examples/SignatureRequestUpdateExample.rb new file mode 100644 index 000000000..3cac8ae67 --- /dev/null +++ b/examples/SignatureRequestUpdateExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signature_request_update_request = Dropbox::Sign::SignatureRequestUpdateRequest.new +signature_request_update_request.signature_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" +signature_request_update_request.email_address = "john@example.com" + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_update( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_update: #{e}" +end diff --git a/examples/SignatureRequestUpdate.sh b/examples/SignatureRequestUpdateExample.sh similarity index 100% rename from examples/SignatureRequestUpdate.sh rename to examples/SignatureRequestUpdateExample.sh diff --git a/examples/SignatureRequestUpdateExample.ts b/examples/SignatureRequestUpdateExample.ts new file mode 100644 index 000000000..8464618cb --- /dev/null +++ b/examples/SignatureRequestUpdateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); + console.log(error.body); +}); diff --git a/examples/TeamAddMember.cs b/examples/TeamAddMember.cs deleted file mode 100644 index 515014d8d..000000000 --- a/examples/TeamAddMember.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamAddMemberRequest( - emailAddress: "george@example.com" - ); - - try - { - var result = teamApi.TeamAddMember(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamAddMember.java b/examples/TeamAddMember.java deleted file mode 100644 index 454820932..000000000 --- a/examples/TeamAddMember.java +++ /dev/null @@ -1,36 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamAddMemberRequest() - .emailAddress("george@example.com"); - - String teamId = null; - - try { - TeamGetResponse result = teamApi.teamAddMember(data, teamId); - 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/TeamAddMember.js b/examples/TeamAddMember.js deleted file mode 100644 index eaa69ade3..000000000 --- a/examples/TeamAddMember.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamAddMember.php b/examples/TeamAddMember.php deleted file mode 100644 index 7247c83ed..000000000 --- a/examples/TeamAddMember.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamAddMemberRequest(); -$data->setEmailAddress("george@example.com"); - -try { - $result = $teamApi->teamAddMember($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamAddMember.py b/examples/TeamAddMember.py deleted file mode 100644 index 67900f458..000000000 --- a/examples/TeamAddMember.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamAddMemberRequest( - email_address="george@example.com", - ) - - try: - response = team_api.team_add_member(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamAddMember.rb b/examples/TeamAddMember.rb deleted file mode 100644 index 34b41e33c..000000000 --- a/examples/TeamAddMember.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamAddMemberRequest.new -data.email_address = "george@example.com" - -begin - result = team_api.team_add_member(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamAddMember.ts b/examples/TeamAddMember.ts deleted file mode 100644 index 8e84f240f..000000000 --- a/examples/TeamAddMember.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamAddMemberRequest = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamAddMemberAccountIdExample.cs b/examples/TeamAddMemberAccountIdExample.cs new file mode 100644 index 000000000..fe700fca7 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamAddMemberAccountIdExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamAddMemberRequest = new TeamAddMemberRequest( + accountId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + try + { + var response = new TeamApi(config).TeamAddMember( + teamAddMemberRequest: teamAddMemberRequest, + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamAddMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamAddMemberAccountIdExample.java b/examples/TeamAddMemberAccountIdExample.java new file mode 100644 index 000000000..1aea5849a --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberAccountIdExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.accountId("f57db65d3f933b5316d398057a36176831451a35"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + 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/TeamAddMemberAccountIdExample.php b/examples/TeamAddMemberAccountIdExample.php new file mode 100644 index 000000000..f864f4437 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/examples/TeamAddMemberAccountIdExample.py b/examples/TeamAddMemberAccountIdExample.py new file mode 100644 index 000000000..402e0f2c5 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_add_member_request = models.TeamAddMemberRequest( + account_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + try: + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_add_member: %s\n" % e) diff --git a/examples/TeamAddMemberAccountIdExample.rb b/examples/TeamAddMemberAccountIdExample.rb new file mode 100644 index 000000000..e19955860 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new +team_add_member_request.account_id = "f57db65d3f933b5316d398057a36176831451a35" + +begin + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_add_member: #{e}" +end diff --git a/examples/TeamAddMemberAccountIdExample.ts b/examples/TeamAddMemberAccountIdExample.ts new file mode 100644 index 000000000..1f2190b26 --- /dev/null +++ b/examples/TeamAddMemberAccountIdExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/examples/TeamAddMemberExample.cs b/examples/TeamAddMemberExample.cs new file mode 100644 index 000000000..3529c6ee0 --- /dev/null +++ b/examples/TeamAddMemberExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamAddMemberExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamAddMemberRequest = new TeamAddMemberRequest( + emailAddress: "george@example.com" + ); + + try + { + var response = new TeamApi(config).TeamAddMember( + teamAddMemberRequest: teamAddMemberRequest, + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamAddMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamAddMemberExample.java b/examples/TeamAddMemberExample.java new file mode 100644 index 000000000..6e3af4073 --- /dev/null +++ b/examples/TeamAddMemberExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + 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/TeamAddMemberExample.php b/examples/TeamAddMemberExample.php new file mode 100644 index 000000000..441e34dbe --- /dev/null +++ b/examples/TeamAddMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setEmailAddress("george@example.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/examples/TeamAddMemberExample.py b/examples/TeamAddMemberExample.py new file mode 100644 index 000000000..caef04ea5 --- /dev/null +++ b/examples/TeamAddMemberExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_add_member_request = models.TeamAddMemberRequest( + email_address="george@example.com", + ) + + try: + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_add_member: %s\n" % e) diff --git a/examples/TeamAddMemberExample.rb b/examples/TeamAddMemberExample.rb new file mode 100644 index 000000000..b312e9894 --- /dev/null +++ b/examples/TeamAddMemberExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new +team_add_member_request.email_address = "george@example.com" + +begin + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_add_member: #{e}" +end diff --git a/examples/TeamAddMember.sh b/examples/TeamAddMemberExample.sh similarity index 100% rename from examples/TeamAddMember.sh rename to examples/TeamAddMemberExample.sh diff --git a/examples/TeamAddMemberExample.ts b/examples/TeamAddMemberExample.ts new file mode 100644 index 000000000..b781f2967 --- /dev/null +++ b/examples/TeamAddMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + emailAddress: "george@example.com", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/examples/TeamCreate.cs b/examples/TeamCreate.cs deleted file mode 100644 index 78d0768be..000000000 --- a/examples/TeamCreate.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamCreateRequest( - name: "New Team Name" - ); - - try - { - var result = teamApi.TeamCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamCreate.java b/examples/TeamCreate.java deleted file mode 100644 index 0ecf2f50d..000000000 --- a/examples/TeamCreate.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamCreateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamCreate(data); - 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/TeamCreate.js b/examples/TeamCreate.js deleted file mode 100644 index e8cb5486e..000000000 --- a/examples/TeamCreate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamCreate.php b/examples/TeamCreate.php deleted file mode 100644 index 3abdac1c2..000000000 --- a/examples/TeamCreate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamCreateRequest(); -$data->setName("New Team Name"); - -try { - $result = $teamApi->teamCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamCreate.py b/examples/TeamCreate.py deleted file mode 100644 index 4c1384681..000000000 --- a/examples/TeamCreate.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamCreateRequest( - name="New Team Name", - ) - - try: - response = team_api.team_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamCreate.rb b/examples/TeamCreate.rb deleted file mode 100644 index b97bfa396..000000000 --- a/examples/TeamCreate.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamCreateRequest.new -data.name = "New Team Name" - -begin - result = team_api.team_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamCreate.ts b/examples/TeamCreate.ts deleted file mode 100644 index 8ef337f86..000000000 --- a/examples/TeamCreate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamCreateRequest = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamCreateExample.cs b/examples/TeamCreateExample.cs new file mode 100644 index 000000000..794c4627d --- /dev/null +++ b/examples/TeamCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamCreateRequest = new TeamCreateRequest( + name: "New Team Name" + ); + + try + { + var response = new TeamApi(config).TeamCreate( + teamCreateRequest: teamCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamCreateExample.java b/examples/TeamCreateExample.java new file mode 100644 index 000000000..ecfe2329d --- /dev/null +++ b/examples/TeamCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamCreate"); + 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/TeamCreateExample.php b/examples/TeamCreateExample.php new file mode 100644 index 000000000..aabcac028 --- /dev/null +++ b/examples/TeamCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; +} diff --git a/examples/TeamCreateExample.py b/examples/TeamCreateExample.py new file mode 100644 index 000000000..88772104e --- /dev/null +++ b/examples/TeamCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_create_request = models.TeamCreateRequest( + name="New Team Name", + ) + + try: + response = api.TeamApi(api_client).team_create( + team_create_request=team_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_create: %s\n" % e) diff --git a/examples/TeamCreateExample.rb b/examples/TeamCreateExample.rb new file mode 100644 index 000000000..6bac61268 --- /dev/null +++ b/examples/TeamCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_create_request = Dropbox::Sign::TeamCreateRequest.new +team_create_request.name = "New Team Name" + +begin + response = Dropbox::Sign::TeamApi.new.team_create( + team_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_create: #{e}" +end diff --git a/examples/TeamCreate.sh b/examples/TeamCreateExample.sh similarity index 100% rename from examples/TeamCreate.sh rename to examples/TeamCreateExample.sh diff --git a/examples/TeamCreateExample.ts b/examples/TeamCreateExample.ts new file mode 100644 index 000000000..03431e028 --- /dev/null +++ b/examples/TeamCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", +}; + +apiCaller.teamCreate( + teamCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamCreate:"); + console.log(error.body); +}); diff --git a/examples/TeamDelete.cs b/examples/TeamDelete.cs deleted file mode 100644 index 35eca42ff..000000000 --- a/examples/TeamDelete.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - try - { - teamApi.TeamDelete(); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamDelete.java b/examples/TeamDelete.java deleted file mode 100644 index 9f09ef6d3..000000000 --- a/examples/TeamDelete.java +++ /dev/null @@ -1,29 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - teamApi.teamDelete(); - } 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/TeamDelete.js b/examples/TeamDelete.js deleted file mode 100644 index b211e14a3..000000000 --- a/examples/TeamDelete.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamDelete.php b/examples/TeamDelete.php deleted file mode 100644 index 327fec0a6..000000000 --- a/examples/TeamDelete.php +++ /dev/null @@ -1,21 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $teamApi->teamDelete(); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamDelete.py b/examples/TeamDelete.py deleted file mode 100644 index 9548749c7..000000000 --- a/examples/TeamDelete.py +++ /dev/null @@ -1,16 +0,0 @@ -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - team_api.team_delete() - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamDelete.rb b/examples/TeamDelete.rb deleted file mode 100644 index 336f3bad4..000000000 --- a/examples/TeamDelete.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -begin - result = team_api.team_delete - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamDelete.ts b/examples/TeamDelete.ts deleted file mode 100644 index b211e14a3..000000000 --- a/examples/TeamDelete.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamDeleteExample.cs b/examples/TeamDeleteExample.cs new file mode 100644 index 000000000..b5c7a83b4 --- /dev/null +++ b/examples/TeamDeleteExample.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new TeamApi(config).TeamDelete(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamDeleteExample.java b/examples/TeamDeleteExample.java new file mode 100644 index 000000000..076a2e520 --- /dev/null +++ b/examples/TeamDeleteExample.java @@ -0,0 +1,37 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TeamApi(config).teamDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamDelete"); + 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/TeamDeleteExample.php b/examples/TeamDeleteExample.php new file mode 100644 index 000000000..9c429b748 --- /dev/null +++ b/examples/TeamDeleteExample.php @@ -0,0 +1,18 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; +} diff --git a/examples/TeamDeleteExample.py b/examples/TeamDeleteExample.py new file mode 100644 index 000000000..2da2f0be7 --- /dev/null +++ b/examples/TeamDeleteExample.py @@ -0,0 +1,16 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.TeamApi(api_client).team_delete() + except ApiException as e: + print("Exception when calling TeamApi#team_delete: %s\n" % e) diff --git a/examples/TeamDeleteExample.rb b/examples/TeamDeleteExample.rb new file mode 100644 index 000000000..729b6f794 --- /dev/null +++ b/examples/TeamDeleteExample.rb @@ -0,0 +1,13 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::TeamApi.new.team_delete +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_delete: #{e}" +end diff --git a/examples/TeamDelete.sh b/examples/TeamDeleteExample.sh similarity index 100% rename from examples/TeamDelete.sh rename to examples/TeamDeleteExample.sh diff --git a/examples/TeamDeleteExample.ts b/examples/TeamDeleteExample.ts new file mode 100644 index 000000000..c37216b0c --- /dev/null +++ b/examples/TeamDeleteExample.ts @@ -0,0 +1,12 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); + console.log(error.body); +}); diff --git a/examples/TeamGet.cs b/examples/TeamGet.cs deleted file mode 100644 index f1984f536..000000000 --- a/examples/TeamGet.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - try - { - var result = teamApi.TeamGet(); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamGet.java b/examples/TeamGet.java deleted file mode 100644 index 035014b86..000000000 --- a/examples/TeamGet.java +++ /dev/null @@ -1,31 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetResponse result = teamApi.teamGet(); - 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/TeamGet.js b/examples/TeamGet.js deleted file mode 100644 index dd1fc78da..000000000 --- a/examples/TeamGet.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamGet.php b/examples/TeamGet.php deleted file mode 100644 index ccd714dad..000000000 --- a/examples/TeamGet.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $result = $teamApi->teamGet(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamGet.py b/examples/TeamGet.py deleted file mode 100644 index 7272e46f3..000000000 --- a/examples/TeamGet.py +++ /dev/null @@ -1,19 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - response = team_api.team_get() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamGet.rb b/examples/TeamGet.rb deleted file mode 100644 index 7f3048844..000000000 --- a/examples/TeamGet.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -begin - result = team_api.team_get - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamGet.ts b/examples/TeamGet.ts deleted file mode 100644 index dd1fc78da..000000000 --- a/examples/TeamGet.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamGetExample.cs b/examples/TeamGetExample.cs new file mode 100644 index 000000000..3a79cd2a4 --- /dev/null +++ b/examples/TeamGetExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamGet(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamGetExample.java b/examples/TeamGetExample.java new file mode 100644 index 000000000..8ab6d7468 --- /dev/null +++ b/examples/TeamGetExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamGet(); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamGet"); + 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/TeamGetExample.php b/examples/TeamGetExample.php new file mode 100644 index 000000000..79c6e054d --- /dev/null +++ b/examples/TeamGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; +} diff --git a/examples/TeamGetExample.py b/examples/TeamGetExample.py new file mode 100644 index 000000000..dc0b0532e --- /dev/null +++ b/examples/TeamGetExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_get() + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_get: %s\n" % e) diff --git a/examples/TeamGetExample.rb b/examples/TeamGetExample.rb new file mode 100644 index 000000000..903822830 --- /dev/null +++ b/examples/TeamGetExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_get + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_get: #{e}" +end diff --git a/examples/TeamGet.sh b/examples/TeamGetExample.sh similarity index 100% rename from examples/TeamGet.sh rename to examples/TeamGetExample.sh diff --git a/examples/TeamGetExample.ts b/examples/TeamGetExample.ts new file mode 100644 index 000000000..65d8758fc --- /dev/null +++ b/examples/TeamGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamGet:"); + console.log(error.body); +}); diff --git a/examples/TeamInfo.cs b/examples/TeamInfo.cs deleted file mode 100644 index 284dcdfed..000000000 --- a/examples/TeamInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - try - { - var result = teamApi.TeamInfo(); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamInfo.java b/examples/TeamInfo.java deleted file mode 100644 index 94ace0c38..000000000 --- a/examples/TeamInfo.java +++ /dev/null @@ -1,31 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetInfoResponse result = teamApi.teamInfo(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamInfo"); - 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/TeamInfo.js b/examples/TeamInfo.js deleted file mode 100644 index 0e03b0f70..000000000 --- a/examples/TeamInfo.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInfo.php b/examples/TeamInfo.php deleted file mode 100644 index e43c06b72..000000000 --- a/examples/TeamInfo.php +++ /dev/null @@ -1,22 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -try { - $result = $teamApi->teamInfo(); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamInfo.py b/examples/TeamInfo.py deleted file mode 100644 index fe54802bc..000000000 --- a/examples/TeamInfo.py +++ /dev/null @@ -1,19 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - try: - response = team_api.team_info() - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamInfo.rb b/examples/TeamInfo.rb deleted file mode 100644 index a7435f0c7..000000000 --- a/examples/TeamInfo.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -begin - result = team_api.team_info - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamInfo.ts b/examples/TeamInfo.ts deleted file mode 100644 index 0e03b0f70..000000000 --- a/examples/TeamInfo.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInfoExample.cs b/examples/TeamInfoExample.cs new file mode 100644 index 000000000..a761bce3c --- /dev/null +++ b/examples/TeamInfoExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamInfoExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamInfo( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamInfo: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamInfoExample.java b/examples/TeamInfoExample.java new file mode 100644 index 000000000..6f2c882a0 --- /dev/null +++ b/examples/TeamInfoExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInfoExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInfo"); + 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/TeamInfoExample.php b/examples/TeamInfoExample.php new file mode 100644 index 000000000..c908d5182 --- /dev/null +++ b/examples/TeamInfoExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; +} diff --git a/examples/TeamInfoExample.py b/examples/TeamInfoExample.py new file mode 100644 index 000000000..994688dc2 --- /dev/null +++ b/examples/TeamInfoExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_info( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_info: %s\n" % e) diff --git a/examples/TeamInfoExample.rb b/examples/TeamInfoExample.rb new file mode 100644 index 000000000..dfe5874d5 --- /dev/null +++ b/examples/TeamInfoExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_info( + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_info: #{e}" +end diff --git a/examples/TeamInfo.sh b/examples/TeamInfoExample.sh similarity index 100% rename from examples/TeamInfo.sh rename to examples/TeamInfoExample.sh diff --git a/examples/TeamInfoExample.ts b/examples/TeamInfoExample.ts new file mode 100644 index 000000000..d0050e94c --- /dev/null +++ b/examples/TeamInfoExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInfo:"); + console.log(error.body); +}); diff --git a/examples/TeamInvites.cs b/examples/TeamInvites.cs deleted file mode 100644 index b52c3b1c5..000000000 --- a/examples/TeamInvites.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var emailAddress = "user@dropboxsign.com"; - - try - { - var result = teamApi.TeamInvites(emailAddress); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamInvites.java b/examples/TeamInvites.java deleted file mode 100644 index 56b517b17..000000000 --- a/examples/TeamInvites.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var emailAddress = "user@dropboxsign.com"; - - try { - TeamInvitesResponse result = teamApi.teamInvites(emailAddress); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); - 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/TeamInvites.js b/examples/TeamInvites.js deleted file mode 100644 index 21a250156..000000000 --- a/examples/TeamInvites.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInvites.php b/examples/TeamInvites.php deleted file mode 100644 index 2cda1469d..000000000 --- a/examples/TeamInvites.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$emailAddress = "user@dropboxsign.com"; - -try { - $result = $teamApi->teamInvites($emailAddress); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamInvites.py b/examples/TeamInvites.py deleted file mode 100644 index 898e64187..000000000 --- a/examples/TeamInvites.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - email_address = "user@dropboxsign.com" - - try: - response = team_api.team_invites(email_address=email_address) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamInvites.rb b/examples/TeamInvites.rb deleted file mode 100644 index 7294ea425..000000000 --- a/examples/TeamInvites.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -email_address = "user@dropboxsign.com" - -begin - result = team_api.team_invites({ email_address: email_address }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamInvites.ts b/examples/TeamInvites.ts deleted file mode 100644 index 21a250156..000000000 --- a/examples/TeamInvites.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamInvitesExample.cs b/examples/TeamInvitesExample.cs new file mode 100644 index 000000000..90454cbac --- /dev/null +++ b/examples/TeamInvitesExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamInvitesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamInvites(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamInvites: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamInvitesExample.java b/examples/TeamInvitesExample.java new file mode 100644 index 000000000..f6d2b55c1 --- /dev/null +++ b/examples/TeamInvitesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInvitesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInvites( + null // emailAddress + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInvites"); + 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/TeamInvitesExample.php b/examples/TeamInvitesExample.php new file mode 100644 index 000000000..db9459376 --- /dev/null +++ b/examples/TeamInvitesExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; +} diff --git a/examples/TeamInvitesExample.py b/examples/TeamInvitesExample.py new file mode 100644 index 000000000..c9764ae11 --- /dev/null +++ b/examples/TeamInvitesExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_invites() + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_invites: %s\n" % e) diff --git a/examples/TeamInvitesExample.rb b/examples/TeamInvitesExample.rb new file mode 100644 index 000000000..9fee219c0 --- /dev/null +++ b/examples/TeamInvitesExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_invites + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_invites: #{e}" +end diff --git a/examples/TeamInvites.sh b/examples/TeamInvitesExample.sh similarity index 100% rename from examples/TeamInvites.sh rename to examples/TeamInvitesExample.sh diff --git a/examples/TeamInvitesExample.ts b/examples/TeamInvitesExample.ts new file mode 100644 index 000000000..7debb4877 --- /dev/null +++ b/examples/TeamInvitesExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInvites().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInvites:"); + console.log(error.body); +}); diff --git a/examples/TeamMembers.cs b/examples/TeamMembers.cs deleted file mode 100644 index 3426971cf..000000000 --- a/examples/TeamMembers.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - - try - { - var result = teamApi.TeamMembers(teamId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamMembers.java b/examples/TeamMembers.java deleted file mode 100644 index c3579567b..000000000 --- a/examples/TeamMembers.java +++ /dev/null @@ -1,35 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamMembersResponse result = teamApi.teamMembers(teamId, page, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); - 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/TeamMembers.js b/examples/TeamMembers.js deleted file mode 100644 index eee5075cf..000000000 --- a/examples/TeamMembers.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamMembers.php b/examples/TeamMembers.php deleted file mode 100644 index 60128aa30..000000000 --- a/examples/TeamMembers.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -try { - $result = $teamApi->teamMembers($teamId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamMembers.py b/examples/TeamMembers.py deleted file mode 100644 index ed27ca884..000000000 --- a/examples/TeamMembers.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - - try: - response = team_api.team_members(team_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamMembers.rb b/examples/TeamMembers.rb deleted file mode 100644 index ce05cb2d7..000000000 --- a/examples/TeamMembers.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - -begin - result = team_api.team_members(team_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamMembers.ts b/examples/TeamMembers.ts deleted file mode 100644 index eee5075cf..000000000 --- a/examples/TeamMembers.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamMembersExample.cs b/examples/TeamMembersExample.cs new file mode 100644 index 000000000..72213f8a7 --- /dev/null +++ b/examples/TeamMembersExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamMembersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamMembers( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamMembers: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamMembersExample.java b/examples/TeamMembersExample.java new file mode 100644 index 000000000..74999477f --- /dev/null +++ b/examples/TeamMembersExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamMembersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamMembers"); + 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/TeamMembersExample.php b/examples/TeamMembersExample.php new file mode 100644 index 000000000..79c0343b1 --- /dev/null +++ b/examples/TeamMembersExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; +} diff --git a/examples/TeamMembersExample.py b/examples/TeamMembersExample.py new file mode 100644 index 000000000..92c3ebaf5 --- /dev/null +++ b/examples/TeamMembersExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_members( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_members: %s\n" % e) diff --git a/examples/TeamMembersExample.rb b/examples/TeamMembersExample.rb new file mode 100644 index 000000000..f35f9d174 --- /dev/null +++ b/examples/TeamMembersExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_members( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_members: #{e}" +end diff --git a/examples/TeamMembers.sh b/examples/TeamMembersExample.sh similarity index 100% rename from examples/TeamMembers.sh rename to examples/TeamMembersExample.sh diff --git a/examples/TeamMembersExample.ts b/examples/TeamMembersExample.ts new file mode 100644 index 000000000..17479dbda --- /dev/null +++ b/examples/TeamMembersExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamMembers:"); + console.log(error.body); +}); diff --git a/examples/TeamRemoveMember.cs b/examples/TeamRemoveMember.cs deleted file mode 100644 index c4051b639..000000000 --- a/examples/TeamRemoveMember.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamRemoveMemberRequest( - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com" - ); - - try - { - var result = teamApi.TeamRemoveMember(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamRemoveMember.java b/examples/TeamRemoveMember.java deleted file mode 100644 index 28514c7ec..000000000 --- a/examples/TeamRemoveMember.java +++ /dev/null @@ -1,35 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamRemoveMemberRequest() - .emailAddress("teammate@dropboxsign.com") - .newOwnerEmailAddress("new_teammate@dropboxsign.com"); - - try { - TeamGetResponse result = teamApi.teamRemoveMember(data); - 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/TeamRemoveMember.js b/examples/TeamRemoveMember.js deleted file mode 100644 index 291e6fadb..000000000 --- a/examples/TeamRemoveMember.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamRemoveMember.php b/examples/TeamRemoveMember.php deleted file mode 100644 index 73ec2ae6c..000000000 --- a/examples/TeamRemoveMember.php +++ /dev/null @@ -1,26 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamRemoveMemberRequest(); -$data->setEmailAddress("teammate@dropboxsign.com") - ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); - -try { - $result = $teamApi->teamRemoveMember($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamRemoveMember.py b/examples/TeamRemoveMember.py deleted file mode 100644 index 5dfe5b0bf..000000000 --- a/examples/TeamRemoveMember.py +++ /dev/null @@ -1,24 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamRemoveMemberRequest( - email_address="teammate@dropboxsign.com", - new_owner_email_address="new_teammate@dropboxsign.com", - ) - - try: - response = team_api.team_remove_member(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamRemoveMember.rb b/examples/TeamRemoveMember.rb deleted file mode 100644 index b2255ef4b..000000000 --- a/examples/TeamRemoveMember.rb +++ /dev/null @@ -1,22 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamRemoveMemberRequest.new -data.email_address = "teammate@dropboxsign.com" -data.new_owner_email_address = "new_teammate@dropboxsign.com" - -begin - result = team_api.team_remove_member(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamRemoveMember.ts b/examples/TeamRemoveMember.ts deleted file mode 100644 index b7ba4beac..000000000 --- a/examples/TeamRemoveMember.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamRemoveMemberRequest = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamRemoveMemberAccountIdExample.cs b/examples/TeamRemoveMemberAccountIdExample.cs new file mode 100644 index 000000000..0c6ae21a3 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamRemoveMemberAccountIdExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( + accountId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + try + { + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamRemoveMemberAccountIdExample.java b/examples/TeamRemoveMemberAccountIdExample.java new file mode 100644 index 000000000..d2d4dede2 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberAccountIdExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.accountId("f57db65d3f933b5316d398057a36176831451a35"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamRemoveMember"); + 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/TeamRemoveMemberAccountIdExample.php b/examples/TeamRemoveMemberAccountIdExample.php new file mode 100644 index 000000000..90d902633 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/examples/TeamRemoveMemberAccountIdExample.py b/examples/TeamRemoveMemberAccountIdExample.py new file mode 100644 index 000000000..132ab54cb --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_remove_member_request = models.TeamRemoveMemberRequest( + account_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + try: + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) diff --git a/examples/TeamRemoveMemberAccountIdExample.rb b/examples/TeamRemoveMemberAccountIdExample.rb new file mode 100644 index 000000000..16913dd79 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new +team_remove_member_request.account_id = "f57db65d3f933b5316d398057a36176831451a35" + +begin + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_remove_member: #{e}" +end diff --git a/examples/TeamRemoveMemberAccountIdExample.ts b/examples/TeamRemoveMemberAccountIdExample.ts new file mode 100644 index 000000000..cf5e42a72 --- /dev/null +++ b/examples/TeamRemoveMemberAccountIdExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/examples/TeamRemoveMemberExample.cs b/examples/TeamRemoveMemberExample.cs new file mode 100644 index 000000000..23aeff1ff --- /dev/null +++ b/examples/TeamRemoveMemberExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamRemoveMemberExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com" + ); + + try + { + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamRemoveMemberExample.java b/examples/TeamRemoveMemberExample.java new file mode 100644 index 000000000..e68187a2f --- /dev/null +++ b/examples/TeamRemoveMemberExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamRemoveMember"); + 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/TeamRemoveMemberExample.php b/examples/TeamRemoveMemberExample.php new file mode 100644 index 000000000..3212aa335 --- /dev/null +++ b/examples/TeamRemoveMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") + ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/examples/TeamRemoveMemberExample.py b/examples/TeamRemoveMemberExample.py new file mode 100644 index 000000000..7847d7289 --- /dev/null +++ b/examples/TeamRemoveMemberExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_remove_member_request = models.TeamRemoveMemberRequest( + email_address="teammate@dropboxsign.com", + new_owner_email_address="new_teammate@dropboxsign.com", + ) + + try: + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) diff --git a/examples/TeamRemoveMemberExample.rb b/examples/TeamRemoveMemberExample.rb new file mode 100644 index 000000000..27c87cb0e --- /dev/null +++ b/examples/TeamRemoveMemberExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new +team_remove_member_request.email_address = "teammate@dropboxsign.com" +team_remove_member_request.new_owner_email_address = "new_teammate@dropboxsign.com" + +begin + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_remove_member: #{e}" +end diff --git a/examples/TeamRemoveMember.sh b/examples/TeamRemoveMemberExample.sh similarity index 100% rename from examples/TeamRemoveMember.sh rename to examples/TeamRemoveMemberExample.sh diff --git a/examples/TeamRemoveMemberExample.ts b/examples/TeamRemoveMemberExample.ts new file mode 100644 index 000000000..3f12efc31 --- /dev/null +++ b/examples/TeamRemoveMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/examples/TeamSubTeams.cs b/examples/TeamSubTeams.cs deleted file mode 100644 index cab5c691f..000000000 --- a/examples/TeamSubTeams.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - - try - { - var result = teamApi.TeamSubTeams(teamId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamSubTeams.java b/examples/TeamSubTeams.java deleted file mode 100644 index f4a5b50e5..000000000 --- a/examples/TeamSubTeams.java +++ /dev/null @@ -1,35 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamSubTeamsResponse result = teamApi.teamSubTeams(teamId, page, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamSubTeams"); - 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/TeamSubTeams.js b/examples/TeamSubTeams.js deleted file mode 100644 index faf7a9ea6..000000000 --- a/examples/TeamSubTeams.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamSubTeams.php b/examples/TeamSubTeams.php deleted file mode 100644 index 8daf498e2..000000000 --- a/examples/TeamSubTeams.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -try { - $result = $teamApi->teamSubTeams($teamId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamSubTeams.py b/examples/TeamSubTeams.py deleted file mode 100644 index d6f7dc183..000000000 --- a/examples/TeamSubTeams.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - - try: - response = team_api.team_sub_teams(team_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamSubTeams.rb b/examples/TeamSubTeams.rb deleted file mode 100644 index 94192cdff..000000000 --- a/examples/TeamSubTeams.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - -begin - result = team_api.team_sub_teams(team_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamSubTeams.ts b/examples/TeamSubTeams.ts deleted file mode 100644 index faf7a9ea6..000000000 --- a/examples/TeamSubTeams.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamSubTeamsExample.cs b/examples/TeamSubTeamsExample.cs new file mode 100644 index 000000000..1760310a5 --- /dev/null +++ b/examples/TeamSubTeamsExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamSubTeamsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamSubTeams( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSubTeams: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamSubTeamsExample.java b/examples/TeamSubTeamsExample.java new file mode 100644 index 000000000..4ab0bc0d7 --- /dev/null +++ b/examples/TeamSubTeamsExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamSubTeamsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSubTeams"); + 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/TeamSubTeamsExample.php b/examples/TeamSubTeamsExample.php new file mode 100644 index 000000000..ae7a990e2 --- /dev/null +++ b/examples/TeamSubTeamsExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSubTeams( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSubTeams: {$e->getMessage()}"; +} diff --git a/examples/TeamSubTeamsExample.py b/examples/TeamSubTeamsExample.py new file mode 100644 index 000000000..93afde113 --- /dev/null +++ b/examples/TeamSubTeamsExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_sub_teams( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_sub_teams: %s\n" % e) diff --git a/examples/TeamSubTeamsExample.rb b/examples/TeamSubTeamsExample.rb new file mode 100644 index 000000000..12c87f2b7 --- /dev/null +++ b/examples/TeamSubTeamsExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_sub_teams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_sub_teams: #{e}" +end diff --git a/examples/TeamSubTeams.sh b/examples/TeamSubTeamsExample.sh similarity index 100% rename from examples/TeamSubTeams.sh rename to examples/TeamSubTeamsExample.sh diff --git a/examples/TeamSubTeamsExample.ts b/examples/TeamSubTeamsExample.ts new file mode 100644 index 000000000..e6ef9c8da --- /dev/null +++ b/examples/TeamSubTeamsExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSubTeams:"); + console.log(error.body); +}); diff --git a/examples/TeamUpdate.cs b/examples/TeamUpdate.cs deleted file mode 100644 index f31b538a5..000000000 --- a/examples/TeamUpdate.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamUpdateRequest( - name: "New Team Name" - ); - - try - { - var result = teamApi.TeamUpdate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TeamUpdate.java b/examples/TeamUpdate.java deleted file mode 100644 index eedcafc71..000000000 --- a/examples/TeamUpdate.java +++ /dev/null @@ -1,34 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamUpdateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamUpdate(data); - 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/TeamUpdate.js b/examples/TeamUpdate.js deleted file mode 100644 index 842457d4c..000000000 --- a/examples/TeamUpdate.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamUpdate.php b/examples/TeamUpdate.php deleted file mode 100644 index 6bac87d66..000000000 --- a/examples/TeamUpdate.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamUpdateRequest(); -$data->setName("New Team Name"); - -try { - $result = $teamApi->teamUpdate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TeamUpdate.py b/examples/TeamUpdate.py deleted file mode 100644 index b89ef1135..000000000 --- a/examples/TeamUpdate.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamUpdateRequest( - name="New Team Name", - ) - - try: - response = team_api.team_update(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamUpdate.rb b/examples/TeamUpdate.rb deleted file mode 100644 index 27edefa90..000000000 --- a/examples/TeamUpdate.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamUpdateRequest.new -data.name = "New Team Name" - -begin - result = team_api.team_update(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TeamUpdate.ts b/examples/TeamUpdate.ts deleted file mode 100644 index 73eac24a6..000000000 --- a/examples/TeamUpdate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamUpdateRequest = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TeamUpdateExample.cs b/examples/TeamUpdateExample.cs new file mode 100644 index 000000000..355811ee4 --- /dev/null +++ b/examples/TeamUpdateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamUpdateRequest = new TeamUpdateRequest( + name: "New Team Name" + ); + + try + { + var response = new TeamApi(config).TeamUpdate( + teamUpdateRequest: teamUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TeamUpdateExample.java b/examples/TeamUpdateExample.java new file mode 100644 index 000000000..e81903238 --- /dev/null +++ b/examples/TeamUpdateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamUpdate"); + 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/TeamUpdateExample.php b/examples/TeamUpdateExample.php new file mode 100644 index 000000000..3338af6e6 --- /dev/null +++ b/examples/TeamUpdateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; +} diff --git a/examples/TeamUpdateExample.py b/examples/TeamUpdateExample.py new file mode 100644 index 000000000..e28eb2907 --- /dev/null +++ b/examples/TeamUpdateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_update_request = models.TeamUpdateRequest( + name="New Team Name", + ) + + try: + response = api.TeamApi(api_client).team_update( + team_update_request=team_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_update: %s\n" % e) diff --git a/examples/TeamUpdateExample.rb b/examples/TeamUpdateExample.rb new file mode 100644 index 000000000..7f925ffff --- /dev/null +++ b/examples/TeamUpdateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_update_request = Dropbox::Sign::TeamUpdateRequest.new +team_update_request.name = "New Team Name" + +begin + response = Dropbox::Sign::TeamApi.new.team_update( + team_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_update: #{e}" +end diff --git a/examples/TeamUpdate.sh b/examples/TeamUpdateExample.sh similarity index 100% rename from examples/TeamUpdate.sh rename to examples/TeamUpdateExample.sh diff --git a/examples/TeamUpdateExample.ts b/examples/TeamUpdateExample.ts new file mode 100644 index 000000000..748a4adbd --- /dev/null +++ b/examples/TeamUpdateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamUpdateRequest: models.TeamUpdateRequest = { + name: "New Team Name", +}; + +apiCaller.teamUpdate( + teamUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamUpdate:"); + console.log(error.body); +}); diff --git a/examples/TemplateAddUser.cs b/examples/TemplateAddUser.cs deleted file mode 100644 index 23d85c8c1..000000000 --- a/examples/TemplateAddUser.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - var data = new TemplateAddUserRequest( - emailAddress: "george@dropboxsign.com" - ); - - try - { - var result = templateApi.TemplateAddUser(templateId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateAddUser.java b/examples/TemplateAddUser.java deleted file mode 100644 index 759990b4c..000000000 --- a/examples/TemplateAddUser.java +++ /dev/null @@ -1,36 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateAddUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateAddUser(templateId, data); - 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/TemplateAddUser.js b/examples/TemplateAddUser.js deleted file mode 100644 index 1b53fa3e2..000000000 --- a/examples/TemplateAddUser.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateAddUser.php b/examples/TemplateAddUser.php deleted file mode 100644 index 2bbc31885..000000000 --- a/examples/TemplateAddUser.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateAddUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateAddUser($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateAddUser.py b/examples/TemplateAddUser.py deleted file mode 100644 index 5476f8e8b..000000000 --- a/examples/TemplateAddUser.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateAddUserRequest( - email_address="george@dropboxsign.com", - ) - - template_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_add_user(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateAddUser.rb b/examples/TemplateAddUser.rb deleted file mode 100644 index 89573c390..000000000 --- a/examples/TemplateAddUser.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateAddUserRequest.new -data.email_address = "george@dropboxsign.com" - -template_id = "f57db65d3f933b5316d398057a36176831451a35" - -begin - result = template_api.template_add_user(template_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateAddUser.ts b/examples/TemplateAddUser.ts deleted file mode 100644 index 6919a088d..000000000 --- a/examples/TemplateAddUser.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateAddUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateAddUserExample.cs b/examples/TemplateAddUserExample.cs new file mode 100644 index 000000000..dc4107a2f --- /dev/null +++ b/examples/TemplateAddUserExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateAddUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateAddUserRequest = new TemplateAddUserRequest( + emailAddress: "george@dropboxsign.com" + ); + + try + { + var response = new TemplateApi(config).TemplateAddUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateAddUserRequest: templateAddUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateAddUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateAddUserExample.java b/examples/TemplateAddUserExample.java new file mode 100644 index 000000000..3649e46f4 --- /dev/null +++ b/examples/TemplateAddUserExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateAddUserRequest = new TemplateAddUserRequest(); + templateAddUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateAddUser"); + 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/TemplateAddUserExample.php b/examples/TemplateAddUserExample.php new file mode 100644 index 000000000..a76613a1d --- /dev/null +++ b/examples/TemplateAddUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_add_user_request = (new Dropbox\Sign\Model\TemplateAddUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateAddUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request: $template_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateAddUser: {$e->getMessage()}"; +} diff --git a/examples/TemplateAddUserExample.py b/examples/TemplateAddUserExample.py new file mode 100644 index 000000000..5259a01d4 --- /dev/null +++ b/examples/TemplateAddUserExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_add_user_request = models.TemplateAddUserRequest( + email_address="george@dropboxsign.com", + ) + + try: + response = api.TemplateApi(api_client).template_add_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request=template_add_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_add_user: %s\n" % e) diff --git a/examples/TemplateAddUserExample.rb b/examples/TemplateAddUserExample.rb new file mode 100644 index 000000000..a34a81fbf --- /dev/null +++ b/examples/TemplateAddUserExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_add_user_request = Dropbox::Sign::TemplateAddUserRequest.new +template_add_user_request.email_address = "george@dropboxsign.com" + +begin + response = Dropbox::Sign::TemplateApi.new.template_add_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_add_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_add_user: #{e}" +end diff --git a/examples/TemplateAddUser.sh b/examples/TemplateAddUserExample.sh similarity index 100% rename from examples/TemplateAddUser.sh rename to examples/TemplateAddUserExample.sh diff --git a/examples/TemplateAddUserExample.ts b/examples/TemplateAddUserExample.ts new file mode 100644 index 000000000..b8bf1a557 --- /dev/null +++ b/examples/TemplateAddUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateAddUserRequest: models.TemplateAddUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateAddUser:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreate.cs b/examples/TemplateCreate.cs deleted file mode 100644 index cce736293..000000000 --- a/examples/TemplateCreate.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var role1 = new SubTemplateRole( - name: "Client", - order: 0 - ); - - var role2 = new SubTemplateRole( - name: "Witness", - order: 1 - ); - - var mergeField1 = new SubMergeField( - name: "Full Name", - type: SubMergeField.TypeEnum.Text - ); - - var mergeField2 = new SubMergeField( - name: "Is Registered?", - type: SubMergeField.TypeEnum.Checkbox - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new TemplateCreateRequest( - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: files, - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: new List(){role1, role2}, - ccRoles: new List(){"Manager"}, - mergeFields: new List(){mergeField1, mergeField2}, - fieldOptions: subFieldOptions, - testMode: true - ); - - try - { - var result = templateApi.TemplateCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateCreate.java b/examples/TemplateCreate.java deleted file mode 100644 index f2cd5990b..000000000 --- a/examples/TemplateCreate.java +++ /dev/null @@ -1,65 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateResponse result = templateApi.templateCreate(data); - 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/TemplateCreate.js b/examples/TemplateCreate.js deleted file mode 100644 index f71d247e1..000000000 --- a/examples/TemplateCreate.js +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, -}; - -const role2 = { - name: "Witness", - order: 1, -}; - -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreate.php b/examples/TemplateCreate.php deleted file mode 100644 index 7b1b866f2..000000000 --- a/examples/TemplateCreate.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername('YOUR_API_KEY'); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName('Client') - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName('Witness') - ->setOrder(1); - -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName('Full Name') - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); - -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName('Is Registered?') - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateRequest(); -$data->setClientId('37dee8d8440c66d54cfa05d92c160882') - ->setFiles([new SplFileObject(__DIR__ . '/example_signature_request.pdf')]) - ->setTitle('Test Template') - ->setSubject('Please sign this document') - ->setMessage('For your approval') - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(['Manager']) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $templateApi->templateCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo 'Exception when calling Dropbox Sign API: ' - . print_r($error->getError()); -} diff --git a/examples/TemplateCreate.py b/examples/TemplateCreate.py deleted file mode 100644 index cb7b60e51..000000000 --- a/examples/TemplateCreate.py +++ /dev/null @@ -1,56 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - role_1 = models.SubTemplateRole( - name="Client", - order=0, - ) - - role_2 = models.SubTemplateRole( - name="Witness", - order=1, - ) - - merge_field_1 = models.SubMergeField( - name="Full Name", - type="text", - ) - - merge_field_2 = models.SubMergeField( - name="Is Registered?", - type="checkbox", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.TemplateCreateRequest( - client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", - message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, - test_mode=True, - ) - - try: - response = template_api.template_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateCreate.rb b/examples/TemplateCreate.rb deleted file mode 100644 index 09863a2f2..000000000 --- a/examples/TemplateCreate.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -role_1 = Dropbox::Sign::SubTemplateRole.new -role_1.name = "Client" -role_1.order = 0 - -role_2 = Dropbox::Sign::SubTemplateRole.new -role_2.name = "Witness" -role_2.order = 1 - -merge_field_1 = Dropbox::Sign::SubMergeField.new -merge_field_1.name = "Full Name" -merge_field_1.type = "text" - -merge_field_2 = Dropbox::Sign::SubMergeField.new -merge_field_2.name = "Is Registered?" -merge_field_2.type = "checkbox" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::TemplateCreateRequest.new -data.client_id = "37dee8d8440c66d54cfa05d92c160882" -data.files = [File.new("example_signature_request.pdf", "r")] -data.title = "Test Template" -data.subject = "Please sign this document" -data.message = "For your approval" -data.signer_roles = [role_1, role_2] -data.cc_roles = ["Manager"] -data.merge_fields = [merge_field_1, merge_field_2] -data.field_options = field_options -data.test_mode = true - -begin - result = template_api.template_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateCreate.ts b/examples/TemplateCreate.ts deleted file mode 100644 index 2bcd3689e..000000000 --- a/examples/TemplateCreate.ts +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, -}; - -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraft.cs b/examples/TemplateCreateEmbeddedDraft.cs deleted file mode 100644 index 42335ff90..000000000 --- a/examples/TemplateCreateEmbeddedDraft.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var role1 = new SubTemplateRole( - name: "Client", - order: 0 - ); - - var role2 = new SubTemplateRole( - name: "Witness", - order: 1 - ); - - var mergeField1 = new SubMergeField( - name: "Full Name", - type: SubMergeField.TypeEnum.Text - ); - - var mergeField2 = new SubMergeField( - name: "Is Registered?", - type: SubMergeField.TypeEnum.Checkbox - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new TemplateCreateEmbeddedDraftRequest( - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: files, - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: new List(){role1, role2}, - ccRoles: new List(){"Manager"}, - mergeFields: new List(){mergeField1, mergeField2}, - fieldOptions: subFieldOptions, - testMode: true - ); - - try - { - var result = templateApi.TemplateCreateEmbeddedDraft(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateCreateEmbeddedDraft.java b/examples/TemplateCreateEmbeddedDraft.java deleted file mode 100644 index 7ae46b461..000000000 --- a/examples/TemplateCreateEmbeddedDraft.java +++ /dev/null @@ -1,65 +0,0 @@ -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; -import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateEmbeddedDraftRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateEmbeddedDraftResponse result = templateApi.templateCreateEmbeddedDraft(data); - 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/TemplateCreateEmbeddedDraft.js b/examples/TemplateCreateEmbeddedDraft.js deleted file mode 100644 index 1d8ba8741..000000000 --- a/examples/TemplateCreateEmbeddedDraft.js +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, -}; - -const role2 = { - name: "Witness", - order: 1, -}; - -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraft.php b/examples/TemplateCreateEmbeddedDraft.php deleted file mode 100644 index 4e1421b47..000000000 --- a/examples/TemplateCreateEmbeddedDraft.php +++ /dev/null @@ -1,53 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName("Client") - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName("Witness") - ->setOrder(1); - -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName("Full Name") - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); - -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName("Is Registered?") - ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest(); -$data->setClientId("37dee8d8440c66d54cfa05d92c160882") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTitle("Test Template") - ->setSubject("Please sign this document") - ->setMessage("For your approval") - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(["Manager"]) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $templateApi->templateCreateEmbeddedDraft($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateCreateEmbeddedDraft.py b/examples/TemplateCreateEmbeddedDraft.py deleted file mode 100644 index 9b49f037c..000000000 --- a/examples/TemplateCreateEmbeddedDraft.py +++ /dev/null @@ -1,56 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - role_1 = models.SubTemplateRole( - name="Client", - order=0, - ) - - role_2 = models.SubTemplateRole( - name="Witness", - order=1, - ) - - merge_field_1 = models.SubMergeField( - name="Full Name", - type="text", - ) - - merge_field_2 = models.SubMergeField( - name="Is Registered?", - type="checkbox", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.TemplateCreateEmbeddedDraftRequest( - client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", - message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, - test_mode=True, - ) - - try: - response = template_api.template_create_embedded_draft(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateCreateEmbeddedDraft.rb b/examples/TemplateCreateEmbeddedDraft.rb deleted file mode 100644 index 6eb0f2750..000000000 --- a/examples/TemplateCreateEmbeddedDraft.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -role_1 = Dropbox::Sign::SubTemplateRole.new -role_1.name = "Client" -role_1.order = 0 - -role_2 = Dropbox::Sign::SubTemplateRole.new -role_2.name = "Witness" -role_2.order = 1 - -merge_field_1 = Dropbox::Sign::SubMergeField.new -merge_field_1.name = "Full Name" -merge_field_1.type = "text" - -merge_field_2 = Dropbox::Sign::SubMergeField.new -merge_field_2.name = "Is Registered?" -merge_field_2.type = "checkbox" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new -data.client_id = "37dee8d8440c66d54cfa05d92c160882" -data.files = [File.new("example_signature_request.pdf", "r")] -data.title = "Test Template" -data.subject = "Please sign this document" -data.message = "For your approval" -data.signer_roles = [role_1, role_2] -data.cc_roles = ["Manager"] -data.merge_fields = [merge_field_1, merge_field_2] -data.field_options = field_options -data.test_mode = true - -begin - result = template_api.template_create_embedded_draft(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateCreateEmbeddedDraft.ts b/examples/TemplateCreateEmbeddedDraft.ts deleted file mode 100644 index 960e8a65d..000000000 --- a/examples/TemplateCreateEmbeddedDraft.ts +++ /dev/null @@ -1,61 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, -}; - -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateEmbeddedDraftRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, -}; - -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateCreateEmbeddedDraftExample.cs b/examples/TemplateCreateEmbeddedDraftExample.cs new file mode 100644 index 000000000..e26574c52 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateEmbeddedDraftExample.java b/examples/TemplateCreateEmbeddedDraftExample.java new file mode 100644 index 000000000..bf7c9720d --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.java @@ -0,0 +1,86 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/TemplateCreateEmbeddedDraftExample.php b/examples/TemplateCreateEmbeddedDraftExample.php new file mode 100644 index 000000000..bf035f3cb --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.php @@ -0,0 +1,66 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftExample.py b/examples/TemplateCreateEmbeddedDraftExample.py new file mode 100644 index 000000000..2e96c0a48 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.py @@ -0,0 +1,71 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/examples/TemplateCreateEmbeddedDraftExample.rb b/examples/TemplateCreateEmbeddedDraftExample.rb new file mode 100644 index 000000000..8d40c03a2 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.rb @@ -0,0 +1,62 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/examples/TemplateCreateEmbeddedDraft.sh b/examples/TemplateCreateEmbeddedDraftExample.sh similarity index 100% rename from examples/TemplateCreateEmbeddedDraft.sh rename to examples/TemplateCreateEmbeddedDraftExample.sh diff --git a/examples/TemplateCreateEmbeddedDraftExample.ts b/examples/TemplateCreateEmbeddedDraftExample.ts new file mode 100644 index 000000000..300b1f618 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs new file mode 100644 index 000000000..2603e2c47 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java new file mode 100644 index 000000000..1a7ff9bb4 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java @@ -0,0 +1,132 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldGroups(formFieldGroups); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php new file mode 100644 index 000000000..120c310df --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py new file mode 100644 index 000000000..84232eacf --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py @@ -0,0 +1,120 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb new file mode 100644 index 000000000..3cf7abbf2 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb @@ -0,0 +1,108 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_field_groups = form_field_groups +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts new file mode 100644 index 000000000..0f21c2209 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs new file mode 100644 index 000000000..e4edd18b4 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.java b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.java new file mode 100644 index 000000000..05ec5ab5d --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.java @@ -0,0 +1,148 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldRules(formFieldRules); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/TemplateCreateEmbeddedDraftFormFieldRulesExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php new file mode 100644 index 000000000..3997bcde0 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.py b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.py new file mode 100644 index 000000000..e20394052 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.py @@ -0,0 +1,138 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb new file mode 100644 index 000000000..38263c1cb --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb @@ -0,0 +1,124 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_field_rules = form_field_rules +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts new file mode 100644 index 000000000..d4036365e --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..cb3fd770d --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..8ac9bae17 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..6dc4c93c7 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..b99b91ac7 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..525ee3773 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..e78591849 --- /dev/null +++ b/examples/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateExample.cs b/examples/TemplateCreateExample.cs new file mode 100644 index 000000000..09fad4bd6 --- /dev/null +++ b/examples/TemplateCreateExample.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateExample.java b/examples/TemplateCreateExample.java new file mode 100644 index 000000000..ebf652f91 --- /dev/null +++ b/examples/TemplateCreateExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/TemplateCreateExample.php b/examples/TemplateCreateExample.php new file mode 100644 index 000000000..93b6dedd0 --- /dev/null +++ b/examples/TemplateCreateExample.php @@ -0,0 +1,100 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateExample.py b/examples/TemplateCreateExample.py new file mode 100644 index 000000000..a6ed3611e --- /dev/null +++ b/examples/TemplateCreateExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/examples/TemplateCreateExample.rb b/examples/TemplateCreateExample.rb new file mode 100644 index 000000000..f4d623397 --- /dev/null +++ b/examples/TemplateCreateExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/examples/TemplateCreate.sh b/examples/TemplateCreateExample.sh similarity index 100% rename from examples/TemplateCreate.sh rename to examples/TemplateCreateExample.sh diff --git a/examples/TemplateCreateExample.ts b/examples/TemplateCreateExample.ts new file mode 100644 index 000000000..6046df4b5 --- /dev/null +++ b/examples/TemplateCreateExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldGroupsExample.cs b/examples/TemplateCreateFormFieldGroupsExample.cs new file mode 100644 index 000000000..b8c56e791 --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldGroups: formFieldGroups, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateFormFieldGroupsExample.java b/examples/TemplateCreateFormFieldGroupsExample.java new file mode 100644 index 000000000..62f5094e7 --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.java @@ -0,0 +1,132 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.formFieldGroups(formFieldGroups); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/TemplateCreateFormFieldGroupsExample.php b/examples/TemplateCreateFormFieldGroupsExample.php new file mode 100644 index 000000000..1c0e02063 --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldGroups($form_field_groups) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldGroupsExample.py b/examples/TemplateCreateFormFieldGroupsExample.py new file mode 100644 index 000000000..6a755d022 --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.py @@ -0,0 +1,120 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + form_field_groups=form_field_groups, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/examples/TemplateCreateFormFieldGroupsExample.rb b/examples/TemplateCreateFormFieldGroupsExample.rb new file mode 100644 index 000000000..83fdc09bb --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.rb @@ -0,0 +1,108 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.form_field_groups = form_field_groups +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/examples/TemplateCreateFormFieldGroupsExample.ts b/examples/TemplateCreateFormFieldGroupsExample.ts new file mode 100644 index 000000000..845ddaa9b --- /dev/null +++ b/examples/TemplateCreateFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldGroups: formFieldGroups, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldRulesExample.cs b/examples/TemplateCreateFormFieldRulesExample.cs new file mode 100644 index 000000000..9b3fcf144 --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldRules: formFieldRules, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateFormFieldRulesExample.java b/examples/TemplateCreateFormFieldRulesExample.java new file mode 100644 index 000000000..7a97f0b8b --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.java @@ -0,0 +1,148 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.formFieldRules(formFieldRules); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/TemplateCreateFormFieldRulesExample.php b/examples/TemplateCreateFormFieldRulesExample.php new file mode 100644 index 000000000..1b275240d --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldRules($form_field_rules) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldRulesExample.py b/examples/TemplateCreateFormFieldRulesExample.py new file mode 100644 index 000000000..a7f2d94ff --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.py @@ -0,0 +1,138 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + form_field_rules=form_field_rules, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/examples/TemplateCreateFormFieldRulesExample.rb b/examples/TemplateCreateFormFieldRulesExample.rb new file mode 100644 index 000000000..cea893e1d --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.rb @@ -0,0 +1,124 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.form_field_rules = form_field_rules +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/examples/TemplateCreateFormFieldRulesExample.ts b/examples/TemplateCreateFormFieldRulesExample.ts new file mode 100644 index 000000000..c7ad42288 --- /dev/null +++ b/examples/TemplateCreateFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldRules: formFieldRules, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.cs b/examples/TemplateCreateFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..503e80645 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.java b/examples/TemplateCreateFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..9873668b7 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/TemplateCreateFormFieldsPerDocumentExample.php b/examples/TemplateCreateFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..a4f60e965 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.py b/examples/TemplateCreateFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..6e2185aa9 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.rb b/examples/TemplateCreateFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..39185b3d0 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/examples/TemplateCreateFormFieldsPerDocumentExample.ts b/examples/TemplateCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..59890f436 --- /dev/null +++ b/examples/TemplateCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/examples/TemplateDelete.cs b/examples/TemplateDelete.cs deleted file mode 100644 index 2740496cf..000000000 --- a/examples/TemplateDelete.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - templateApi.TemplateDelete(templateId); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateDelete.java b/examples/TemplateDelete.java deleted file mode 100644 index 0714a45d4..000000000 --- a/examples/TemplateDelete.java +++ /dev/null @@ -1,31 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - templateApi.templateDelete(templateId); - } 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/TemplateDelete.js b/examples/TemplateDelete.js deleted file mode 100644 index a82580ff4..000000000 --- a/examples/TemplateDelete.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateDelete.php b/examples/TemplateDelete.php deleted file mode 100644 index 3858b7559..000000000 --- a/examples/TemplateDelete.php +++ /dev/null @@ -1,23 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $templateApi->templateDelete($templateId); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateDelete.py b/examples/TemplateDelete.py deleted file mode 100644 index c87622efa..000000000 --- a/examples/TemplateDelete.py +++ /dev/null @@ -1,18 +0,0 @@ -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - template_api.template_delete(template_id) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateDelete.rb b/examples/TemplateDelete.rb deleted file mode 100644 index cff67b421..000000000 --- a/examples/TemplateDelete.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - result = template_api.template_delete(template_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateDelete.ts b/examples/TemplateDelete.ts deleted file mode 100644 index a82580ff4..000000000 --- a/examples/TemplateDelete.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateDeleteExample.cs b/examples/TemplateDeleteExample.cs new file mode 100644 index 000000000..5a49ea03f --- /dev/null +++ b/examples/TemplateDeleteExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new TemplateApi(config).TemplateDelete( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateDeleteExample.java b/examples/TemplateDeleteExample.java new file mode 100644 index 000000000..6ca874681 --- /dev/null +++ b/examples/TemplateDeleteExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TemplateApi(config).templateDelete( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateDelete"); + 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/TemplateDeleteExample.php b/examples/TemplateDeleteExample.php new file mode 100644 index 000000000..63c7a6a72 --- /dev/null +++ b/examples/TemplateDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateDelete( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateDelete: {$e->getMessage()}"; +} diff --git a/examples/TemplateDeleteExample.py b/examples/TemplateDeleteExample.py new file mode 100644 index 000000000..3bf63f5ad --- /dev/null +++ b/examples/TemplateDeleteExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.TemplateApi(api_client).template_delete( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + except ApiException as e: + print("Exception when calling TemplateApi#template_delete: %s\n" % e) diff --git a/examples/TemplateDeleteExample.rb b/examples/TemplateDeleteExample.rb new file mode 100644 index 000000000..33e07f299 --- /dev/null +++ b/examples/TemplateDeleteExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::TemplateApi.new.template_delete( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_delete: #{e}" +end diff --git a/examples/TemplateDelete.sh b/examples/TemplateDeleteExample.sh similarity index 100% rename from examples/TemplateDelete.sh rename to examples/TemplateDeleteExample.sh diff --git a/examples/TemplateDeleteExample.ts b/examples/TemplateDeleteExample.ts new file mode 100644 index 000000000..3f0aae438 --- /dev/null +++ b/examples/TemplateDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateDelete( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).catch(error => { + console.log("Exception when calling TemplateApi#templateDelete:"); + console.log(error.body); +}); diff --git a/examples/TemplateFiles.cs b/examples/TemplateFiles.cs deleted file mode 100644 index db4d641c7..000000000 --- a/examples/TemplateFiles.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - var result = templateApi.TemplateFiles(templateId, "pdf"); - - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); - fileStream.Close(); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateFiles.java b/examples/TemplateFiles.java deleted file mode 100644 index 2c24e4827..000000000 --- a/examples/TemplateFiles.java +++ /dev/null @@ -1,34 +0,0 @@ -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; - -import java.io.File; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - File result = templateApi.templateFiles(templateId, "pdf"); - result.renameTo(new File("file_response.pdf")); - } 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/TemplateFiles.js b/examples/TemplateFiles.js deleted file mode 100644 index 00217b49b..000000000 --- a/examples/TemplateFiles.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFiles.php b/examples/TemplateFiles.php deleted file mode 100644 index e3e7341ee..000000000 --- a/examples/TemplateFiles.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; -$fileType = "pdf"; - -try { - $result = $templateApi->templateFiles($templateId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFiles.py b/examples/TemplateFiles.py deleted file mode 100644 index 59874bc61..000000000 --- a/examples/TemplateFiles.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files(template_id, file_type="pdf") - open("file_response.pdf", "wb").write(response.read()) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateFiles.rb b/examples/TemplateFiles.rb deleted file mode 100644 index 0ad5d6070..000000000 --- a/examples/TemplateFiles.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - file_bin = template_api.template_files(template_id) - FileUtils.cp(file_bin.path, "path/to/file.pdf") -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateFiles.ts b/examples/TemplateFiles.ts deleted file mode 100644 index 00217b49b..000000000 --- a/examples/TemplateFiles.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUri.cs b/examples/TemplateFilesAsDataUri.cs deleted file mode 100644 index 0d999f5ac..000000000 --- a/examples/TemplateFilesAsDataUri.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - var result = templateApi.TemplateFilesAsDataUri(templateId, "pdf", false, false); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateFilesAsDataUri.java b/examples/TemplateFilesAsDataUri.java deleted file mode 100644 index 868f2803a..000000000 --- a/examples/TemplateFilesAsDataUri.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponseDataUri result = templateApi.templateFilesAsDataUri(templateId); - 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/TemplateFilesAsDataUri.js b/examples/TemplateFilesAsDataUri.js deleted file mode 100644 index 8e0f53654..000000000 --- a/examples/TemplateFilesAsDataUri.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUri.php b/examples/TemplateFilesAsDataUri.php deleted file mode 100644 index f52cc28ea..000000000 --- a/examples/TemplateFilesAsDataUri.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateFilesAsDataUri($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFilesAsDataUri.py b/examples/TemplateFilesAsDataUri.py deleted file mode 100644 index 9dbc44e4a..000000000 --- a/examples/TemplateFilesAsDataUri.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files_as_data_uri(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateFilesAsDataUri.rb b/examples/TemplateFilesAsDataUri.rb deleted file mode 100644 index a6689553b..000000000 --- a/examples/TemplateFilesAsDataUri.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - result = template_api.template_files_as_data_uri(template_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateFilesAsDataUri.ts b/examples/TemplateFilesAsDataUri.ts deleted file mode 100644 index 8e0f53654..000000000 --- a/examples/TemplateFilesAsDataUri.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsDataUriExample.cs b/examples/TemplateFilesAsDataUriExample.cs new file mode 100644 index 000000000..5c946b84a --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsDataUriExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFilesAsDataUri( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsDataUri: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateFilesAsDataUriExample.java b/examples/TemplateFilesAsDataUriExample.java new file mode 100644 index 000000000..02c9b69ca --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); + 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/TemplateFilesAsDataUriExample.php b/examples/TemplateFilesAsDataUriExample.php new file mode 100644 index 000000000..df19ef818 --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/examples/TemplateFilesAsDataUriExample.py b/examples/TemplateFilesAsDataUriExample.py new file mode 100644 index 000000000..ce91dc6ec --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files_as_data_uri( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_files_as_data_uri: %s\n" % e) diff --git a/examples/TemplateFilesAsDataUriExample.rb b/examples/TemplateFilesAsDataUriExample.rb new file mode 100644 index 000000000..c51e03680 --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files_as_data_uri( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files_as_data_uri: #{e}" +end diff --git a/examples/TemplateFilesAsDataUri.sh b/examples/TemplateFilesAsDataUriExample.sh similarity index 100% rename from examples/TemplateFilesAsDataUri.sh rename to examples/TemplateFilesAsDataUriExample.sh diff --git a/examples/TemplateFilesAsDataUriExample.ts b/examples/TemplateFilesAsDataUriExample.ts new file mode 100644 index 000000000..40a8e2ac0 --- /dev/null +++ b/examples/TemplateFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/examples/TemplateFilesAsFileUrl.cs b/examples/TemplateFilesAsFileUrl.cs deleted file mode 100644 index 4bdc39d81..000000000 --- a/examples/TemplateFilesAsFileUrl.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - var result = templateApi.TemplateFilesAsFileUrl(templateId, "pdf", false, false); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateFilesAsFileUrl.java b/examples/TemplateFilesAsFileUrl.java deleted file mode 100644 index a3989a61f..000000000 --- a/examples/TemplateFilesAsFileUrl.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponse result = templateApi.templateFilesAsFileUrl(templateId); - 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/TemplateFilesAsFileUrl.js b/examples/TemplateFilesAsFileUrl.js deleted file mode 100644 index 305392726..000000000 --- a/examples/TemplateFilesAsFileUrl.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsFileUrl.php b/examples/TemplateFilesAsFileUrl.php deleted file mode 100644 index 36a061b98..000000000 --- a/examples/TemplateFilesAsFileUrl.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateFilesAsFileUrl($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateFilesAsFileUrl.py b/examples/TemplateFilesAsFileUrl.py deleted file mode 100644 index c1a8da3a7..000000000 --- a/examples/TemplateFilesAsFileUrl.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_files_as_file_url(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateFilesAsFileUrl.rb b/examples/TemplateFilesAsFileUrl.rb deleted file mode 100644 index b5502db1c..000000000 --- a/examples/TemplateFilesAsFileUrl.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - result = template_api.template_files_as_file_url(template_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateFilesAsFileUrl.ts b/examples/TemplateFilesAsFileUrl.ts deleted file mode 100644 index 305392726..000000000 --- a/examples/TemplateFilesAsFileUrl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateFilesAsFileUrlExample.cs b/examples/TemplateFilesAsFileUrlExample.cs new file mode 100644 index 000000000..3b5bc98f1 --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsFileUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFilesAsFileUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + forceDownload: 1 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsFileUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateFilesAsFileUrlExample.java b/examples/TemplateFilesAsFileUrlExample.java new file mode 100644 index 000000000..2b316f92b --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); + 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/TemplateFilesAsFileUrlExample.php b/examples/TemplateFilesAsFileUrlExample.php new file mode 100644 index 000000000..d4fb8f53c --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsFileUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/examples/TemplateFilesAsFileUrlExample.py b/examples/TemplateFilesAsFileUrlExample.py new file mode 100644 index 000000000..052891df2 --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files_as_file_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + force_download=1, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_files_as_file_url: %s\n" % e) diff --git a/examples/TemplateFilesAsFileUrlExample.rb b/examples/TemplateFilesAsFileUrlExample.rb new file mode 100644 index 000000000..055fd32f6 --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files_as_file_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + { + force_download: 1, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files_as_file_url: #{e}" +end diff --git a/examples/TemplateFilesAsFileUrl.sh b/examples/TemplateFilesAsFileUrlExample.sh similarity index 100% rename from examples/TemplateFilesAsFileUrl.sh rename to examples/TemplateFilesAsFileUrlExample.sh diff --git a/examples/TemplateFilesAsFileUrlExample.ts b/examples/TemplateFilesAsFileUrlExample.ts new file mode 100644 index 000000000..e80f1ad91 --- /dev/null +++ b/examples/TemplateFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/examples/TemplateFilesExample.cs b/examples/TemplateFilesExample.cs new file mode 100644 index 000000000..0cf55f3a6 --- /dev/null +++ b/examples/TemplateFilesExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateFilesExample.java b/examples/TemplateFilesExample.java new file mode 100644 index 000000000..d003de835 --- /dev/null +++ b/examples/TemplateFilesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + null // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFiles"); + 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/TemplateFilesExample.php b/examples/TemplateFilesExample.php new file mode 100644 index 000000000..2e2f46f74 --- /dev/null +++ b/examples/TemplateFilesExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFiles: {$e->getMessage()}"; +} diff --git a/examples/TemplateFilesExample.py b/examples/TemplateFilesExample.py new file mode 100644 index 000000000..d1f056a90 --- /dev/null +++ b/examples/TemplateFilesExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling TemplateApi#template_files: %s\n" % e) diff --git a/examples/TemplateFilesExample.rb b/examples/TemplateFilesExample.rb new file mode 100644 index 000000000..6aef00074 --- /dev/null +++ b/examples/TemplateFilesExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files: #{e}" +end diff --git a/examples/TemplateFiles.sh b/examples/TemplateFilesExample.sh similarity index 100% rename from examples/TemplateFiles.sh rename to examples/TemplateFilesExample.sh diff --git a/examples/TemplateFilesExample.ts b/examples/TemplateFilesExample.ts new file mode 100644 index 000000000..923f16d56 --- /dev/null +++ b/examples/TemplateFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + undefined, // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFiles:"); + console.log(error.body); +}); diff --git a/examples/TemplateGet.cs b/examples/TemplateGet.cs deleted file mode 100644 index 8354820fd..000000000 --- a/examples/TemplateGet.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - var result = templateApi.TemplateGet(templateId); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateGet.java b/examples/TemplateGet.java deleted file mode 100644 index 5c4721fd7..000000000 --- a/examples/TemplateGet.java +++ /dev/null @@ -1,33 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateGet(templateId); - 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/TemplateGet.js b/examples/TemplateGet.js deleted file mode 100644 index 365fe69b9..000000000 --- a/examples/TemplateGet.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateGet.php b/examples/TemplateGet.php deleted file mode 100644 index b6e469748..000000000 --- a/examples/TemplateGet.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateGet($templateId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateGet.py b/examples/TemplateGet.py deleted file mode 100644 index 1c41b3649..000000000 --- a/examples/TemplateGet.py +++ /dev/null @@ -1,21 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_get(template_id) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateGet.rb b/examples/TemplateGet.rb deleted file mode 100644 index f308d2b7b..000000000 --- a/examples/TemplateGet.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "f57db65d3f933b5316d398057a36176831451a35" - -begin - result = template_api.template_get(template_id) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateGet.ts b/examples/TemplateGet.ts deleted file mode 100644 index 365fe69b9..000000000 --- a/examples/TemplateGet.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateGetExample.cs b/examples/TemplateGetExample.cs new file mode 100644 index 000000000..067300032 --- /dev/null +++ b/examples/TemplateGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateGet( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateGetExample.java b/examples/TemplateGetExample.java new file mode 100644 index 000000000..2aabdc6bc --- /dev/null +++ b/examples/TemplateGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateGet( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateGet"); + 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/TemplateGetExample.php b/examples/TemplateGetExample.php new file mode 100644 index 000000000..3625ff5a4 --- /dev/null +++ b/examples/TemplateGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; +} diff --git a/examples/TemplateGetExample.py b/examples/TemplateGetExample.py new file mode 100644 index 000000000..2226f74d0 --- /dev/null +++ b/examples/TemplateGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_get( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_get: %s\n" % e) diff --git a/examples/TemplateGetExample.rb b/examples/TemplateGetExample.rb new file mode 100644 index 000000000..aacf15e90 --- /dev/null +++ b/examples/TemplateGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_get( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_get: #{e}" +end diff --git a/examples/TemplateGet.sh b/examples/TemplateGetExample.sh similarity index 100% rename from examples/TemplateGet.sh rename to examples/TemplateGetExample.sh diff --git a/examples/TemplateGetExample.ts b/examples/TemplateGetExample.ts new file mode 100644 index 000000000..b4fcdda6c --- /dev/null +++ b/examples/TemplateGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateGet( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateGet:"); + console.log(error.body); +}); diff --git a/examples/TemplateList.cs b/examples/TemplateList.cs deleted file mode 100644 index b6cb40dc2..000000000 --- a/examples/TemplateList.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var accountId = "f57db65d3f933b5316d398057a36176831451a35"; - - try - { - var result = templateApi.TemplateList(accountId, 1, 20, null); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateList.java b/examples/TemplateList.java deleted file mode 100644 index 136dcf3be..000000000 --- a/examples/TemplateList.java +++ /dev/null @@ -1,36 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var accountId = "f57db65d3f933b5316d398057a36176831451a35"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - TemplateListResponse result = templateApi.templateList(accountId, page, pageSize, query); - 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/TemplateList.js b/examples/TemplateList.js deleted file mode 100644 index be9197a82..000000000 --- a/examples/TemplateList.js +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateList.php b/examples/TemplateList.php deleted file mode 100644 index 1a2ea5b13..000000000 --- a/examples/TemplateList.php +++ /dev/null @@ -1,24 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -try { - $result = $templateApi->templateList($accountId); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateList.py b/examples/TemplateList.py deleted file mode 100644 index 4ce779ffe..000000000 --- a/examples/TemplateList.py +++ /dev/null @@ -1,23 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - account_id = "f57db65d3f933b5316d398057a36176831451a35" - - try: - response = template_api.template_list( - account_id=account_id, - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateList.rb b/examples/TemplateList.rb deleted file mode 100644 index e0006c738..000000000 --- a/examples/TemplateList.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -account_id = "f57db65d3f933b5316d398057a36176831451a35" - -begin - result = template_api.template_list({ account_id: account_id }) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateList.ts b/examples/TemplateList.ts deleted file mode 100644 index be9197a82..000000000 --- a/examples/TemplateList.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateListExample.cs b/examples/TemplateListExample.cs new file mode 100644 index 000000000..4d0b900bf --- /dev/null +++ b/examples/TemplateListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateListExample.java b/examples/TemplateListExample.java new file mode 100644 index 000000000..29e115b74 --- /dev/null +++ b/examples/TemplateListExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateList"); + 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/TemplateListExample.php b/examples/TemplateListExample.php new file mode 100644 index 000000000..eafde32da --- /dev/null +++ b/examples/TemplateListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateList: {$e->getMessage()}"; +} diff --git a/examples/TemplateListExample.py b/examples/TemplateListExample.py new file mode 100644 index 000000000..429531ec6 --- /dev/null +++ b/examples/TemplateListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_list: %s\n" % e) diff --git a/examples/TemplateListExample.rb b/examples/TemplateListExample.rb new file mode 100644 index 000000000..a69c46f66 --- /dev/null +++ b/examples/TemplateListExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_list: #{e}" +end diff --git a/examples/TemplateList.sh b/examples/TemplateListExample.sh similarity index 100% rename from examples/TemplateList.sh rename to examples/TemplateListExample.sh diff --git a/examples/TemplateListExample.ts b/examples/TemplateListExample.ts new file mode 100644 index 000000000..e678a6c26 --- /dev/null +++ b/examples/TemplateListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateList:"); + console.log(error.body); +}); diff --git a/examples/TemplateRemoveUser.cs b/examples/TemplateRemoveUser.cs deleted file mode 100644 index da93c4c7d..000000000 --- a/examples/TemplateRemoveUser.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var data = new TemplateRemoveUserRequest( - emailAddress: "george@dropboxsign.com" - ); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try - { - var result = templateApi.TemplateRemoveUser(templateId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateRemoveUser.java b/examples/TemplateRemoveUser.java deleted file mode 100644 index 9dd210c08..000000000 --- a/examples/TemplateRemoveUser.java +++ /dev/null @@ -1,36 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateRemoveUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateGetResponse result = templateApi.templateRemoveUser(templateId, data); - 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/TemplateRemoveUser.js b/examples/TemplateRemoveUser.js deleted file mode 100644 index 9683986c1..000000000 --- a/examples/TemplateRemoveUser.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateRemoveUser.php b/examples/TemplateRemoveUser.php deleted file mode 100644 index 8e7aa9a97..000000000 --- a/examples/TemplateRemoveUser.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateRemoveUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -try { - $result = $templateApi->templateRemoveUser($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateRemoveUser.py b/examples/TemplateRemoveUser.py deleted file mode 100644 index c16c4b001..000000000 --- a/examples/TemplateRemoveUser.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateRemoveUserRequest( - email_address="george@dropboxsign.com", - ) - - template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - - try: - response = template_api.template_remove_user(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateRemoveUser.rb b/examples/TemplateRemoveUser.rb deleted file mode 100644 index b9035297a..000000000 --- a/examples/TemplateRemoveUser.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateRemoveUserRequest.new -data.email_address = "george@dropboxsign.com" - -template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - -begin - result = template_api.template_remove_user(template_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateRemoveUser.ts b/examples/TemplateRemoveUser.ts deleted file mode 100644 index 7bd823902..000000000 --- a/examples/TemplateRemoveUser.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateRemoveUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateRemoveUserExample.cs b/examples/TemplateRemoveUserExample.cs new file mode 100644 index 000000000..66bcbfe53 --- /dev/null +++ b/examples/TemplateRemoveUserExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateRemoveUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateRemoveUserRequest = new TemplateRemoveUserRequest( + emailAddress: "george@dropboxsign.com" + ); + + try + { + var response = new TemplateApi(config).TemplateRemoveUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateRemoveUserRequest: templateRemoveUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateRemoveUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateRemoveUserExample.java b/examples/TemplateRemoveUserExample.java new file mode 100644 index 000000000..7d29ffac9 --- /dev/null +++ b/examples/TemplateRemoveUserExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateRemoveUserRequest = new TemplateRemoveUserRequest(); + templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateRemoveUser"); + 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/TemplateRemoveUserExample.php b/examples/TemplateRemoveUserExample.php new file mode 100644 index 000000000..ecd5770f4 --- /dev/null +++ b/examples/TemplateRemoveUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_remove_user_request = (new Dropbox\Sign\Model\TemplateRemoveUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateRemoveUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request: $template_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateRemoveUser: {$e->getMessage()}"; +} diff --git a/examples/TemplateRemoveUserExample.py b/examples/TemplateRemoveUserExample.py new file mode 100644 index 000000000..c44814c40 --- /dev/null +++ b/examples/TemplateRemoveUserExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_remove_user_request = models.TemplateRemoveUserRequest( + email_address="george@dropboxsign.com", + ) + + try: + response = api.TemplateApi(api_client).template_remove_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request=template_remove_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_remove_user: %s\n" % e) diff --git a/examples/TemplateRemoveUserExample.rb b/examples/TemplateRemoveUserExample.rb new file mode 100644 index 000000000..00687e102 --- /dev/null +++ b/examples/TemplateRemoveUserExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_remove_user_request = Dropbox::Sign::TemplateRemoveUserRequest.new +template_remove_user_request.email_address = "george@dropboxsign.com" + +begin + response = Dropbox::Sign::TemplateApi.new.template_remove_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_remove_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_remove_user: #{e}" +end diff --git a/examples/TemplateRemoveUser.sh b/examples/TemplateRemoveUserExample.sh similarity index 100% rename from examples/TemplateRemoveUser.sh rename to examples/TemplateRemoveUserExample.sh diff --git a/examples/TemplateRemoveUserExample.ts b/examples/TemplateRemoveUserExample.ts new file mode 100644 index 000000000..2d40a2f3f --- /dev/null +++ b/examples/TemplateRemoveUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateRemoveUserRequest: models.TemplateRemoveUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateRemoveUser:"); + console.log(error.body); +}); diff --git a/examples/TemplateUpdateFiles.cs b/examples/TemplateUpdateFiles.cs deleted file mode 100644 index 1ac81efd8..000000000 --- a/examples/TemplateUpdateFiles.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new TemplateUpdateFilesRequest( - files: files - ); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try - { - var result = templateApi.TemplateUpdateFiles(templateId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/TemplateUpdateFiles.java b/examples/TemplateUpdateFiles.java deleted file mode 100644 index 873544c84..000000000 --- a/examples/TemplateUpdateFiles.java +++ /dev/null @@ -1,38 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateUpdateFilesRequest() - .addFilesItem(new File("example_signature_request.pdf")); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateUpdateFilesResponse result = templateApi.templateUpdateFiles(templateId, data); - 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/TemplateUpdateFiles.js b/examples/TemplateUpdateFiles.js deleted file mode 100644 index 81eb26ecc..000000000 --- a/examples/TemplateUpdateFiles.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateUpdateFiles.php b/examples/TemplateUpdateFiles.php deleted file mode 100644 index c9e3fbe62..000000000 --- a/examples/TemplateUpdateFiles.php +++ /dev/null @@ -1,27 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateUpdateFilesRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -try { - $result = $templateApi->templateUpdateFiles($templateId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/TemplateUpdateFiles.py b/examples/TemplateUpdateFiles.py deleted file mode 100644 index 341af5020..000000000 --- a/examples/TemplateUpdateFiles.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateUpdateFilesRequest( - files=[open("example_signature_request.pdf", "rb")], - ) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - - try: - response = template_api.template_update_files(template_id, data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateUpdateFiles.rb b/examples/TemplateUpdateFiles.rb deleted file mode 100644 index f4c31e0c7..000000000 --- a/examples/TemplateUpdateFiles.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateUpdateFilesRequest.new -data.files = [File.new("example_signature_request.pdf", "r")] - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - -begin - result = template_api.template_update_files(template_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/TemplateUpdateFiles.ts b/examples/TemplateUpdateFiles.ts deleted file mode 100644 index ce6bee73e..000000000 --- a/examples/TemplateUpdateFiles.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import fs from "fs"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateUpdateFilesRequest = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/TemplateUpdateFilesExample.cs b/examples/TemplateUpdateFilesExample.cs new file mode 100644 index 000000000..1fe2ccf5e --- /dev/null +++ b/examples/TemplateUpdateFilesExample.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateUpdateFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest( + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new TemplateApi(config).TemplateUpdateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateUpdateFilesRequest: templateUpdateFilesRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateUpdateFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/TemplateUpdateFilesExample.java b/examples/TemplateUpdateFilesExample.java new file mode 100644 index 000000000..8f36d7626 --- /dev/null +++ b/examples/TemplateUpdateFilesExample.java @@ -0,0 +1,47 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateUpdateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); + templateUpdateFilesRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new TemplateApi(config).templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); + 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/TemplateUpdateFilesExample.php b/examples/TemplateUpdateFilesExample.php new file mode 100644 index 000000000..26470da0f --- /dev/null +++ b/examples/TemplateUpdateFilesExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_update_files_request = (new Dropbox\Sign\Model\TemplateUpdateFilesRequest()) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request: $template_update_files_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateUpdateFiles: {$e->getMessage()}"; +} diff --git a/examples/TemplateUpdateFilesExample.py b/examples/TemplateUpdateFilesExample.py new file mode 100644 index 000000000..71ab006be --- /dev/null +++ b/examples/TemplateUpdateFilesExample.py @@ -0,0 +1,27 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_update_files_request = models.TemplateUpdateFilesRequest( + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + ) + + try: + response = api.TemplateApi(api_client).template_update_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request=template_update_files_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_update_files: %s\n" % e) diff --git a/examples/TemplateUpdateFilesExample.rb b/examples/TemplateUpdateFilesExample.rb new file mode 100644 index 000000000..d5088f2a7 --- /dev/null +++ b/examples/TemplateUpdateFilesExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_update_files_request = Dropbox::Sign::TemplateUpdateFilesRequest.new +template_update_files_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] + +begin + response = Dropbox::Sign::TemplateApi.new.template_update_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_update_files_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_update_files: #{e}" +end diff --git a/examples/TemplateUpdateFiles.sh b/examples/TemplateUpdateFilesExample.sh similarity index 100% rename from examples/TemplateUpdateFiles.sh rename to examples/TemplateUpdateFilesExample.sh diff --git a/examples/TemplateUpdateFilesExample.ts b/examples/TemplateUpdateFilesExample.ts new file mode 100644 index 000000000..fe21c563d --- /dev/null +++ b/examples/TemplateUpdateFilesExample.ts @@ -0,0 +1,23 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateUpdateFilesRequest: models.TemplateUpdateFilesRequest = { + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateUpdateFiles:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreate.cs b/examples/UnclaimedDraftCreate.cs deleted file mode 100644 index b645322e5..000000000 --- a/examples/UnclaimedDraftCreate.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var signer1 = new SubUnclaimedDraftSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubUnclaimedDraftSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var subSigningOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY - ); - - var metadata = new Dictionary() - { - ["custom_id"] = 1234, - ["custom_text"] = "NDA #9" - }; - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new UnclaimedDraftCreateRequest( - subject: "The NDA we talked about", - type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - metadata: metadata, - signingOptions: subSigningOptions, - fieldOptions: subFieldOptions, - testMode: true - ); - - try - { - var result = unclaimedDraftApi.UnclaimedDraftCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/UnclaimedDraftCreate.java b/examples/UnclaimedDraftCreate.java deleted file mode 100644 index 5ba805715..000000000 --- a/examples/UnclaimedDraftCreate.java +++ /dev/null @@ -1,67 +0,0 @@ -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; -import java.util.List; -import java.util.Map; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer1 = new SubUnclaimedDraftSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubUnclaimedDraftSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var data = new UnclaimedDraftCreateRequest() - .subject("The NDA we talked about") - .type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE) - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(subSigningOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreate(data); - 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/UnclaimedDraftCreate.js b/examples/UnclaimedDraftCreate.js deleted file mode 100644 index 70d1c2a05..000000000 --- a/examples/UnclaimedDraftCreate.js +++ /dev/null @@ -1,64 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { - subject: "The NDA we talked about", - type: "request_signature", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreate.php b/examples/UnclaimedDraftCreate.php deleted file mode 100644 index e9d7bee89..000000000 --- a/examples/UnclaimedDraftCreate.php +++ /dev/null @@ -1,60 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer1->setEmailAddress("jack@example.com") - ->setName("Jack") - ->setOrder(0); - -$signer2 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateRequest(); -$data->setSubject("The NDA we talked about") - ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", - ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreate.py b/examples/UnclaimedDraftCreate.py deleted file mode 100644 index 3ae301624..000000000 --- a/examples/UnclaimedDraftCreate.py +++ /dev/null @@ -1,62 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - signer_1 = models.SubUnclaimedDraftSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubUnclaimedDraftSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) - - data = models.UnclaimedDraftCreateRequest( - subject="The NDA we talked about", - type="request_signature", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, - test_mode=True, - ) - - try: - response = unclaimed_draft_api.unclaimed_draft_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/UnclaimedDraftCreate.rb b/examples/UnclaimedDraftCreate.rb deleted file mode 100644 index 36d7ff747..000000000 --- a/examples/UnclaimedDraftCreate.rb +++ /dev/null @@ -1,56 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -signer_1 = Dropbox::Sign::SubUnclaimedDraftSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubUnclaimedDraftSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = false -signing_options.default_type = "draw" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::UnclaimedDraftCreateRequest.new -data.subject = "The NDA we talked about" -data.type = "request_signature" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", -] -data.files = [File.new("example_signature_request.pdf", "r")] -data.metadata = { - custom_id: 1234, - custom_text: "NDA #9", -} -data.signing_options = signing_options -data.field_options = field_options -data.test_mode = true - -begin - result = unclaimed_draft_api.unclaimed_draft_create(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/UnclaimedDraftCreate.ts b/examples/UnclaimedDraftCreate.ts deleted file mode 100644 index 137fc64e2..000000000 --- a/examples/UnclaimedDraftCreate.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.UnclaimedDraftCreateRequest = { - subject: "The NDA we talked about", - type: DropboxSign.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbedded.cs b/examples/UnclaimedDraftCreateEmbedded.cs deleted file mode 100644 index 294663094..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new UnclaimedDraftCreateEmbeddedRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: files, - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true - ); - - try - { - var result = unclaimedDraftApi.UnclaimedDraftCreateEmbedded(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/UnclaimedDraftCreateEmbedded.java b/examples/UnclaimedDraftCreateEmbedded.java deleted file mode 100644 index 56ad9a5ae..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.java +++ /dev/null @@ -1,39 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .addFilesItem(new File("example_signature_request.pdf")) - .requesterEmailAddress("jack@dropboxsign.com") - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); - 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/UnclaimedDraftCreateEmbedded.js b/examples/UnclaimedDraftCreateEmbedded.js deleted file mode 100644 index 6f0865c8e..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbedded.php b/examples/UnclaimedDraftCreateEmbedded.php deleted file mode 100644 index b163ca833..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbedded($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreateEmbedded.py b/examples/UnclaimedDraftCreateEmbedded.py deleted file mode 100644 index a5f260c23..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.py +++ /dev/null @@ -1,26 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - files=[open("example_signature_request.pdf", "rb")], - requester_email_address="jack@dropboxsign.com", - test_mode=True, - ) - - try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbedded.rb b/examples/UnclaimedDraftCreateEmbedded.rb deleted file mode 100644 index ab80ad56c..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -data = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.files = [File.new("example_signature_request.pdf", "r")] -data.requester_email_address = "jack@dropboxsign.com" -data.test_mode = true - -begin - result = unclaimed_draft_api.unclaimed_draft_create_embedded(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/UnclaimedDraftCreateEmbedded.ts b/examples/UnclaimedDraftCreateEmbedded.ts deleted file mode 100644 index 5dbdaab51..000000000 --- a/examples/UnclaimedDraftCreateEmbedded.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.cs b/examples/UnclaimedDraftCreateEmbeddedExample.cs new file mode 100644 index 000000000..4637922b5 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.java b/examples/UnclaimedDraftCreateEmbeddedExample.java new file mode 100644 index 000000000..e6bc38ff1 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.java @@ -0,0 +1,49 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(true); + unclaimedDraftCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/UnclaimedDraftCreateEmbeddedExample.php b/examples/UnclaimedDraftCreateEmbeddedExample.php new file mode 100644 index 000000000..4ad74cf2c --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(true) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.py b/examples/UnclaimedDraftCreateEmbeddedExample.py new file mode 100644 index 000000000..dade05ec4 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.py @@ -0,0 +1,29 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.rb b/examples/UnclaimedDraftCreateEmbeddedExample.rb new file mode 100644 index 000000000..a22330de8 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.rb @@ -0,0 +1,25 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = true +unclaimed_draft_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/examples/UnclaimedDraftCreateEmbedded.sh b/examples/UnclaimedDraftCreateEmbeddedExample.sh similarity index 100% rename from examples/UnclaimedDraftCreateEmbedded.sh rename to examples/UnclaimedDraftCreateEmbeddedExample.sh diff --git a/examples/UnclaimedDraftCreateEmbeddedExample.ts b/examples/UnclaimedDraftCreateEmbeddedExample.ts new file mode 100644 index 000000000..7b99e7d60 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedExample.ts @@ -0,0 +1,25 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs new file mode 100644 index 000000000..58e77d162 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java new file mode 100644 index 000000000..b9918381a --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java @@ -0,0 +1,95 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldGroups(formFieldGroups); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php new file mode 100644 index 000000000..c56719913 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php @@ -0,0 +1,76 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py new file mode 100644 index 000000000..b825eeac8 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py @@ -0,0 +1,78 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb new file mode 100644 index 000000000..46129e4d7 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb @@ -0,0 +1,71 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_field_groups = form_field_groups +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts new file mode 100644 index 000000000..f7953d6c4 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts @@ -0,0 +1,74 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs new file mode 100644 index 000000000..84dd5270d --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java new file mode 100644 index 000000000..1564f7803 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java @@ -0,0 +1,111 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldRules(formFieldRules); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php new file mode 100644 index 000000000..49f7d493d --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php @@ -0,0 +1,92 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py new file mode 100644 index 000000000..931cc0bdd --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py @@ -0,0 +1,96 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb new file mode 100644 index 000000000..a6b174891 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb @@ -0,0 +1,87 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_field_rules = form_field_rules +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts new file mode 100644 index 000000000..77d2ee9d8 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts @@ -0,0 +1,92 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..f9b29f003 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..2ec3a17e9 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java @@ -0,0 +1,83 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..249c7eacb --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php @@ -0,0 +1,64 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..6828613cd --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py @@ -0,0 +1,65 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..774085a28 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb @@ -0,0 +1,59 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..dcdee5d3b --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts @@ -0,0 +1,61 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs deleted file mode 100644 index 775c42111..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var signer = new SubUnclaimedDraftTemplateSigner( - role: "Client", - name: "George", - emailAddress: "george@example.com" - ); - - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@email.com" - ); - - var data = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - requesterEmailAddress: "jack@dropboxsign.com", - signers: new List(){signer}, - ccs: new List(){cc1}, - testMode: true - ); - - try - { - var result = unclaimedDraftApi.UnclaimedDraftCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.java b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.java deleted file mode 100644 index 7a5983a75..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.java +++ /dev/null @@ -1,50 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer = new SubUnclaimedDraftTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new UnclaimedDraftCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .requesterEmailAddress("jack@dropboxsign.com") - .signers(List.of(signer)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); - 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/UnclaimedDraftCreateEmbeddedWithTemplate.js b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.js deleted file mode 100644 index 097712e7f..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1 = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php deleted file mode 100644 index 7d870ac3c..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.php +++ /dev/null @@ -1,39 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner(); -$signer1->setRole("Client") - ->setName("George") - ->setEmailAddress("george@example.com"); - -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@dropboxsign.com"); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["61a832ff0d8423f91d503e76bfbcc750f7417c78"]) - ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setTestMode(true); - -try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbeddedWithTemplate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py deleted file mode 100644 index c4122b185..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py +++ /dev/null @@ -1,41 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - signer_1 = models.SubUnclaimedDraftTemplateSigner( - role="Client", - name="George", - email_address="george@example.com", - ) - - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requester_email_address="jack@dropboxsign.com", - signers=[signer_1], - ccs=[cc_1], - test_mode=True, - ) - - try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template( - data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb deleted file mode 100644 index abe1f5ca6..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb +++ /dev/null @@ -1,35 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -signer_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new -signer_1.role = "Client" -signer_1.name = "George" -signer_1.email_address = "george@example.com" - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -data = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.template_ids = ["61a832ff0d8423f91d503e76bfbcc750f7417c78"] -data.requester_email_address = "jack@dropboxsign.com" -data.signers = [signer_1] -data.ccs = [cc_1] -data.test_mode = true - -begin - result = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template(data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts deleted file mode 100644 index cc23f74af..000000000 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..2fea6ff83 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@dropboxsign.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signers1 = new SubUnclaimedDraftTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest: unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..1b888876a --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,68 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@dropboxsign.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signers1 = new SubUnclaimedDraftTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); + unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); + unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); + unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); + 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/UnclaimedDraftCreateEmbeddedWithTemplateExample.php b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..d51e60ee7 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@dropboxsign.com"); + +$ccs = [ + $ccs_1, +]; + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setTestMode(false) + ->setCcs($ccs) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( + unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..fbb76e6bf --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,50 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@dropboxsign.com", + ) + + ccs = [ + ccs_1, + ] + + signers_1 = models.SubUnclaimedDraftTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + unclaimed_draft_create_embedded_with_template_request = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + test_mode=False, + ccs=ccs, + signers=signers, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..c6e799cae --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,44 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@dropboxsign.com" + +ccs = [ + ccs_1, +] + +signers_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +unclaimed_draft_create_embedded_with_template_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new +unclaimed_draft_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_with_template_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +unclaimed_draft_create_embedded_with_template_request.test_mode = false +unclaimed_draft_create_embedded_with_template_request.ccs = ccs +unclaimed_draft_create_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: #{e}" +end diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh similarity index 100% rename from examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh rename to examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..a326c3679 --- /dev/null +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@dropboxsign.com", +}; + +const ccs = [ + ccs1, +]; + +const signers1: models.SubUnclaimedDraftTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers, +}; + +apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateExample.cs b/examples/UnclaimedDraftCreateExample.cs new file mode 100644 index 000000000..e5080a671 --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signers1 = new SubUnclaimedDraftSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers = new List + { + signers1, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signers: signers + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateExample.java b/examples/UnclaimedDraftCreateExample.java new file mode 100644 index 000000000..770bc0520 --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.java @@ -0,0 +1,58 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signers1 = new SubUnclaimedDraftSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(true); + unclaimedDraftCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + unclaimedDraftCreateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/UnclaimedDraftCreateExample.php b/examples/UnclaimedDraftCreateExample.php new file mode 100644 index 000000000..8aa132af0 --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.php @@ -0,0 +1,38 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(true) + ->setFiles([ + ]) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateExample.py b/examples/UnclaimedDraftCreateExample.py new file mode 100644 index 000000000..f7715b7ea --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.py @@ -0,0 +1,39 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signers_1 = models.SubUnclaimedDraftSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers = [ + signers_1, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signers=signers, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateExample.rb b/examples/UnclaimedDraftCreateExample.rb new file mode 100644 index 000000000..12f94dfd2 --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.rb @@ -0,0 +1,34 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signers_1 = Dropbox::Sign::SubUnclaimedDraftSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers = [ + signers_1, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = true +unclaimed_draft_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +unclaimed_draft_create_request.signers = signers + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/examples/UnclaimedDraftCreate.sh b/examples/UnclaimedDraftCreateExample.sh similarity index 100% rename from examples/UnclaimedDraftCreate.sh rename to examples/UnclaimedDraftCreateExample.sh diff --git a/examples/UnclaimedDraftCreateExample.ts b/examples/UnclaimedDraftCreateExample.ts new file mode 100644 index 000000000..aa94b5d77 --- /dev/null +++ b/examples/UnclaimedDraftCreateExample.ts @@ -0,0 +1,35 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signers1: models.SubUnclaimedDraftSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signers: signers, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.cs b/examples/UnclaimedDraftCreateFormFieldGroupsExample.cs new file mode 100644 index 000000000..b5ae35929 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.java b/examples/UnclaimedDraftCreateFormFieldGroupsExample.java new file mode 100644 index 000000000..1daa8d594 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.java @@ -0,0 +1,94 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldGroups(formFieldGroups); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/UnclaimedDraftCreateFormFieldGroupsExample.php b/examples/UnclaimedDraftCreateFormFieldGroupsExample.php new file mode 100644 index 000000000..92ec35b20 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.php @@ -0,0 +1,75 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.py b/examples/UnclaimedDraftCreateFormFieldGroupsExample.py new file mode 100644 index 000000000..4af69152a --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.py @@ -0,0 +1,77 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.rb b/examples/UnclaimedDraftCreateFormFieldGroupsExample.rb new file mode 100644 index 000000000..881fde8ab --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.rb @@ -0,0 +1,70 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_field_groups = form_field_groups +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts b/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts new file mode 100644 index 000000000..f6e079f42 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldGroupsExample.ts @@ -0,0 +1,73 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.cs b/examples/UnclaimedDraftCreateFormFieldRulesExample.cs new file mode 100644 index 000000000..b37690019 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.java b/examples/UnclaimedDraftCreateFormFieldRulesExample.java new file mode 100644 index 000000000..dc123db9f --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.java @@ -0,0 +1,110 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldRules(formFieldRules); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/UnclaimedDraftCreateFormFieldRulesExample.php b/examples/UnclaimedDraftCreateFormFieldRulesExample.php new file mode 100644 index 000000000..69bdb8503 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.php @@ -0,0 +1,91 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.py b/examples/UnclaimedDraftCreateFormFieldRulesExample.py new file mode 100644 index 000000000..a0bba3023 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.rb b/examples/UnclaimedDraftCreateFormFieldRulesExample.rb new file mode 100644 index 000000000..54822f3a7 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.rb @@ -0,0 +1,86 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_field_rules = form_field_rules +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/examples/UnclaimedDraftCreateFormFieldRulesExample.ts b/examples/UnclaimedDraftCreateFormFieldRulesExample.ts new file mode 100644 index 000000000..de9953660 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldRulesExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..86eae8aea --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.java b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..5fb0e7514 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.java @@ -0,0 +1,82 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/UnclaimedDraftCreateFormFieldsPerDocumentExample.php b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..93e3b015a --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,63 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.py b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..d15b6c577 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.py @@ -0,0 +1,64 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..e4bc66ec0 --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb @@ -0,0 +1,58 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..d010996de --- /dev/null +++ b/examples/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,60 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/examples/UnclaimedDraftEditAndResend.cs b/examples/UnclaimedDraftEditAndResend.cs deleted file mode 100644 index cfbb3709a..000000000 --- a/examples/UnclaimedDraftEditAndResend.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -public class Example -{ - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var data = new UnclaimedDraftEditAndResendRequest( - clientId: "1a659d9ad95bccd307ecad78d72192f8", - testMode: true - ); - - var signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - - try - { - var result = unclaimedDraftApi.UnclaimedDraftEditAndResend(signatureRequestId, data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } -} diff --git a/examples/UnclaimedDraftEditAndResend.java b/examples/UnclaimedDraftEditAndResend.java deleted file mode 100644 index bf33d8f69..000000000 --- a/examples/UnclaimedDraftEditAndResend.java +++ /dev/null @@ -1,37 +0,0 @@ -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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftEditAndResendRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .testMode(true); - - var signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); - 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/UnclaimedDraftEditAndResend.js b/examples/UnclaimedDraftEditAndResend.js deleted file mode 100644 index 0ff7c3683..000000000 --- a/examples/UnclaimedDraftEditAndResend.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftEditAndResend.php b/examples/UnclaimedDraftEditAndResend.php deleted file mode 100644 index 5f985d8c6..000000000 --- a/examples/UnclaimedDraftEditAndResend.php +++ /dev/null @@ -1,28 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -try { - $result = $unclaimedDraftApi->unclaimedDraftEditAndResend($signatureRequestId, $data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/examples/UnclaimedDraftEditAndResend.py b/examples/UnclaimedDraftEditAndResend.py deleted file mode 100644 index bbcad88ff..000000000 --- a/examples/UnclaimedDraftEditAndResend.py +++ /dev/null @@ -1,28 +0,0 @@ -from pprint import pprint - -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftEditAndResendRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - test_mode=True, - ) - - signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" - - try: - response = unclaimed_draft_api.unclaimed_draft_edit_and_resend( - signature_request_id, data - ) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/UnclaimedDraftEditAndResend.rb b/examples/UnclaimedDraftEditAndResend.rb deleted file mode 100644 index 9b4b1c7b6..000000000 --- a/examples/UnclaimedDraftEditAndResend.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "dropbox-sign" - -Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key - config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" -end - -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -data = Dropbox::Sign::UnclaimedDraftEditAndResendRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.test_mode = true - -signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" - -begin - result = unclaimed_draft_api.unclaimed_draft_edit_and_resend(signature_request_id, data) - p result -rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" -end diff --git a/examples/UnclaimedDraftEditAndResend.ts b/examples/UnclaimedDraftEditAndResend.ts deleted file mode 100644 index 320b0b750..000000000 --- a/examples/UnclaimedDraftEditAndResend.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftEditAndResendRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/examples/UnclaimedDraftEditAndResendExample.cs b/examples/UnclaimedDraftEditAndResendExample.cs new file mode 100644 index 000000000..459364b01 --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftEditAndResendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftEditAndResend( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimedDraftEditAndResendRequest: unclaimedDraftEditAndResendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftEditAndResend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/examples/UnclaimedDraftEditAndResendExample.java b/examples/UnclaimedDraftEditAndResendExample.java new file mode 100644 index 000000000..23ebe38ea --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftEditAndResendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); + unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftEditAndResendRequest.testMode(false); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); + 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/UnclaimedDraftEditAndResendExample.php b/examples/UnclaimedDraftEditAndResendExample.php new file mode 100644 index 000000000..f82ea4946 --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_edit_and_resend_request = (new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTestMode(false); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftEditAndResend( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request: $unclaimed_draft_edit_and_resend_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend: {$e->getMessage()}"; +} diff --git a/examples/UnclaimedDraftEditAndResendExample.py b/examples/UnclaimedDraftEditAndResendExample.py new file mode 100644 index 000000000..440aaaa9e --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_edit_and_resend_request = models.UnclaimedDraftEditAndResendRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + test_mode=False, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_edit_and_resend( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: %s\n" % e) diff --git a/examples/UnclaimedDraftEditAndResendExample.rb b/examples/UnclaimedDraftEditAndResendExample.rb new file mode 100644 index 000000000..dccc4d027 --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +unclaimed_draft_edit_and_resend_request = Dropbox::Sign::UnclaimedDraftEditAndResendRequest.new +unclaimed_draft_edit_and_resend_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_edit_and_resend_request.test_mode = false + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_edit_and_resend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + unclaimed_draft_edit_and_resend_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: #{e}" +end diff --git a/examples/UnclaimedDraftEditAndResend.sh b/examples/UnclaimedDraftEditAndResendExample.sh similarity index 100% rename from examples/UnclaimedDraftEditAndResend.sh rename to examples/UnclaimedDraftEditAndResendExample.sh diff --git a/examples/UnclaimedDraftEditAndResendExample.ts b/examples/UnclaimedDraftEditAndResendExample.ts new file mode 100644 index 000000000..04a04f15f --- /dev/null +++ b/examples/UnclaimedDraftEditAndResendExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftEditAndResendRequest: models.UnclaimedDraftEditAndResendRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false, +}; + +apiCaller.unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend:"); + console.log(error.body); +}); diff --git a/examples/json/AccountCreateOAuthResponseExample.json b/examples/json/AccountCreateOAuthResponse.json similarity index 100% rename from examples/json/AccountCreateOAuthResponseExample.json rename to examples/json/AccountCreateOAuthResponse.json diff --git a/examples/json/AccountCreateRequestDefaultExample.json b/examples/json/AccountCreateRequest.json similarity index 100% rename from examples/json/AccountCreateRequestDefaultExample.json rename to examples/json/AccountCreateRequest.json diff --git a/examples/json/AccountCreateRequestOAuthExample.json b/examples/json/AccountCreateRequestOAuth.json similarity index 100% rename from examples/json/AccountCreateRequestOAuthExample.json rename to examples/json/AccountCreateRequestOAuth.json diff --git a/examples/json/AccountCreateResponseExample.json b/examples/json/AccountCreateResponse.json similarity index 100% rename from examples/json/AccountCreateResponseExample.json rename to examples/json/AccountCreateResponse.json diff --git a/examples/json/AccountGetResponseExample.json b/examples/json/AccountGetResponse.json similarity index 100% rename from examples/json/AccountGetResponseExample.json rename to examples/json/AccountGetResponse.json diff --git a/examples/json/AccountUpdateRequestDefaultExample.json b/examples/json/AccountUpdateRequest.json similarity index 100% rename from examples/json/AccountUpdateRequestDefaultExample.json rename to examples/json/AccountUpdateRequest.json diff --git a/examples/json/AccountUpdateResponseExample.json b/examples/json/AccountUpdateResponse.json similarity index 100% rename from examples/json/AccountUpdateResponseExample.json rename to examples/json/AccountUpdateResponse.json diff --git a/examples/json/AccountVerifyFoundResponseExample.json b/examples/json/AccountVerifyFoundResponse.json similarity index 100% rename from examples/json/AccountVerifyFoundResponseExample.json rename to examples/json/AccountVerifyFoundResponse.json diff --git a/examples/json/AccountVerifyNotFoundResponseExample.json b/examples/json/AccountVerifyNotFoundResponse.json similarity index 100% rename from examples/json/AccountVerifyNotFoundResponseExample.json rename to examples/json/AccountVerifyNotFoundResponse.json diff --git a/examples/json/AccountVerifyRequestDefaultExample.json b/examples/json/AccountVerifyRequest.json similarity index 100% rename from examples/json/AccountVerifyRequestDefaultExample.json rename to examples/json/AccountVerifyRequest.json diff --git a/examples/json/ApiAppCreateRequest.json b/examples/json/ApiAppCreateRequest.json new file mode 100644 index 000000000..e21b53a74 --- /dev/null +++ b/examples/json/ApiAppCreateRequest.json @@ -0,0 +1,18 @@ +{ + "name": "My Production App", + "custom_logo_file": "CustomLogoFile.png", + "domains": [ + "example.com" + ], + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ] + }, + "white_labeling_options": { + "primary_button_color": "#00b3e6", + "primary_button_text_color": "#ffffff" + } +} diff --git a/examples/json/ApiAppCreateRequestDefaultExample.json b/examples/json/ApiAppCreateRequestDefaultExample.json deleted file mode 100644 index 2d5cd3c74..000000000 --- a/examples/json/ApiAppCreateRequestDefaultExample.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "My Production App", - "domains": [ - "example.com" - ], - "oauth": { - "callback_url": "https://example.com/oauth", - "scopes": [ - "basic_account_info", - "request_signature" - ] - }, - "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" - } -} diff --git a/examples/json/ApiAppCreateResponse.json b/examples/json/ApiAppCreateResponse.json new file mode 100644 index 000000000..9e81c9fc0 --- /dev/null +++ b/examples/json/ApiAppCreateResponse.json @@ -0,0 +1,26 @@ +{ + "api_app": { + "callback_url": null, + "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", + "created_at": 1436232339, + "domains": ["example.com"], + "is_approved": false, + "name": "My Production App", + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ], + "secret": "98891a1b59f312d04cd88e4e0c498d75" + }, + "owner_account": { + "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", + "email_address": "john@example.com" + }, + "white_labeling_options": { + "primary_button_color": "#00b3e6", + "primary_button_text_color": "#ffffff" + } + } +} diff --git a/examples/json/ApiAppCreateResponseExample.json b/examples/json/ApiAppCreateResponseExample.json deleted file mode 100644 index 9e92dda05..000000000 --- a/examples/json/ApiAppCreateResponseExample.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "api_app": { - "callback_url": null, - "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", - "created_at": 1436232339, - "domains": ["example.com"], - "is_approved": false, - "name": "My Production App", - "oauth": { - "callback_url": "http://example.com/oauth", - "scopes": [ - "basic_account_info", - "request_signature" - ], - "secret": "98891a1b59f312d04cd88e4e0c498d75" - }, - "owner_account": { - "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", - "email_address": "john@example.com" - }, - "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" - } - } -} diff --git a/examples/json/ApiAppGetResponse.json b/examples/json/ApiAppGetResponse.json new file mode 100644 index 000000000..a060d5261 --- /dev/null +++ b/examples/json/ApiAppGetResponse.json @@ -0,0 +1,22 @@ +{ + "api_app": { + "callback_url": null, + "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", + "created_at": 1436232339, + "domains": ["example.com"], + "is_approved": true, + "name": "My Production App", + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ], + "secret": "98891a1b59f312d04cd88e4e0c498d75" + }, + "owner_account": { + "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", + "email_address": "john@example.com" + } + } +} diff --git a/examples/json/ApiAppGetResponseExample.json b/examples/json/ApiAppGetResponseExample.json deleted file mode 100644 index 6074e44ec..000000000 --- a/examples/json/ApiAppGetResponseExample.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "api_app": { - "callback_url": null, - "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", - "created_at": 1436232339, - "domains": ["example.com"], - "is_approved": true, - "name": "My Production App", - "oauth": { - "callback_url": "http://example.com/oauth", - "scopes": [ - "basic_account_info", - "request_signature" - ], - "secret": "98891a1b59f312d04cd88e4e0c498d75" - }, - "owner_account": { - "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", - "email_address": "john@example.com" - } - } -} diff --git a/examples/json/ApiAppListResponse.json b/examples/json/ApiAppListResponse.json new file mode 100644 index 000000000..130766322 --- /dev/null +++ b/examples/json/ApiAppListResponse.json @@ -0,0 +1,43 @@ +{ + "api_apps": [ + { + "callback_url": null, + "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", + "created_at": 1436232339, + "domains": ["example.com"], + "is_approved": true, + "name": "My Production App", + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ], + "secret": "98891a1b59f312d04cd88e4e0c498d75" + }, + "owner_account": { + "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", + "email_address": "john@example.com" + } + }, + { + "callback_url": null, + "client_id": "bff6d867fafcca27554cf89b1ca98793", + "created_at": 1433458421, + "domains": ["example.com"], + "is_approved": false, + "name": "My Other App", + "oauth": null, + "owner_account": { + "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", + "email_address": "john@example.com" + } + } + ], + "list_info": { + "num_pages": 1, + "num_results": 2, + "page": 1, + "page_size": 20 + } +} diff --git a/examples/json/ApiAppListResponseExample.json b/examples/json/ApiAppListResponseExample.json deleted file mode 100644 index 3c358bff5..000000000 --- a/examples/json/ApiAppListResponseExample.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "api_apps": [ - { - "callback_url": null, - "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", - "created_at": 1436232339, - "domains": ["example.com"], - "is_approved": true, - "name": "My Production App", - "oauth": { - "callback_url": "http://example.com/oauth", - "scopes": [ - "basic_account_info", - "request_signature" - ], - "secret": "98891a1b59f312d04cd88e4e0c498d75" - }, - "owner_account": { - "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", - "email_address": "john@example.com" - } - }, - { - "callback_url": null, - "client_id": "bff6d867fafcca27554cf89b1ca98793", - "created_at": 1433458421, - "domains": ["example.com"], - "is_approved": false, - "name": "My Other App", - "oauth": null, - "owner_account": { - "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", - "email_address": "john@example.com" - } - } - ], - "list_info": { - "num_pages": 1, - "num_results": 2, - "page": 1, - "page_size": 20 - } -} diff --git a/examples/json/ApiAppUpdateRequest.json b/examples/json/ApiAppUpdateRequest.json new file mode 100644 index 000000000..3a06dbcf6 --- /dev/null +++ b/examples/json/ApiAppUpdateRequest.json @@ -0,0 +1,19 @@ +{ + "name": "New Name", + "callback_url": "https://example.com/dropboxsign", + "custom_logo_file": "CustomLogoFile.png", + "domains": [ + "example.com" + ], + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ] + }, + "white_labeling_options": { + "primary_button_color": "#00b3e6", + "primary_button_text_color": "#ffffff" + } +} diff --git a/examples/json/ApiAppUpdateRequestDefaultExample.json b/examples/json/ApiAppUpdateRequestDefaultExample.json deleted file mode 100644 index f7bffb683..000000000 --- a/examples/json/ApiAppUpdateRequestDefaultExample.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "New Name", - "callback_url": "http://example.com/dropboxsign", - "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" - } -} diff --git a/examples/json/ApiAppUpdateResponse.json b/examples/json/ApiAppUpdateResponse.json new file mode 100644 index 000000000..8b53b27db --- /dev/null +++ b/examples/json/ApiAppUpdateResponse.json @@ -0,0 +1,26 @@ +{ + "api_app": { + "callback_url": "https://example.com/dropboxsign", + "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", + "created_at": 1436232339, + "domains": ["example.com"], + "is_approved": false, + "name": "New Name", + "oauth": { + "callback_url": "https://example.com/oauth", + "scopes": [ + "basic_account_info", + "request_signature" + ], + "secret": "98891a1b59f312d04cd88e4e0c498d75" + }, + "owner_account": { + "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", + "email_address": "john@example.com" + }, + "white_labeling_options": { + "primary_button_color": "#00b3e6", + "primary_button_text_color": "#ffffff" + } + } +} diff --git a/examples/json/ApiAppUpdateResponseExample.json b/examples/json/ApiAppUpdateResponseExample.json deleted file mode 100644 index 75c789a12..000000000 --- a/examples/json/ApiAppUpdateResponseExample.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "api_app": { - "callback_url": "http://example.com/dropboxsign", - "client_id": "0dd3b823a682527788c4e40cb7b6f7e9", - "created_at": 1436232339, - "domains": ["example.com"], - "is_approved": false, - "name": "New Name", - "oauth": { - "callback_url": "http://example.com/oauth", - "scopes": [ - "basic_account_info", - "request_signature" - ], - "secret": "98891a1b59f312d04cd88e4e0c498d75" - }, - "owner_account": { - "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", - "email_address": "john@example.com" - }, - "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" - } - } -} diff --git a/examples/json/BulkSendJobGetResponseExample.json b/examples/json/BulkSendJobGetResponse.json similarity index 100% rename from examples/json/BulkSendJobGetResponseExample.json rename to examples/json/BulkSendJobGetResponse.json diff --git a/examples/json/BulkSendJobListResponseExample.json b/examples/json/BulkSendJobListResponse.json similarity index 100% rename from examples/json/BulkSendJobListResponseExample.json rename to examples/json/BulkSendJobListResponse.json diff --git a/examples/json/EmbeddedEditUrlRequestDefaultExample.json b/examples/json/EmbeddedEditUrlRequest.json similarity index 100% rename from examples/json/EmbeddedEditUrlRequestDefaultExample.json rename to examples/json/EmbeddedEditUrlRequest.json diff --git a/examples/json/EmbeddedEditUrlResponseExample.json b/examples/json/EmbeddedEditUrlResponse.json similarity index 100% rename from examples/json/EmbeddedEditUrlResponseExample.json rename to examples/json/EmbeddedEditUrlResponse.json diff --git a/examples/json/EmbeddedSignUrlResponseExample.json b/examples/json/EmbeddedSignUrlResponse.json similarity index 100% rename from examples/json/EmbeddedSignUrlResponseExample.json rename to examples/json/EmbeddedSignUrlResponse.json diff --git a/examples/json/Error400ResponseExample.json b/examples/json/Error400Response.json similarity index 100% rename from examples/json/Error400ResponseExample.json rename to examples/json/Error400Response.json diff --git a/examples/json/Error401ResponseExample.json b/examples/json/Error401Response.json similarity index 100% rename from examples/json/Error401ResponseExample.json rename to examples/json/Error401Response.json diff --git a/examples/json/Error402ResponseExample.json b/examples/json/Error402Response.json similarity index 100% rename from examples/json/Error402ResponseExample.json rename to examples/json/Error402Response.json diff --git a/examples/json/Error403ResponseExample.json b/examples/json/Error403Response.json similarity index 100% rename from examples/json/Error403ResponseExample.json rename to examples/json/Error403Response.json diff --git a/examples/json/Error404ResponseExample.json b/examples/json/Error404Response.json similarity index 100% rename from examples/json/Error404ResponseExample.json rename to examples/json/Error404Response.json diff --git a/examples/json/Error409ResponseExample.json b/examples/json/Error409Response.json similarity index 100% rename from examples/json/Error409ResponseExample.json rename to examples/json/Error409Response.json diff --git a/examples/json/Error410ResponseExample.json b/examples/json/Error410Response.json similarity index 100% rename from examples/json/Error410ResponseExample.json rename to examples/json/Error410Response.json diff --git a/examples/json/Error422ResponseExample.json b/examples/json/Error422Response.json similarity index 100% rename from examples/json/Error422ResponseExample.json rename to examples/json/Error422Response.json diff --git a/examples/json/Error429ResponseExample.json b/examples/json/Error429Response.json similarity index 100% rename from examples/json/Error429ResponseExample.json rename to examples/json/Error429Response.json diff --git a/examples/json/Error4XXResponseExample.json b/examples/json/Error4XXResponse.json similarity index 100% rename from examples/json/Error4XXResponseExample.json rename to examples/json/Error4XXResponse.json diff --git a/examples/json/EventCallbackAccountSignatureRequestSentExample.json b/examples/json/EventCallbackAccountSignatureRequestSent.json similarity index 100% rename from examples/json/EventCallbackAccountSignatureRequestSentExample.json rename to examples/json/EventCallbackAccountSignatureRequestSent.json diff --git a/examples/json/EventCallbackAccountTemplateCreatedExample.json b/examples/json/EventCallbackAccountTemplateCreated.json similarity index 100% rename from examples/json/EventCallbackAccountTemplateCreatedExample.json rename to examples/json/EventCallbackAccountTemplateCreated.json diff --git a/examples/json/EventCallbackAppAccountConfirmedExample.json b/examples/json/EventCallbackAppAccountConfirmed.json similarity index 100% rename from examples/json/EventCallbackAppAccountConfirmedExample.json rename to examples/json/EventCallbackAppAccountConfirmed.json diff --git a/examples/json/EventCallbackAppSignatureRequestSentExample.json b/examples/json/EventCallbackAppSignatureRequestSent.json similarity index 100% rename from examples/json/EventCallbackAppSignatureRequestSentExample.json rename to examples/json/EventCallbackAppSignatureRequestSent.json diff --git a/examples/json/EventCallbackAppTemplateCreatedExample.json b/examples/json/EventCallbackAppTemplateCreated.json similarity index 100% rename from examples/json/EventCallbackAppTemplateCreatedExample.json rename to examples/json/EventCallbackAppTemplateCreated.json diff --git a/examples/json/FaxGetResponseExample.json b/examples/json/FaxGetResponse.json similarity index 100% rename from examples/json/FaxGetResponseExample.json rename to examples/json/FaxGetResponse.json diff --git a/examples/json/FaxLineAddUserRequestExample.json b/examples/json/FaxLineAddUserRequest.json similarity index 100% rename from examples/json/FaxLineAddUserRequestExample.json rename to examples/json/FaxLineAddUserRequest.json diff --git a/examples/json/FaxLineAreaCodeGetResponseExample.json b/examples/json/FaxLineAreaCodeGetResponse.json similarity index 100% rename from examples/json/FaxLineAreaCodeGetResponseExample.json rename to examples/json/FaxLineAreaCodeGetResponse.json diff --git a/examples/json/FaxLineCreateRequestExample.json b/examples/json/FaxLineCreateRequest.json similarity index 100% rename from examples/json/FaxLineCreateRequestExample.json rename to examples/json/FaxLineCreateRequest.json diff --git a/examples/json/FaxLineDeleteRequest.json b/examples/json/FaxLineDeleteRequest.json new file mode 100644 index 000000000..1ffef7fe5 --- /dev/null +++ b/examples/json/FaxLineDeleteRequest.json @@ -0,0 +1,3 @@ +{ + "number": "[FAX_NUMBER]" +} diff --git a/examples/json/FaxLineDeleteRequestExample.json b/examples/json/FaxLineDeleteRequestExample.json deleted file mode 100644 index 4bc5f0b67..000000000 --- a/examples/json/FaxLineDeleteRequestExample.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "number": "[FAX_NUMBER]", -} diff --git a/examples/json/FaxLineListResponseExample.json b/examples/json/FaxLineListResponse.json similarity index 100% rename from examples/json/FaxLineListResponseExample.json rename to examples/json/FaxLineListResponse.json diff --git a/examples/json/FaxLineRemoveUserRequestExample.json b/examples/json/FaxLineRemoveUserRequest.json similarity index 100% rename from examples/json/FaxLineRemoveUserRequestExample.json rename to examples/json/FaxLineRemoveUserRequest.json diff --git a/examples/json/FaxLineResponseExample.json b/examples/json/FaxLineResponse.json similarity index 100% rename from examples/json/FaxLineResponseExample.json rename to examples/json/FaxLineResponse.json diff --git a/examples/json/FaxListResponseExample.json b/examples/json/FaxListResponse.json similarity index 100% rename from examples/json/FaxListResponseExample.json rename to examples/json/FaxListResponse.json diff --git a/examples/json/FaxSendRequest.json b/examples/json/FaxSendRequest.json new file mode 100644 index 000000000..7bfb88209 --- /dev/null +++ b/examples/json/FaxSendRequest.json @@ -0,0 +1,12 @@ +{ + "files": [ + "./example_fax.pdf" + ], + "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/examples/json/FaxSendRequestExample.json b/examples/json/FaxSendRequestExample.json deleted file mode 100644 index fe7e68820..000000000 --- a/examples/json/FaxSendRequestExample.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "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!" -} \ No newline at end of file diff --git a/examples/json/OAuthTokenGenerateRequestExample.json b/examples/json/OAuthTokenGenerateRequest.json similarity index 100% rename from examples/json/OAuthTokenGenerateRequestExample.json rename to examples/json/OAuthTokenGenerateRequest.json diff --git a/examples/json/OAuthTokenGenerateResponseExample.json b/examples/json/OAuthTokenGenerateResponse.json similarity index 100% rename from examples/json/OAuthTokenGenerateResponseExample.json rename to examples/json/OAuthTokenGenerateResponse.json diff --git a/examples/json/OAuthTokenRefreshRequestExample.json b/examples/json/OAuthTokenRefreshRequest.json similarity index 100% rename from examples/json/OAuthTokenRefreshRequestExample.json rename to examples/json/OAuthTokenRefreshRequest.json diff --git a/examples/json/OAuthTokenRefreshResponseExample.json b/examples/json/OAuthTokenRefreshResponse.json similarity index 100% rename from examples/json/OAuthTokenRefreshResponseExample.json rename to examples/json/OAuthTokenRefreshResponse.json diff --git a/examples/json/ReportCreateRequestDefaultExample.json b/examples/json/ReportCreateRequest.json similarity index 100% rename from examples/json/ReportCreateRequestDefaultExample.json rename to examples/json/ReportCreateRequest.json diff --git a/examples/json/ReportCreateResponseExample.json b/examples/json/ReportCreateResponse.json similarity index 100% rename from examples/json/ReportCreateResponseExample.json rename to examples/json/ReportCreateResponse.json diff --git a/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json b/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json similarity index 100% rename from examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json rename to examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json diff --git a/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestFormDataExample.json b/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestFormData.json similarity index 100% rename from examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestFormDataExample.json rename to examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestFormData.json diff --git a/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json b/examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json similarity index 100% rename from examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json rename to examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json diff --git a/examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json b/examples/json/SignatureRequestBulkSendWithTemplateRequest.json similarity index 100% rename from examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json rename to examples/json/SignatureRequestBulkSendWithTemplateRequest.json diff --git a/examples/json/SignatureRequestBulkSendWithTemplateRequestFormDataExample.json b/examples/json/SignatureRequestBulkSendWithTemplateRequestFormData.json similarity index 100% rename from examples/json/SignatureRequestBulkSendWithTemplateRequestFormDataExample.json rename to examples/json/SignatureRequestBulkSendWithTemplateRequestFormData.json diff --git a/examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json b/examples/json/SignatureRequestBulkSendWithTemplateResponse.json similarity index 100% rename from examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json rename to examples/json/SignatureRequestBulkSendWithTemplateResponse.json diff --git a/examples/json/SignatureRequestCreateEmbeddedRequest.json b/examples/json/SignatureRequestCreateEmbeddedRequest.json new file mode 100644 index 000000000..ba7accb05 --- /dev/null +++ b/examples/json/SignatureRequestCreateEmbeddedRequest.json @@ -0,0 +1,33 @@ +{ + "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack", + "order": 0 + }, + { + "email_address": "jill@example.com", + "name": "Jill", + "order": 1 + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "files": [ + "./example_signature_request.pdf" + ], + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json b/examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json deleted file mode 100644 index 724db5940..000000000 --- a/examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", - "title": "NDA with Acme Co.", - "subject": "The NDA we talked about", - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "signers": [ - { - "email_address": "jack@example.com", - "name": "Jack", - "order": 0 - }, - { - "email_address": "jill@example.com", - "name": "Jill", - "order": 1 - } - ], - "cc_email_addresses": [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - ], - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "signing_options": { - "draw": true, - "type": true, - "upload": true, - "phone": false, - "default_type": "draw" - }, - "test_mode": true -} diff --git a/examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json b/examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json similarity index 100% rename from examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json rename to examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json diff --git a/examples/json/SignatureRequestCreateEmbeddedResponseExample.json b/examples/json/SignatureRequestCreateEmbeddedResponse.json similarity index 100% rename from examples/json/SignatureRequestCreateEmbeddedResponseExample.json rename to examples/json/SignatureRequestCreateEmbeddedResponse.json diff --git a/examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json b/examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json similarity index 100% rename from examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json rename to examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json diff --git a/examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json b/examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json similarity index 100% rename from examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json rename to examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json diff --git a/examples/json/SignatureRequestEditEmbeddedRequest.json b/examples/json/SignatureRequestEditEmbeddedRequest.json new file mode 100644 index 000000000..ba7accb05 --- /dev/null +++ b/examples/json/SignatureRequestEditEmbeddedRequest.json @@ -0,0 +1,33 @@ +{ + "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack", + "order": 0 + }, + { + "email_address": "jill@example.com", + "name": "Jill", + "order": 1 + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "files": [ + "./example_signature_request.pdf" + ], + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json b/examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json new file mode 100644 index 000000000..fb8cb1935 --- /dev/null +++ b/examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json @@ -0,0 +1,51 @@ +{ + "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "grouped_signers": [ + { + "group": "Group #1", + "order": 0, + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack" + }, + { + "email_address": "jill@example.com", + "name": "Jill" + } + ] + }, + { + "group": "Group #2", + "order": 1, + "signers": [ + { + "email_address": "bob@example.com", + "name": "Bob" + }, + { + "email_address": "charlie@example.com", + "name": "Charlie" + } + ] + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "file_urls": [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + ], + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestEditEmbeddedResponse.json b/examples/json/SignatureRequestEditEmbeddedResponse.json new file mode 100644 index 000000000..5def13bab --- /dev/null +++ b/examples/json/SignatureRequestEditEmbeddedResponse.json @@ -0,0 +1,52 @@ +{ + "signature_request": { + "signature_request_id": "a9f4825edef25f47e7b4c14ce8100d81d1693160", + "title": "NDA with Acme Co.", + "original_title": "The NDA we talked about", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + "metadata": {}, + "created_at": 1570471067, + "is_complete": false, + "is_declined": false, + "has_error": false, + "custom_fields": [], + "response_data": [], + "signing_url": null, + "signing_redirect_url": null, + "details_url": "https://app.hellosign.com/home/manage?guid=a9f4825edef25f47e7b4c14ce8100d81d1693160", + "requester_email_address": "me@dropboxsign.com", + "signatures": [ + { + "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3", + "signer_email_address": "jack@example.com", + "signer_name": "Jack", + "signer_role": null, + "order": 0, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + }, + { + "signature_id": "616629ed37f8588d28600be17ab5d6b7", + "signer_email_address": "jill@example.com", + "signer_name": "Jill", + "signer_role": null, + "order": 1, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ] + } +} diff --git a/examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json b/examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json new file mode 100644 index 000000000..742998123 --- /dev/null +++ b/examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json @@ -0,0 +1,23 @@ +{ + "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + "template_ids": [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + ], + "subject": "Purchase Order", + "message": "Glad we could come to an agreement.", + "signers": [ + { + "role": "Client", + "name": "George", + "email_address": "george@example.com" + } + ], + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestEditEmbeddedWithTemplateResponse.json b/examples/json/SignatureRequestEditEmbeddedWithTemplateResponse.json new file mode 100644 index 000000000..3099142f2 --- /dev/null +++ b/examples/json/SignatureRequestEditEmbeddedWithTemplateResponse.json @@ -0,0 +1,45 @@ +{ + "signature_request": { + "signature_request_id": "17d163069282df5eb63857d31ff4a3bffa9e46c0", + "title": "Purchase Order", + "original_title": "Purchase Order", + "subject": "Purchase Order", + "metadata": {}, + "message": "Glad we could come to an agreement.", + "is_complete": false, + "is_declined": false, + "has_error": false, + "custom_fields": [ + { + "name": "Cost", + "value": "$20,000", + "type": "text", + "editor": "Client", + "required": true + } + ], + "response_data": [], + "signing_url": null, + "signing_redirect_url": null, + "details_url": "https://app.hellosign.com/home/manage?guid=17d163069282df5eb63857d31ff4a3bffa9e46c0", + "requester_email_address": "me@dropboxsign.com", + "signatures": [ + { + "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3", + "signer_email_address": "george@example.com", + "signer_name": "George", + "signer_role": "Client", + "order": null, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + } + ], + "cc_email_addresses": [ + "accounting@dropboxsign.com" + ] + } +} diff --git a/examples/json/SignatureRequestEditRequest.json b/examples/json/SignatureRequestEditRequest.json new file mode 100644 index 000000000..3d1b98727 --- /dev/null +++ b/examples/json/SignatureRequestEditRequest.json @@ -0,0 +1,39 @@ +{ + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack", + "order": 0 + }, + { + "email_address": "jill@example.com", + "name": "Jill", + "order": 1 + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "files": [ + "./example_signature_request.pdf" + ], + "metadata": { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "field_options": { + "date_format": "DD - MM - YYYY" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestSendRequestGroupedSignersExample.json b/examples/json/SignatureRequestEditRequestGroupedSigners.json similarity index 100% rename from examples/json/SignatureRequestSendRequestGroupedSignersExample.json rename to examples/json/SignatureRequestEditRequestGroupedSigners.json diff --git a/examples/json/SignatureRequestSendResponseExample.json b/examples/json/SignatureRequestEditResponse.json similarity index 100% rename from examples/json/SignatureRequestSendResponseExample.json rename to examples/json/SignatureRequestEditResponse.json diff --git a/examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json b/examples/json/SignatureRequestEditWithTemplateRequest.json similarity index 100% rename from examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json rename to examples/json/SignatureRequestEditWithTemplateRequest.json diff --git a/examples/json/SignatureRequestSendWithTemplateResponseExample.json b/examples/json/SignatureRequestEditWithTemplateResponse.json similarity index 100% rename from examples/json/SignatureRequestSendWithTemplateResponseExample.json rename to examples/json/SignatureRequestEditWithTemplateResponse.json diff --git a/examples/json/SignatureRequestFilesResponseExample.json b/examples/json/SignatureRequestFilesResponse.json similarity index 100% rename from examples/json/SignatureRequestFilesResponseExample.json rename to examples/json/SignatureRequestFilesResponse.json diff --git a/examples/json/SignatureRequestGetResponseExample.json b/examples/json/SignatureRequestGetResponse.json similarity index 100% rename from examples/json/SignatureRequestGetResponseExample.json rename to examples/json/SignatureRequestGetResponse.json diff --git a/examples/json/SignatureRequestListResponseExample.json b/examples/json/SignatureRequestListResponse.json similarity index 100% rename from examples/json/SignatureRequestListResponseExample.json rename to examples/json/SignatureRequestListResponse.json diff --git a/examples/json/SignatureRequestReleaseHoldResponseExample.json b/examples/json/SignatureRequestReleaseHoldResponse.json similarity index 100% rename from examples/json/SignatureRequestReleaseHoldResponseExample.json rename to examples/json/SignatureRequestReleaseHoldResponse.json diff --git a/examples/json/SignatureRequestRemindRequestDefaultExample.json b/examples/json/SignatureRequestRemindRequest.json similarity index 100% rename from examples/json/SignatureRequestRemindRequestDefaultExample.json rename to examples/json/SignatureRequestRemindRequest.json diff --git a/examples/json/SignatureRequestRemindResponseExample.json b/examples/json/SignatureRequestRemindResponse.json similarity index 100% rename from examples/json/SignatureRequestRemindResponseExample.json rename to examples/json/SignatureRequestRemindResponse.json diff --git a/examples/json/SignatureRequestSendRequest.json b/examples/json/SignatureRequestSendRequest.json new file mode 100644 index 000000000..3d1b98727 --- /dev/null +++ b/examples/json/SignatureRequestSendRequest.json @@ -0,0 +1,39 @@ +{ + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack", + "order": 0 + }, + { + "email_address": "jill@example.com", + "name": "Jill", + "order": 1 + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "files": [ + "./example_signature_request.pdf" + ], + "metadata": { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "field_options": { + "date_format": "DD - MM - YYYY" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestSendRequestDefaultExample.json b/examples/json/SignatureRequestSendRequestDefaultExample.json deleted file mode 100644 index adfda81ec..000000000 --- a/examples/json/SignatureRequestSendRequestDefaultExample.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "title": "NDA with Acme Co.", - "subject": "The NDA we talked about", - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "signers": [ - { - "email_address": "jack@example.com", - "name": "Jack", - "order": 0 - }, - { - "email_address": "jill@example.com", - "name": "Jill", - "order": 1 - } - ], - "cc_email_addresses": [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - ], - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signing_options": { - "draw": true, - "type": true, - "upload": true, - "phone": false, - "default_type": "draw" - }, - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "test_mode": true -} diff --git a/examples/json/SignatureRequestSendRequestGroupedSigners.json b/examples/json/SignatureRequestSendRequestGroupedSigners.json new file mode 100644 index 000000000..d78f99101 --- /dev/null +++ b/examples/json/SignatureRequestSendRequestGroupedSigners.json @@ -0,0 +1,57 @@ +{ + "title": "NDA with Acme Co.", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + "grouped_signers": [ + { + "group": "Group #1", + "order": 0, + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack" + }, + { + "email_address": "jill@example.com", + "name": "Jill" + } + ] + }, + { + "group": "Group #2", + "order": 1, + "signers": [ + { + "email_address": "bob@example.com", + "name": "Bob" + }, + { + "email_address": "charlie@example.com", + "name": "Charlie" + } + ] + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + ], + "file_urls": [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + ], + "metadata": { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "field_options": { + "date_format": "DD - MM - YYYY" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestSendResponse.json b/examples/json/SignatureRequestSendResponse.json new file mode 100644 index 000000000..52834625a --- /dev/null +++ b/examples/json/SignatureRequestSendResponse.json @@ -0,0 +1,76 @@ +{ + "signature_request": { + "signature_request_id": "2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "title": "NDA with Acme Co.", + "original_title": "The NDA we talked about", + "subject": "The NDA we talked about", + "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", + "test_mode": true, + "metadata": { + "custom_id": "1234", + "custom_text": "NDA #9" + }, + "created_at": 1570471067, + "is_complete": false, + "is_declined": false, + "has_error": false, + "custom_fields": [], + "response_data": [], + "signing_url": "https://app.hellosign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "signing_redirect_url": null, + "files_url": "https://api.hellosign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "details_url": "https://app.hellosign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + "requester_email_address": "me@dropboxsign.com", + "signatures": [ + { + "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3", + "signer_email_address": "jack@example.com", + "signer_name": "Jack", + "signer_role": null, + "order": 0, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + }, + { + "signature_id": "616629ed37f8588d28600be17ab5d6b7", + "signer_email_address": "jill@example.com", + "signer_name": "Jill", + "signer_role": null, + "order": 1, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + } + ], + "cc_email_addresses": [ + "lawyer1@dropboxsign.com", + "lawyer2@example.com" + ], + "attachments": [ + { + "id": "id_1", + "signer": "1", + "name": "Attachment #1", + "required": true, + "instructions": "Instructions #1", + "uploaded_at": 1650398513 + }, + { + "id": "id_2", + "signer": "2", + "name": "Attachment #2", + "required": true, + "instructions": null, + "uploaded_at": null + } + ], + "template_ids": null + } +} diff --git a/examples/json/SignatureRequestSendWithTemplateRequest.json b/examples/json/SignatureRequestSendWithTemplateRequest.json new file mode 100644 index 000000000..a79d1c35b --- /dev/null +++ b/examples/json/SignatureRequestSendWithTemplateRequest.json @@ -0,0 +1,36 @@ +{ + "template_ids": [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + ], + "subject": "Purchase Order", + "message": "Glad we could come to an agreement.", + "signers": [ + { + "role": "Client", + "name": "George", + "email_address": "george@example.com" + } + ], + "ccs": [ + { + "role": "Accounting", + "email_address": "accounting@example.com" + } + ], + "custom_fields": [ + { + "name": "Cost", + "value": "$20,000", + "editor": "Client", + "required": true + } + ], + "signing_options": { + "draw": true, + "type": true, + "upload": true, + "phone": false, + "default_type": "draw" + }, + "test_mode": true +} diff --git a/examples/json/SignatureRequestSendWithTemplateResponse.json b/examples/json/SignatureRequestSendWithTemplateResponse.json new file mode 100644 index 000000000..8df366a7a --- /dev/null +++ b/examples/json/SignatureRequestSendWithTemplateResponse.json @@ -0,0 +1,46 @@ +{ + "signature_request": { + "signature_request_id": "17d163069282df5eb63857d31ff4a3bffa9e46c0", + "title": "Purchase Order", + "original_title": "Purchase Order", + "subject": "Purchase Order", + "metadata": {}, + "message": "Glad we could come to an agreement.", + "created_at": 1570471067, + "is_complete": false, + "is_declined": false, + "has_error": false, + "custom_fields": [ + { + "name": "Cost", + "value": "$20,000", + "type": "text", + "editor": "Client", + "required": true + } + ], + "response_data": [], + "signing_url": "https://app.hellosign.com/sign/17d163069282df5eb63857d31ff4a3bffa9e46c0", + "signing_redirect_url": null, + "details_url": "https://app.hellosign.com/home/manage?guid=17d163069282df5eb63857d31ff4a3bffa9e46c0", + "requester_email_address": "me@dropboxsign.com", + "signatures": [ + { + "signature_id": "10ab1cd037d9b6cba7975d61ff428c8d", + "signer_email_address": "george@example.com", + "signer_name": "George", + "signer_role": "Client", + "order": null, + "status_code": "awaiting_signature", + "signed_at": null, + "last_viewed_at": null, + "last_reminded_at": null, + "has_pin": false, + "has_sms_auth": false + } + ], + "cc_email_addresses": [ + "accounting@dropboxsign.com" + ] + } +} diff --git a/examples/json/SignatureRequestUpdateRequestDefaultExample.json b/examples/json/SignatureRequestUpdateRequest.json similarity index 100% rename from examples/json/SignatureRequestUpdateRequestDefaultExample.json rename to examples/json/SignatureRequestUpdateRequest.json diff --git a/examples/json/SignatureRequestUpdateResponseExample.json b/examples/json/SignatureRequestUpdateResponse.json similarity index 100% rename from examples/json/SignatureRequestUpdateResponseExample.json rename to examples/json/SignatureRequestUpdateResponse.json diff --git a/examples/json/TeamAddMemberRequestEmailAddressExample.json b/examples/json/TeamAddMemberRequest.json similarity index 100% rename from examples/json/TeamAddMemberRequestEmailAddressExample.json rename to examples/json/TeamAddMemberRequest.json diff --git a/examples/json/TeamAddMemberRequestAccountIdExample.json b/examples/json/TeamAddMemberRequestAccountId.json similarity index 100% rename from examples/json/TeamAddMemberRequestAccountIdExample.json rename to examples/json/TeamAddMemberRequestAccountId.json diff --git a/examples/json/TeamAddMemberResponseExample.json b/examples/json/TeamAddMemberResponse.json similarity index 100% rename from examples/json/TeamAddMemberResponseExample.json rename to examples/json/TeamAddMemberResponse.json diff --git a/examples/json/TeamCreateRequestDefaultExample.json b/examples/json/TeamCreateRequest.json similarity index 100% rename from examples/json/TeamCreateRequestDefaultExample.json rename to examples/json/TeamCreateRequest.json diff --git a/examples/json/TeamCreateResponseExample.json b/examples/json/TeamCreateResponse.json similarity index 100% rename from examples/json/TeamCreateResponseExample.json rename to examples/json/TeamCreateResponse.json diff --git a/examples/json/TeamDoesNotExistResponseExample.json b/examples/json/TeamDoesNotExistResponse.json similarity index 100% rename from examples/json/TeamDoesNotExistResponseExample.json rename to examples/json/TeamDoesNotExistResponse.json diff --git a/examples/json/TeamGetInfoResponseExample.json b/examples/json/TeamGetInfoResponse.json similarity index 100% rename from examples/json/TeamGetInfoResponseExample.json rename to examples/json/TeamGetInfoResponse.json diff --git a/examples/json/TeamGetResponseExample.json b/examples/json/TeamGetResponse.json similarity index 100% rename from examples/json/TeamGetResponseExample.json rename to examples/json/TeamGetResponse.json diff --git a/examples/json/TeamGetRootInfoResponseExample.json b/examples/json/TeamGetRootInfoResponse.json similarity index 100% rename from examples/json/TeamGetRootInfoResponseExample.json rename to examples/json/TeamGetRootInfoResponse.json diff --git a/examples/json/TeamInvitesResponseExample.json b/examples/json/TeamInvitesResponse.json similarity index 100% rename from examples/json/TeamInvitesResponseExample.json rename to examples/json/TeamInvitesResponse.json diff --git a/examples/json/TeamMembersResponseExample.json b/examples/json/TeamMembersResponse.json similarity index 100% rename from examples/json/TeamMembersResponseExample.json rename to examples/json/TeamMembersResponse.json diff --git a/examples/json/TeamRemoveMemberRequestEmailAddressExample.json b/examples/json/TeamRemoveMemberRequest.json similarity index 100% rename from examples/json/TeamRemoveMemberRequestEmailAddressExample.json rename to examples/json/TeamRemoveMemberRequest.json diff --git a/examples/json/TeamRemoveMemberRequestAccountIdExample.json b/examples/json/TeamRemoveMemberRequestAccountId.json similarity index 100% rename from examples/json/TeamRemoveMemberRequestAccountIdExample.json rename to examples/json/TeamRemoveMemberRequestAccountId.json diff --git a/examples/json/TeamRemoveMemberResponseExample.json b/examples/json/TeamRemoveMemberResponse.json similarity index 100% rename from examples/json/TeamRemoveMemberResponseExample.json rename to examples/json/TeamRemoveMemberResponse.json diff --git a/examples/json/TeamSubTeamsResponseExample.json b/examples/json/TeamSubTeamsResponse.json similarity index 100% rename from examples/json/TeamSubTeamsResponseExample.json rename to examples/json/TeamSubTeamsResponse.json diff --git a/examples/json/TeamUpdateRequestDefaultExample.json b/examples/json/TeamUpdateRequest.json similarity index 100% rename from examples/json/TeamUpdateRequestDefaultExample.json rename to examples/json/TeamUpdateRequest.json diff --git a/examples/json/TeamUpdateResponseExample.json b/examples/json/TeamUpdateResponse.json similarity index 100% rename from examples/json/TeamUpdateResponseExample.json rename to examples/json/TeamUpdateResponse.json diff --git a/examples/json/TemplateAddUserRequestDefaultExample.json b/examples/json/TemplateAddUserRequest.json similarity index 100% rename from examples/json/TemplateAddUserRequestDefaultExample.json rename to examples/json/TemplateAddUserRequest.json diff --git a/examples/json/TemplateAddUserResponseExample.json b/examples/json/TemplateAddUserResponse.json similarity index 100% rename from examples/json/TemplateAddUserResponseExample.json rename to examples/json/TemplateAddUserResponse.json diff --git a/examples/json/TemplateCreateEmbeddedDraftRequest.json b/examples/json/TemplateCreateEmbeddedDraftRequest.json new file mode 100644 index 000000000..68c71abe1 --- /dev/null +++ b/examples/json/TemplateCreateEmbeddedDraftRequest.json @@ -0,0 +1,36 @@ +{ + "client_id": "37dee8d8440c66d54cfa05d92c160882", + "files": [ + "./example_signature_request.pdf" + ], + "title": "Test Template", + "subject": "Please sign this document", + "message": "For your approval", + "signer_roles": [ + { + "name": "Client", + "order": 0 + }, + { + "name": "Witness", + "order": 1 + } + ], + "cc_roles": [ + "Manager" + ], + "merge_fields": [ + { + "name": "Full Name", + "type": "text" + }, + { + "name": "Is Registered?", + "type": "checkbox" + } + ], + "field_options": { + "date_format": "DD - MM - YYYY" + }, + "test_mode": true +} diff --git a/examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json b/examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json deleted file mode 100644 index 10f895fe8..000000000 --- a/examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "client_id": "37dee8d8440c66d54cfa05d92c160882", - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "title": "Test Template", - "subject": "Please sign this document", - "message": "For your approval", - "signer_roles": [ - { - "name": "Client", - "order": 0 - }, - { - "name": "Witness", - "order": 1 - } - ], - "cc_roles": [ - "Manager" - ], - "merge_fields": [ - { - "name": "Full Name", - "type": "text" - }, - { - "name": "Is Registered?", - "type": "checkbox" - } - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "test_mode": true -} diff --git a/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json b/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json similarity index 100% rename from examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json rename to examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json diff --git a/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json b/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json similarity index 100% rename from examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json rename to examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json diff --git a/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json b/examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json similarity index 100% rename from examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json rename to examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json diff --git a/examples/json/TemplateCreateEmbeddedDraftResponseExample.json b/examples/json/TemplateCreateEmbeddedDraftResponse.json similarity index 100% rename from examples/json/TemplateCreateEmbeddedDraftResponseExample.json rename to examples/json/TemplateCreateEmbeddedDraftResponse.json diff --git a/examples/json/TemplateCreateRequest.json b/examples/json/TemplateCreateRequest.json new file mode 100644 index 000000000..b18275f8a --- /dev/null +++ b/examples/json/TemplateCreateRequest.json @@ -0,0 +1,66 @@ +{ + "client_id": "37dee8d8440c66d54cfa05d92c160882", + "files": [ + "./example_signature_request.pdf" + ], + "title": "Test Template", + "subject": "Please sign this document", + "message": "For your approval", + "signer_roles": [ + { + "name": "Client", + "order": 0 + }, + { + "name": "Witness", + "order": 1 + } + ], + "cc_roles": [ + "Manager" + ], + "merge_fields": [ + { + "name": "Full Name", + "type": "text" + }, + { + "name": "Is Registered?", + "type": "checkbox" + } + ], + "field_options": { + "date_format": "DD - MM - YYYY" + }, + "form_fields_per_document": [ + { + "document_index": 0, + "api_id": "uniqueIdHere_1", + "name": "", + "placeholder": "", + "type": "text", + "x": 112, + "y": 328, + "width": 100, + "height": 16, + "required": true, + "signer": 1, + "page": 1, + "validation_type": "numbers_only" + }, + { + "document_index": 0, + "api_id": "uniqueIdHere_2", + "name": "", + "type": "signature", + "x": 530, + "y": 415, + "width": 120, + "height": 30, + "required": true, + "signer": 0, + "page": 1 + } + ], + "test_mode": true +} diff --git a/examples/json/TemplateCreateRequestFormFieldGroupsExample.json b/examples/json/TemplateCreateRequestFormFieldGroups.json similarity index 100% rename from examples/json/TemplateCreateRequestFormFieldGroupsExample.json rename to examples/json/TemplateCreateRequestFormFieldGroups.json diff --git a/examples/json/TemplateCreateRequestFormFieldRulesExample.json b/examples/json/TemplateCreateRequestFormFieldRules.json similarity index 100% rename from examples/json/TemplateCreateRequestFormFieldRulesExample.json rename to examples/json/TemplateCreateRequestFormFieldRules.json diff --git a/examples/json/TemplateCreateRequestDefaultExample.json b/examples/json/TemplateCreateRequestFormFieldsPerDocument.json similarity index 100% rename from examples/json/TemplateCreateRequestDefaultExample.json rename to examples/json/TemplateCreateRequestFormFieldsPerDocument.json diff --git a/examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json b/examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json deleted file mode 100644 index a3709afcc..000000000 --- a/examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "client_id": "37dee8d8440c66d54cfa05d92c160882", - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "title": "Test Template", - "subject": "Please sign this document", - "message": "For your approval", - "signer_roles": [ - { - "name": "Client", - "order": 0 - }, - { - "name": "Witness", - "order": 1 - } - ], - "cc_roles": [ - "Manager" - ], - "merge_fields": [ - { - "name": "Full Name", - "type": "text" - }, - { - "name": "Is Registered?", - "type": "checkbox" - } - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "uniqueIdHere_1", - "name": "", - "placeholder": "", - "type": "text", - "x": 112, - "y": 328, - "width": 100, - "height": 16, - "required": true, - "signer": 1, - "page": 1, - "validation_type": "numbers_only" - }, - { - "document_index": 0, - "api_id": "uniqueIdHere_2", - "name": "", - "type": "signature", - "x": 530, - "y": 415, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1 - } - ], - "test_mode": true -} diff --git a/examples/json/TemplateCreateResponseExample.json b/examples/json/TemplateCreateResponse.json similarity index 100% rename from examples/json/TemplateCreateResponseExample.json rename to examples/json/TemplateCreateResponse.json diff --git a/examples/json/TemplateFilesResponseExample.json b/examples/json/TemplateFilesResponse.json similarity index 100% rename from examples/json/TemplateFilesResponseExample.json rename to examples/json/TemplateFilesResponse.json diff --git a/examples/json/TemplateGetResponseExample.json b/examples/json/TemplateGetResponse.json similarity index 100% rename from examples/json/TemplateGetResponseExample.json rename to examples/json/TemplateGetResponse.json diff --git a/examples/json/TemplateListResponseExample.json b/examples/json/TemplateListResponse.json similarity index 100% rename from examples/json/TemplateListResponseExample.json rename to examples/json/TemplateListResponse.json diff --git a/examples/json/TemplateRemoveUserRequestDefaultExample.json b/examples/json/TemplateRemoveUserRequest.json similarity index 100% rename from examples/json/TemplateRemoveUserRequestDefaultExample.json rename to examples/json/TemplateRemoveUserRequest.json diff --git a/examples/json/TemplateRemoveUserResponseExample.json b/examples/json/TemplateRemoveUserResponse.json similarity index 100% rename from examples/json/TemplateRemoveUserResponseExample.json rename to examples/json/TemplateRemoveUserResponse.json diff --git a/examples/json/TemplateUpdateFilesRequest.json b/examples/json/TemplateUpdateFilesRequest.json new file mode 100644 index 000000000..120e168a6 --- /dev/null +++ b/examples/json/TemplateUpdateFilesRequest.json @@ -0,0 +1,5 @@ +{ + "files": [ + "./example_signature_request.pdf" + ] +} diff --git a/examples/json/TemplateUpdateFilesRequestDefaultExample.json b/examples/json/TemplateUpdateFilesRequestDefaultExample.json deleted file mode 100644 index 88c101579..000000000 --- a/examples/json/TemplateUpdateFilesRequestDefaultExample.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ] -} diff --git a/examples/json/TemplateUpdateFilesResponseExample.json b/examples/json/TemplateUpdateFilesResponse.json similarity index 100% rename from examples/json/TemplateUpdateFilesResponseExample.json rename to examples/json/TemplateUpdateFilesResponse.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedRequest.json b/examples/json/UnclaimedDraftCreateEmbeddedRequest.json new file mode 100644 index 000000000..9f8c02387 --- /dev/null +++ b/examples/json/UnclaimedDraftCreateEmbeddedRequest.json @@ -0,0 +1,8 @@ +{ + "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + "files": [ + "./example_signature_request.pdf" + ], + "requester_email_address": "jack@dropboxsign.com", + "test_mode": true +} diff --git a/examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json b/examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json deleted file mode 100644 index ae9f61ad6..000000000 --- a/examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "client_id": "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "requester_email_address": "jack@dropboxsign.com", - "test_mode": true -} diff --git a/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json b/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json b/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json b/examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json b/examples/json/UnclaimedDraftCreateEmbeddedResponse.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedResponse.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json b/examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json diff --git a/examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json b/examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json similarity index 100% rename from examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json rename to examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json diff --git a/examples/json/UnclaimedDraftCreateRequest.json b/examples/json/UnclaimedDraftCreateRequest.json new file mode 100644 index 000000000..21707bde1 --- /dev/null +++ b/examples/json/UnclaimedDraftCreateRequest.json @@ -0,0 +1,14 @@ +{ + "files": [ + "./example_signature_request.pdf" + ], + "signers": [ + { + "email_address": "jack@example.com", + "name": "Jack", + "order": 0 + } + ], + "type": "request_signature", + "test_mode": true +} diff --git a/examples/json/UnclaimedDraftCreateRequestDefaultExample.json b/examples/json/UnclaimedDraftCreateRequestDefaultExample.json deleted file mode 100644 index 5ed2ca115..000000000 --- a/examples/json/UnclaimedDraftCreateRequestDefaultExample.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "signers": [ - { - "email_address": "jack@example.com", - "name": "Jack", - "order": 0 - } - ], - "type": "request_signature", - "test_mode": true -} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json b/examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json new file mode 100644 index 000000000..d8e5db930 --- /dev/null +++ b/examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json @@ -0,0 +1,46 @@ +{ + "file_urls": [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + ], + "form_fields_per_document": [ + { + "document_index": 0, + "api_id": "uniqueIdHere_1", + "name": "", + "type": "radio", + "x": 112, + "y": 328, + "width": 18, + "height": 18, + "required": false, + "group": "RadioItemGroup1", + "is_checked": 1, + "signer": 0, + "page": 1 + }, + { + "document_index": 0, + "api_id": "uniqueIdHere_2", + "name": "", + "type": "radio", + "x": 112, + "y": 370, + "width": 18, + "height": 18, + "required": false, + "group": "RadioItemGroup1", + "is_checked": 0, + "signer": 0, + "page": 1 + } + ], + "form_field_groups": [ + { + "group_id": "RadioItemGroup1", + "group_label": "Radio Item Group 1", + "requirement": "require_0-1" + } + ], + "type": "request_signature", + "test_mode": false +} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json b/examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json deleted file mode 100644 index ac48565f0..000000000 --- a/examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "uniqueIdHere_1", - "name": "", - "type": "radio", - "x": 112, - "y": 328, - "width": 18, - "height": 18, - "required": false, - "group": "RadioItemGroup1", - "is_checked": 1, - "signer": 0, - "page": 1 - }, - { - "document_index": 0, - "api_id": "uniqueIdHere_2", - "name": "", - "type": "radio", - "x": 112, - "y": 370, - "width": 18, - "height": 18, - "required": false, - "group": "RadioItemGroup1", - "is_checked": 0, - "signer": 0, - "page": 1 - } - ], - "form_field_groups": [ - { - "group_id": "RadioItemGroup1", - "group_label": "Radio Item Group 1", - "requirement": "require_0-1" - } - ], - "test_mode": false -} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldRules.json b/examples/json/UnclaimedDraftCreateRequestFormFieldRules.json new file mode 100644 index 000000000..8b1fe7d85 --- /dev/null +++ b/examples/json/UnclaimedDraftCreateRequestFormFieldRules.json @@ -0,0 +1,56 @@ +{ + "file_urls": [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + ], + "form_fields_per_document": [ + { + "document_index": 0, + "api_id": "uniqueIdHere_1", + "name": "", + "type": "text", + "x": 112, + "y": 328, + "width": 100, + "height": 16, + "required": true, + "signer": 0, + "page": 1, + "validation_type": "numbers_only" + }, + { + "document_index": 0, + "api_id": "uniqueIdHere_2", + "name": "", + "type": "signature", + "x": 530, + "y": 415, + "width": 120, + "height": 30, + "required": true, + "signer": 0, + "page": 1 + } + ], + "form_field_rules": [ + { + "id": "rule_1", + "trigger_operator": "AND", + "triggers": [ + { + "id": "uniqueIdHere_1", + "operator": "is", + "value": "foo" + } + ], + "actions": [ + { + "field_id": "uniqueIdHere_2", + "hidden": 1, + "type": "change-field-visibility" + } + ] + } + ], + "type": "request_signature", + "test_mode": false +} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json b/examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json deleted file mode 100644 index c12700553..000000000 --- a/examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "uniqueIdHere_1", - "name": "", - "type": "text", - "x": 112, - "y": 328, - "width": 100, - "height": 16, - "required": true, - "signer": 0, - "page": 1, - "validation_type": "numbers_only" - }, - { - "document_index": 0, - "api_id": "uniqueIdHere_2", - "name": "", - "type": "signature", - "x": 530, - "y": 415, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1 - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "uniqueIdHere_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "uniqueIdHere_2", - "hidden": 1, - "type": "change-field-visibility" - } - ] - } - ], - "test_mode": false -} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json b/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json new file mode 100644 index 000000000..4d9961c57 --- /dev/null +++ b/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json @@ -0,0 +1,37 @@ +{ + "file_urls": [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + ], + "form_fields_per_document": [ + { + "document_index": 0, + "api_id": "uniqueIdHere_1", + "name": "", + "placeholder": "", + "type": "text", + "x": 112, + "y": 328, + "width": 100, + "height": 16, + "required": true, + "signer": 1, + "page": 1, + "validation_type": "numbers_only" + }, + { + "document_index": 0, + "api_id": "uniqueIdHere_2", + "name": "", + "type": "signature", + "x": 530, + "y": 415, + "width": 120, + "height": 30, + "required": true, + "signer": 0, + "page": 1 + } + ], + "type": "request_signature", + "test_mode": false +} diff --git a/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json b/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json deleted file mode 100644 index 6ba9c8837..000000000 --- a/examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "file_urls": [ - "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "uniqueIdHere_1", - "name": "", - "placeholder": "", - "type": "text", - "x": 112, - "y": 328, - "width": 100, - "height": 16, - "required": true, - "signer": 1, - "page": 1, - "validation_type": "numbers_only" - }, - { - "document_index": 0, - "api_id": "uniqueIdHere_2", - "name": "", - "type": "signature", - "x": 530, - "y": 415, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1 - } - ], - "test_mode": false -} diff --git a/examples/json/UnclaimedDraftCreateResponseExample.json b/examples/json/UnclaimedDraftCreateResponse.json similarity index 100% rename from examples/json/UnclaimedDraftCreateResponseExample.json rename to examples/json/UnclaimedDraftCreateResponse.json diff --git a/examples/json/UnclaimedDraftEditAndResendExample.json b/examples/json/UnclaimedDraftEditAndResend.json similarity index 100% rename from examples/json/UnclaimedDraftEditAndResendExample.json rename to examples/json/UnclaimedDraftEditAndResend.json diff --git a/examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json b/examples/json/UnclaimedDraftEditAndResendRequest.json similarity index 100% rename from examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json rename to examples/json/UnclaimedDraftEditAndResendRequest.json diff --git a/generate-sdks b/generate-sdks index fe899ab18..de40ae11b 100755 --- a/generate-sdks +++ b/generate-sdks @@ -155,18 +155,17 @@ function copy_examples() mkdir -p "${SDK_DIR}/examples" if [[ "${SDK}" == "dotnet" ]]; then - cp -r "${DIR}/examples/"*.cs "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/dotnet/src/Dropbox.SignSandbox/"*.cs "${SDK_DIR}/examples/" elif [[ "${SDK}" == "java-v2" || "${SDK}" == "java-v1" ]]; then - cp -r "${DIR}/examples/"*.java "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/java/src/main/java/com/dropbox/sign_sandbox/"*.java "${SDK_DIR}/examples/" elif [[ "${SDK}" == "node" ]]; then - cp -r "${DIR}/examples/"*.js "${SDK_DIR}/examples/" - cp -r "${DIR}/examples/"*.ts "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/node/src/"*.ts "${SDK_DIR}/examples/" elif [[ "${SDK}" == "php" ]]; then - cp -r "${DIR}/examples/"*.php "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/php/src/"*.php "${SDK_DIR}/examples/" elif [[ "${SDK}" == "python" ]]; then - cp -r "${DIR}/examples/"*.py "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/python/src/"*.py "${SDK_DIR}/examples/" elif [[ "${SDK}" == "ruby" ]]; then - cp -r "${DIR}/examples/"*.rb "${SDK_DIR}/examples/" + cp -r "${DIR}/sandbox/ruby/src/"*.rb "${SDK_DIR}/examples/" fi } diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 3523daada..f6b22e028 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -27,10 +27,10 @@ paths: schema: $ref: '#/components/schemas/AccountCreateRequest' examples: - default_example: - $ref: '#/components/examples/AccountCreateRequestDefaultExample' - oauth: - $ref: '#/components/examples/AccountCreateRequestOAuthExample' + example: + $ref: '#/components/examples/AccountCreateRequest' + oauth_example: + $ref: '#/components/examples/AccountCreateRequestOAuth' responses: '200': description: 'successful operation' @@ -46,10 +46,10 @@ paths: schema: $ref: '#/components/schemas/AccountCreateResponse' examples: - default_example: - $ref: '#/components/examples/AccountCreateResponseExample' - oauth: - $ref: '#/components/examples/AccountCreateOAuthResponseExample' + example: + $ref: '#/components/examples/AccountCreateResponse' + oauth_example: + $ref: '#/components/examples/AccountCreateOAuthResponse' 4XX: description: failed_operation content: @@ -58,15 +58,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -78,42 +78,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountCreate.php + $ref: examples/AccountCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountCreate.js + $ref: examples/AccountCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountCreate.ts + $ref: examples/AccountCreateExample.ts - lang: Java label: Java source: - $ref: examples/AccountCreate.java + $ref: examples/AccountCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountCreate.rb + $ref: examples/AccountCreateExample.rb - lang: Python label: Python source: - $ref: examples/AccountCreate.py + $ref: examples/AccountCreateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountCreate.sh + $ref: examples/AccountCreateExample.sh x-meta: seo: title: '_t__AccountCreate::SEO::TITLE' @@ -155,8 +150,8 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountGetResponseExample' + example: + $ref: '#/components/examples/AccountGetResponse' 4XX: description: failed_operation content: @@ -165,15 +160,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -186,42 +181,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountGet.php + $ref: examples/AccountGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountGet.js + $ref: examples/AccountGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountGet.ts + $ref: examples/AccountGetExample.ts - lang: Java label: Java source: - $ref: examples/AccountGet.java + $ref: examples/AccountGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountGet.rb + $ref: examples/AccountGetExample.rb - lang: Python label: Python source: - $ref: examples/AccountGet.py + $ref: examples/AccountGetExample.py - lang: cURL label: cURL source: - $ref: examples/AccountGet.sh + $ref: examples/AccountGetExample.sh x-meta: seo: title: '_t__AccountGet::SEO::TITLE' @@ -239,8 +229,8 @@ paths: schema: $ref: '#/components/schemas/AccountUpdateRequest' examples: - default_example: - $ref: '#/components/examples/AccountUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/AccountUpdateRequest' responses: '200': description: 'successful operation' @@ -256,8 +246,8 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountUpdateResponseExample' + example: + $ref: '#/components/examples/AccountUpdateResponse' 4XX: description: failed_operation content: @@ -266,17 +256,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -288,42 +278,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountUpdate.php + $ref: examples/AccountUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountUpdate.js + $ref: examples/AccountUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountUpdate.ts + $ref: examples/AccountUpdateExample.ts - lang: Java label: Java source: - $ref: examples/AccountUpdate.java + $ref: examples/AccountUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountUpdate.rb + $ref: examples/AccountUpdateExample.rb - lang: Python label: Python source: - $ref: examples/AccountUpdate.py + $ref: examples/AccountUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountUpdate.sh + $ref: examples/AccountUpdateExample.sh x-meta: seo: title: '_t__AccountUpdate::SEO::TITLE' @@ -342,8 +327,8 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyRequest' examples: - default_example: - $ref: '#/components/examples/AccountVerifyRequestDefaultExample' + example: + $ref: '#/components/examples/AccountVerifyRequest' responses: '200': description: 'successful operation' @@ -359,10 +344,10 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyResponse' examples: - default_example: - $ref: '#/components/examples/AccountVerifyFoundResponseExample' - not_found: - $ref: '#/components/examples/AccountVerifyNotFoundResponseExample' + example: + $ref: '#/components/examples/AccountVerifyFoundResponse' + not_found_example: + $ref: '#/components/examples/AccountVerifyNotFoundResponse' 4XX: description: failed_operation content: @@ -371,15 +356,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -391,42 +376,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountVerify.php + $ref: examples/AccountVerifyExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountVerify.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountVerify.js + $ref: examples/AccountVerifyExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountVerify.ts + $ref: examples/AccountVerifyExample.ts - lang: Java label: Java source: - $ref: examples/AccountVerify.java + $ref: examples/AccountVerifyExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountVerify.rb + $ref: examples/AccountVerifyExample.rb - lang: Python label: Python source: - $ref: examples/AccountVerify.py + $ref: examples/AccountVerifyExample.py - lang: cURL label: cURL source: - $ref: examples/AccountVerify.sh + $ref: examples/AccountVerifyExample.sh x-meta: seo: title: '_t__AccountVerify::SEO::TITLE' @@ -445,8 +425,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppCreateRequest' @@ -465,8 +445,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateResponseExample' + example: + $ref: '#/components/examples/ApiAppCreateResponse' 4XX: description: failed_operation content: @@ -475,17 +455,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -497,42 +477,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppCreate.php + $ref: examples/ApiAppCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppCreate.js + $ref: examples/ApiAppCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppCreate.ts + $ref: examples/ApiAppCreateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppCreate.java + $ref: examples/ApiAppCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppCreate.rb + $ref: examples/ApiAppCreateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppCreate.py + $ref: examples/ApiAppCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppCreate.sh + $ref: examples/ApiAppCreateExample.sh x-meta: seo: title: '_t__ApiAppCreate::SEO::TITLE' @@ -568,8 +543,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppGetResponseExample' + example: + $ref: '#/components/examples/ApiAppGetResponse' 4XX: description: failed_operation content: @@ -578,19 +553,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -602,42 +577,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppGet.php + $ref: examples/ApiAppGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppGet.js + $ref: examples/ApiAppGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppGet.ts + $ref: examples/ApiAppGetExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppGet.java + $ref: examples/ApiAppGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppGet.rb + $ref: examples/ApiAppGetExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppGet.py + $ref: examples/ApiAppGetExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppGet.sh + $ref: examples/ApiAppGetExample.sh x-meta: seo: title: '_t__ApiAppGet::SEO::TITLE' @@ -664,8 +634,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' @@ -684,8 +654,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateResponseExample' + example: + $ref: '#/components/examples/ApiAppUpdateResponse' 4XX: description: failed_operation content: @@ -694,19 +664,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -718,42 +688,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppUpdate.php + $ref: examples/ApiAppUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppUpdate.js + $ref: examples/ApiAppUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppUpdate.ts + $ref: examples/ApiAppUpdateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppUpdate.java + $ref: examples/ApiAppUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppUpdate.rb + $ref: examples/ApiAppUpdateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppUpdate.py + $ref: examples/ApiAppUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppUpdate.sh + $ref: examples/ApiAppUpdateExample.sh x-meta: seo: title: '_t__ApiAppUpdate::SEO::TITLE' @@ -791,17 +756,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -813,42 +778,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppDelete.php + $ref: examples/ApiAppDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppDelete.js + $ref: examples/ApiAppDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppDelete.ts + $ref: examples/ApiAppDeleteExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppDelete.java + $ref: examples/ApiAppDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppDelete.rb + $ref: examples/ApiAppDeleteExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppDelete.py + $ref: examples/ApiAppDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppDelete.sh + $ref: examples/ApiAppDeleteExample.sh x-meta: seo: title: '_t__ApiAppDelete::SEO::TITLE' @@ -890,8 +850,8 @@ paths: schema: $ref: '#/components/schemas/ApiAppListResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppListResponseExample' + example: + $ref: '#/components/examples/ApiAppListResponse' 4XX: description: failed_operation content: @@ -900,15 +860,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -920,42 +880,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppList.php + $ref: examples/ApiAppListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppList.js + $ref: examples/ApiAppListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppList.ts + $ref: examples/ApiAppListExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppList.java + $ref: examples/ApiAppListExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppList.rb + $ref: examples/ApiAppListExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppList.py + $ref: examples/ApiAppListExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppList.sh + $ref: examples/ApiAppListExample.sh x-meta: seo: title: '_t__ApiAppList::SEO::TITLE' @@ -1005,8 +960,8 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobGetResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobGetResponseExample' + example: + $ref: '#/components/examples/BulkSendJobGetResponse' 4XX: description: failed_operation content: @@ -1015,15 +970,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1036,42 +991,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobGet.php + $ref: examples/BulkSendJobGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobGet.js + $ref: examples/BulkSendJobGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobGet.ts + $ref: examples/BulkSendJobGetExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobGet.java + $ref: examples/BulkSendJobGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobGet.rb + $ref: examples/BulkSendJobGetExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobGet.py + $ref: examples/BulkSendJobGetExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobGet.sh + $ref: examples/BulkSendJobGetExample.sh x-meta: seo: title: '_t__BulkSendJobGet::SEO::TITLE' @@ -1113,8 +1063,8 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobListResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobListResponseExample' + example: + $ref: '#/components/examples/BulkSendJobListResponse' 4XX: description: failed_operation content: @@ -1123,15 +1073,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1144,42 +1094,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobList.php + $ref: examples/BulkSendJobListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobList.js + $ref: examples/BulkSendJobListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobList.ts + $ref: examples/BulkSendJobListExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobList.java + $ref: examples/BulkSendJobListExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobList.rb + $ref: examples/BulkSendJobListExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobList.py + $ref: examples/BulkSendJobListExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobList.sh + $ref: examples/BulkSendJobListExample.sh x-meta: seo: title: '_t__BulkSendJobList::SEO::TITLE' @@ -1207,8 +1152,8 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlRequestDefaultExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlRequest' responses: '200': description: 'successful operation' @@ -1224,8 +1169,8 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlResponseExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlResponse' 4XX: description: failed_operation content: @@ -1234,17 +1179,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1256,42 +1201,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedEditUrl.php + $ref: examples/EmbeddedEditUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedEditUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedEditUrl.js + $ref: examples/EmbeddedEditUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedEditUrl.ts + $ref: examples/EmbeddedEditUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedEditUrl.java + $ref: examples/EmbeddedEditUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedEditUrl.rb + $ref: examples/EmbeddedEditUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedEditUrl.py + $ref: examples/EmbeddedEditUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedEditUrl.sh + $ref: examples/EmbeddedEditUrlExample.sh x-meta: seo: title: '_t__EmbeddedEditUrl::SEO::TITLE' @@ -1327,8 +1267,8 @@ paths: schema: $ref: '#/components/schemas/EmbeddedSignUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedSignUrlResponseExample' + example: + $ref: '#/components/examples/EmbeddedSignUrlResponse' 4XX: description: failed_operation content: @@ -1337,21 +1277,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1363,42 +1303,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedSignUrl.php + $ref: examples/EmbeddedSignUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedSignUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedSignUrl.js + $ref: examples/EmbeddedSignUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedSignUrl.ts + $ref: examples/EmbeddedSignUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedSignUrl.java + $ref: examples/EmbeddedSignUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedSignUrl.rb + $ref: examples/EmbeddedSignUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedSignUrl.py + $ref: examples/EmbeddedSignUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedSignUrl.sh + $ref: examples/EmbeddedSignUrlExample.sh x-meta: seo: title: '_t__EmbeddedSignUrl::SEO::TITLE' @@ -1434,8 +1369,8 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' + example: + $ref: '#/components/examples/FaxGetResponse' 4XX: description: failed_operation content: @@ -1444,19 +1379,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1465,42 +1400,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxGet.php + $ref: examples/FaxGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxGet.js + $ref: examples/FaxGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxGet.ts + $ref: examples/FaxGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxGet.java + $ref: examples/FaxGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxGet.rb + $ref: examples/FaxGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxGet.py + $ref: examples/FaxGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxGet.sh + $ref: examples/FaxGetExample.sh x-meta: seo: title: '_t__FaxGet::SEO::TITLE' @@ -1538,19 +1468,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1559,42 +1489,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxDelete.php + $ref: examples/FaxDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxDelete.js + $ref: examples/FaxDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxDelete.ts + $ref: examples/FaxDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxDelete.java + $ref: examples/FaxDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxDelete.rb + $ref: examples/FaxDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxDelete.py + $ref: examples/FaxDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxDelete.sh + $ref: examples/FaxDeleteExample.sh x-meta: seo: title: '_t__FaxDelete::SEO::TITLE' @@ -1638,21 +1563,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1661,42 +1586,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxFiles.php + $ref: examples/FaxFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxFiles.js + $ref: examples/FaxFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxFiles.ts + $ref: examples/FaxFilesExample.ts - lang: Java label: Java source: - $ref: examples/FaxFiles.java + $ref: examples/FaxFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxFiles.rb + $ref: examples/FaxFilesExample.rb - lang: Python label: Python source: - $ref: examples/FaxFiles.py + $ref: examples/FaxFilesExample.py - lang: cURL label: cURL source: - $ref: examples/FaxFiles.sh + $ref: examples/FaxFilesExample.sh x-meta: seo: title: '_t__FaxFiles::SEO::TITLE' @@ -1715,8 +1635,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineAddUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineAddUserRequestExample' + example: + $ref: '#/components/examples/FaxLineAddUserRequest' responses: '200': description: 'successful operation' @@ -1732,8 +1652,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' + example: + $ref: '#/components/examples/FaxLineResponse' 4XX: description: failed_operation content: @@ -1742,17 +1662,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1761,42 +1681,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAddUser.php + $ref: examples/FaxLineAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAddUser.js + $ref: examples/FaxLineAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAddUser.ts + $ref: examples/FaxLineAddUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAddUser.java + $ref: examples/FaxLineAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAddUser.rb + $ref: examples/FaxLineAddUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAddUser.py + $ref: examples/FaxLineAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAddUser.sh + $ref: examples/FaxLineAddUserExample.sh x-meta: seo: title: '_t__FaxLineAddUser::SEO::TITLE' @@ -1820,6 +1735,7 @@ paths: - CA - US - UK + example: US - name: state in: query @@ -1919,8 +1835,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' + example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponse' 4XX: description: failed_operation content: @@ -1929,15 +1845,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1946,42 +1862,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAreaCodeGet.php + $ref: examples/FaxLineAreaCodeGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAreaCodeGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAreaCodeGet.js + $ref: examples/FaxLineAreaCodeGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAreaCodeGet.ts + $ref: examples/FaxLineAreaCodeGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAreaCodeGet.java + $ref: examples/FaxLineAreaCodeGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAreaCodeGet.rb + $ref: examples/FaxLineAreaCodeGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAreaCodeGet.py + $ref: examples/FaxLineAreaCodeGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAreaCodeGet.sh + $ref: examples/FaxLineAreaCodeGetExample.sh x-meta: seo: title: '_t__FaxLineAreaCodeGet::SEO::TITLE' @@ -2000,8 +1911,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineCreateRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineCreateRequestExample' + example: + $ref: '#/components/examples/FaxLineCreateRequest' responses: '200': description: 'successful operation' @@ -2017,8 +1928,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' + example: + $ref: '#/components/examples/FaxLineResponse' 4XX: description: failed_operation content: @@ -2027,17 +1938,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2046,42 +1957,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineCreate.php + $ref: examples/FaxLineCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineCreate.js + $ref: examples/FaxLineCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineCreate.ts + $ref: examples/FaxLineCreateExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineCreate.java + $ref: examples/FaxLineCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineCreate.rb + $ref: examples/FaxLineCreateExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineCreate.py + $ref: examples/FaxLineCreateExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineCreate.sh + $ref: examples/FaxLineCreateExample.sh x-meta: seo: title: '_t__FaxLineCreate::SEO::TITLE' @@ -2101,6 +2007,7 @@ paths: required: true schema: type: string + example: 123-123-1234 responses: '200': description: 'successful operation' @@ -2116,8 +2023,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' + example: + $ref: '#/components/examples/FaxLineResponse' 4XX: description: failed_operation content: @@ -2126,17 +2033,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2145,42 +2052,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineGet.php + $ref: examples/FaxLineGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineGet.js + $ref: examples/FaxLineGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineGet.ts + $ref: examples/FaxLineGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineGet.java + $ref: examples/FaxLineGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineGet.rb + $ref: examples/FaxLineGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineGet.py + $ref: examples/FaxLineGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineGet.sh + $ref: examples/FaxLineGetExample.sh x-meta: seo: title: '_t__FaxLineGet::SEO::TITLE' @@ -2198,8 +2100,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineDeleteRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineDeleteRequestExample' + example: + $ref: '#/components/examples/FaxLineDeleteRequest' responses: '200': description: 'successful operation' @@ -2220,17 +2122,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2239,42 +2141,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineDelete.php + $ref: examples/FaxLineDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineDelete.js + $ref: examples/FaxLineDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineDelete.ts + $ref: examples/FaxLineDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineDelete.java + $ref: examples/FaxLineDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineDelete.rb + $ref: examples/FaxLineDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineDeleteExample.sh x-meta: seo: title: '_t__FaxLineDelete::SEO::TITLE' @@ -2293,7 +2190,7 @@ paths: description: '_t__FaxLineList::ACCOUNT_ID' schema: type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2301,7 +2198,7 @@ paths: schema: type: integer default: 1 - example: 1 + example: 1 - name: page_size in: query @@ -2309,7 +2206,7 @@ paths: schema: type: integer default: 20 - example: 20 + example: 20 - name: show_team_lines in: query @@ -2331,8 +2228,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineListResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + example: + $ref: '#/components/examples/FaxLineListResponse' 4XX: description: failed_operation content: @@ -2341,15 +2238,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2358,42 +2255,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxLineListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineList.js + $ref: examples/FaxLineListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxLineListExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxLineListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxLineListExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxLineListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxLineListExample.sh x-meta: seo: title: '_t__FaxLineList::SEO::TITLE' @@ -2412,8 +2304,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + example: + $ref: '#/components/examples/FaxLineRemoveUserRequest' responses: '200': description: 'successful operation' @@ -2429,8 +2321,8 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' + example: + $ref: '#/components/examples/FaxLineResponse' 4XX: description: failed_operation content: @@ -2439,17 +2331,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2458,42 +2350,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxLineRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxLineRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxLineRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxLineRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxLineRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxLineRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxLineRemoveUserExample.sh x-meta: seo: title: '_t__FaxLineRemoveUser::SEO::TITLE' @@ -2540,8 +2427,8 @@ paths: schema: $ref: '#/components/schemas/FaxListResponse' examples: - default_example: - $ref: '#/components/examples/FaxListResponseExample' + example: + $ref: '#/components/examples/FaxListResponse' 4XX: description: failed_operation content: @@ -2550,15 +2437,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2567,42 +2454,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxList.php + $ref: examples/FaxListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxList.js + $ref: examples/FaxListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxList.ts + $ref: examples/FaxListExample.ts - lang: Java label: Java source: - $ref: examples/FaxList.java + $ref: examples/FaxListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxList.rb + $ref: examples/FaxListExample.rb - lang: Python label: Python source: - $ref: examples/FaxList.py + $ref: examples/FaxListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxList.sh + $ref: examples/FaxListExample.sh x-meta: seo: title: '_t__FaxList::SEO::TITLE' @@ -2621,8 +2503,8 @@ paths: schema: $ref: '#/components/schemas/FaxSendRequest' examples: - default_example: - $ref: '#/components/examples/FaxSendRequestExample' + example: + $ref: '#/components/examples/FaxSendRequest' multipart/form-data: schema: $ref: '#/components/schemas/FaxSendRequest' @@ -2641,8 +2523,8 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' + example: + $ref: '#/components/examples/FaxGetResponse' 4XX: description: failed_operation content: @@ -2651,19 +2533,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2672,42 +2554,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxSend.php + $ref: examples/FaxSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxSend.js + $ref: examples/FaxSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxSend.ts + $ref: examples/FaxSendExample.ts - lang: Java label: Java source: - $ref: examples/FaxSend.java + $ref: examples/FaxSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxSend.rb + $ref: examples/FaxSendExample.rb - lang: Python label: Python source: - $ref: examples/FaxSend.py + $ref: examples/FaxSendExample.py - lang: cURL label: cURL source: - $ref: examples/FaxSend.sh + $ref: examples/FaxSendExample.sh x-meta: seo: title: '_t__FaxSend::SEO::TITLE' @@ -2726,8 +2603,8 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenGenerateRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateRequestExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateRequest' responses: '200': description: 'successful operation' @@ -2743,8 +2620,8 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateResponse' 4XX: description: failed_operation content: @@ -2753,15 +2630,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2771,42 +2648,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenGenerate.php + $ref: examples/OauthTokenGenerateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenGenerate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenGenerate.js + $ref: examples/OauthTokenGenerateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenGenerate.ts + $ref: examples/OauthTokenGenerateExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenGenerate.java + $ref: examples/OauthTokenGenerateExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenGenerate.rb + $ref: examples/OauthTokenGenerateExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenGenerate.py + $ref: examples/OauthTokenGenerateExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenGenerate.sh + $ref: examples/OauthTokenGenerateExample.sh x-meta: seo: title: '_t__OAuthTokenGenerate::SEO::TITLE' @@ -2826,8 +2698,8 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenRefreshRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshRequestExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshRequest' responses: '200': description: 'successful operation' @@ -2843,8 +2715,8 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshResponse' 4XX: description: failed_operation content: @@ -2853,15 +2725,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2871,42 +2743,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenRefresh.php + $ref: examples/OauthTokenRefreshExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenRefresh.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenRefresh.js + $ref: examples/OauthTokenRefreshExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenRefresh.ts + $ref: examples/OauthTokenRefreshExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenRefresh.java + $ref: examples/OauthTokenRefreshExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenRefresh.rb + $ref: examples/OauthTokenRefreshExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenRefresh.py + $ref: examples/OauthTokenRefreshExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenRefresh.sh + $ref: examples/OauthTokenRefreshExample.sh x-meta: seo: title: '_t__OAuthTokenRefresh::SEO::TITLE' @@ -2926,8 +2793,8 @@ paths: schema: $ref: '#/components/schemas/ReportCreateRequest' examples: - default_example: - $ref: '#/components/examples/ReportCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ReportCreateRequest' responses: '200': description: 'successful operation' @@ -2943,8 +2810,8 @@ paths: schema: $ref: '#/components/schemas/ReportCreateResponse' examples: - default_example: - $ref: '#/components/examples/ReportCreateResponseExample' + example: + $ref: '#/components/examples/ReportCreateResponse' 4XX: description: failed_operation content: @@ -2953,15 +2820,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2970,42 +2837,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ReportCreate.php + $ref: examples/ReportCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ReportCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ReportCreate.js + $ref: examples/ReportCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ReportCreate.ts + $ref: examples/ReportCreateExample.ts - lang: Java label: Java source: - $ref: examples/ReportCreate.java + $ref: examples/ReportCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ReportCreate.rb + $ref: examples/ReportCreateExample.rb - lang: Python label: Python source: - $ref: examples/ReportCreate.py + $ref: examples/ReportCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ReportCreate.sh + $ref: examples/ReportCreateExample.sh x-meta: seo: title: '_t__ReportCreate::SEO::TITLE' @@ -3024,8 +2886,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' @@ -3044,8 +2906,8 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponse' 4XX: description: failed_operation content: @@ -3054,21 +2916,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3077,42 +2939,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::SEO::TITLE' @@ -3131,8 +2988,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' @@ -3151,8 +3008,8 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponseExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponse' 4XX: description: failed_operation content: @@ -3161,17 +3018,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3184,42 +3041,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkSendWithTemplate.php + $ref: examples/SignatureRequestBulkSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkSendWithTemplate.js + $ref: examples/SignatureRequestBulkSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkSendWithTemplate.ts + $ref: examples/SignatureRequestBulkSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkSendWithTemplate.java + $ref: examples/SignatureRequestBulkSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkSendWithTemplate.rb + $ref: examples/SignatureRequestBulkSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkSendWithTemplate.py + $ref: examples/SignatureRequestBulkSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkSendWithTemplate.sh + $ref: examples/SignatureRequestBulkSendWithTemplateExample.sh x-meta: seo: title: '_t__SignatureRequestBulkSendWithTemplate::SEO::TITLE' @@ -3260,21 +3112,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3287,42 +3139,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCancel.php + $ref: examples/SignatureRequestCancelExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCancel.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCancel.js + $ref: examples/SignatureRequestCancelExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCancel.ts + $ref: examples/SignatureRequestCancelExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCancel.java + $ref: examples/SignatureRequestCancelExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCancel.rb + $ref: examples/SignatureRequestCancelExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCancel.py + $ref: examples/SignatureRequestCancelExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCancel.sh + $ref: examples/SignatureRequestCancelExample.sh x-meta: seo: title: '_t__SignatureRequestCancel::SEO::TITLE' @@ -3341,10 +3188,10 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' @@ -3363,8 +3210,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponseExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' 4XX: description: failed_operation content: @@ -3373,19 +3220,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3397,42 +3244,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbedded.php + $ref: examples/SignatureRequestCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbedded.js + $ref: examples/SignatureRequestCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbedded.ts + $ref: examples/SignatureRequestCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbedded.java + $ref: examples/SignatureRequestCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbedded.rb + $ref: examples/SignatureRequestCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbedded.py + $ref: examples/SignatureRequestCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbedded.sh + $ref: examples/SignatureRequestCreateEmbeddedExample.sh x-meta: seo: title: '_t__SignatureRequestCreateEmbedded::SEO::TITLE' @@ -3451,8 +3293,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' @@ -3471,8 +3313,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponseExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' 4XX: description: failed_operation content: @@ -3481,19 +3323,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3505,72 +3347,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: '_t__SignatureRequestCreateEmbeddedWithTemplate::SEO::TITLE' description: '_t__SignatureRequestCreateEmbeddedWithTemplate::SEO::DESCRIPTION' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: '_t__SignatureRequestFiles::SUMMARY' - description: '_t__SignatureRequestFiles::DESCRIPTION' - operationId: signatureRequestFiles + summary: '_t__SignatureRequestEdit::SUMMARY' + description: '_t__SignatureRequestEdit::DESCRIPTION' + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_ID' + description: '_t__SignatureRequestEdit::SIGNATURE_REQUEST_ID' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: '_t__SignatureRequestFiles::FILE_TYPE' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: '200': description: 'successful operation' @@ -3582,14 +3423,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditResponse' 4XX: description: failed_operation content: @@ -3598,23 +3437,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3627,62 +3464,73 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEditExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEditExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEditExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEditExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEditExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEditExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEditExample.sh x-meta: seo: - title: '_t__SignatureRequestFiles::SEO::TITLE' - description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: '_t__SignatureRequestEdit::SEO::TITLE' + description: '_t__SignatureRequestEdit::SEO::DESCRIPTION' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: '_t__SignatureRequestFilesAsDataUri::SUMMARY' - description: '_t__SignatureRequestFilesAsDataUri::DESCRIPTION' - operationId: signatureRequestFilesAsDataUri + summary: '_t__SignatureRequestEditEmbedded::SUMMARY' + description: '_t__SignatureRequestEditEmbedded::DESCRIPTION' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_ID' + description: '_t__SignatureRequestEditEmbedded::SIGNATURE_REQUEST_ID' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: '200': description: 'successful operation' @@ -3696,10 +3544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' 4XX: description: failed_operation content: @@ -3708,98 +3556,97 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbeddedExample.sh x-meta: seo: - title: '_t__SignatureRequestFiles::SEO::TITLE' - description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: '_t__SignatureRequestEditEmbedded::SEO::TITLE' + description: '_t__SignatureRequestEditEmbedded::SEO::DESCRIPTION' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: '_t__SignatureRequestFilesAsFileUrl::SUMMARY' - description: '_t__SignatureRequestFilesAsFileUrl::DESCRIPTION' - operationId: signatureRequestFilesAsFileUrl + summary: '_t__SignatureRequestEditEmbeddedWithTemplate::SUMMARY' + description: '_t__SignatureRequestEditEmbeddedWithTemplate::DESCRIPTION' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_ID' + description: '_t__SignatureRequestEditEmbeddedWithTemplate::SIGNATURE_REQUEST_ID' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - description: '_t__SignatureRequestFiles::FORCE_DOWNLOAD' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: '200': description: 'successful operation' @@ -3813,10 +3660,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' 4XX: description: failed_operation content: @@ -3825,91 +3672,97 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.sh x-meta: seo: - title: '_t__SignatureRequestFiles::SEO::TITLE' - description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' - '/signature_request/{signature_request_id}': - get: + title: '_t__SignatureRequestEditEmbeddedWithTemplate::SEO::TITLE' + description: '_t__SignatureRequestEditEmbeddedWithTemplate::SEO::DESCRIPTION' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: '_t__SignatureRequestGet::SUMMARY' - description: '_t__SignatureRequestGet::DESCRIPTION' - operationId: signatureRequestGet + summary: '_t__SignatureRequestEditWithTemplate::SUMMARY' + description: '_t__SignatureRequestEditWithTemplate::DESCRIPTION' + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: '_t__SignatureRequestGet::SIGNATURE_REQUEST_ID' + description: '_t__SignatureRequestEditWithTemplate::SIGNATURE_REQUEST_ID' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: '200': description: 'successful operation' @@ -3925,8 +3778,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' 4XX: description: failed_operation content: @@ -3935,19 +3788,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3960,81 +3815,69 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplateExample.sh x-meta: seo: - title: '_t__SignatureRequestGet::SEO::TITLE' - description: '_t__SignatureRequestGet::SEO::DESCRIPTION' - /signature_request/list: + title: '_t__SignatureRequestEditWithTemplate::SEO::TITLE' + description: '_t__SignatureRequestEditWithTemplate::SEO::DESCRIPTION' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: '_t__SignatureRequestList::SUMMARY' - description: '_t__SignatureRequestList::DESCRIPTION' - operationId: signatureRequestList + summary: '_t__SignatureRequestFiles::SUMMARY' + description: '_t__SignatureRequestFiles::DESCRIPTION' + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: '_t__SignatureRequestList::ACCOUNT_ID' + name: signature_request_id + in: path + description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_ID' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page - in: query - description: '_t__SignatureRequestList::PAGE' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: '_t__SignatureRequestList::PAGE_SIZE' - schema: - type: integer - default: 20 - - - name: query + name: file_type in: query - description: '_t__SignatureRequestList::QUERY' + description: '_t__SignatureRequestFiles::FILE_TYPE' schema: type: string + default: pdf + enum: + - pdf + - zip responses: '200': description: 'successful operation' @@ -4046,12 +3889,14 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' + type: string + format: binary + application/zip: + schema: + type: string + format: binary 4XX: description: failed_operation content: @@ -4060,17 +3905,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4083,58 +3934,270 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFilesExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFilesExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFilesExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFilesExample.sh x-meta: seo: - title: '_t__SignatureRequestList::SEO::TITLE' - description: '_t__SignatureRequestList::SEO::DESCRIPTION' - '/signature_request/release_hold/{signature_request_id}': - post: + title: '_t__SignatureRequestFiles::SEO::TITLE' + description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: '_t__SignatureRequestReleaseHold::SUMMARY' - description: '_t__SignatureRequestReleaseHold::DESCRIPTION' - operationId: signatureRequestReleaseHold + summary: '_t__SignatureRequestFilesAsDataUri::SUMMARY' + description: '_t__SignatureRequestFilesAsDataUri::DESCRIPTION' + operationId: signatureRequestFilesAsDataUri parameters: - name: signature_request_id in: path - description: '_t__SignatureRequestReleaseHold::SIGNATURE_REQUEST_ID' + description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_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/FileResponseDataUri' + examples: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.ts + - + lang: Java + label: Java + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.rb + - + lang: Python + label: Python + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/SignatureRequestFilesAsDataUriExample.sh + x-meta: + seo: + title: '_t__SignatureRequestFiles::SEO::TITLE' + description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' + '/signature_request/files_as_file_url/{signature_request_id}': + get: + tags: + - 'Signature Request' + summary: '_t__SignatureRequestFilesAsFileUrl::SUMMARY' + description: '_t__SignatureRequestFilesAsFileUrl::DESCRIPTION' + operationId: signatureRequestFilesAsFileUrl + parameters: + - + name: signature_request_id + in: path + description: '_t__SignatureRequestFiles::SIGNATURE_REQUEST_ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + - + name: force_download + in: query + description: '_t__SignatureRequestFiles::FORCE_DOWNLOAD' + schema: + type: integer + default: 1 + 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/FileResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.ts + - + lang: Java + label: Java + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.rb + - + lang: Python + label: Python + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/SignatureRequestFilesAsFileUrlExample.sh + x-meta: + seo: + title: '_t__SignatureRequestFiles::SEO::TITLE' + description: '_t__SignatureRequestFiles::SEO::DESCRIPTION' + '/signature_request/{signature_request_id}': + get: + tags: + - 'Signature Request' + summary: '_t__SignatureRequestGet::SUMMARY' + description: '_t__SignatureRequestGet::DESCRIPTION' + operationId: signatureRequestGet + parameters: + - + name: signature_request_id + in: path + description: '_t__SignatureRequestGet::SIGNATURE_REQUEST_ID' required: true schema: type: string @@ -4154,8 +4217,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' + example: + $ref: '#/components/examples/SignatureRequestGetResponse' 4XX: description: failed_operation content: @@ -4164,64 +4227,278 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 410_example: + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs + $ref: examples/SignatureRequestGetExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/SignatureRequestGetExample.ts - - lang: JavaScript - label: JavaScript + lang: Java + label: Java + source: + $ref: examples/SignatureRequestGetExample.java + - + lang: Ruby + label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestGetExample.rb + - + lang: Python + label: Python + source: + $ref: examples/SignatureRequestGetExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/SignatureRequestGetExample.sh + x-meta: + seo: + title: '_t__SignatureRequestGet::SEO::TITLE' + description: '_t__SignatureRequestGet::SEO::DESCRIPTION' + /signature_request/list: + get: + tags: + - 'Signature Request' + summary: '_t__SignatureRequestList::SUMMARY' + description: '_t__SignatureRequestList::DESCRIPTION' + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: '_t__SignatureRequestList::ACCOUNT_ID' + schema: + type: string + - + name: page + in: query + description: '_t__SignatureRequestList::PAGE' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: '_t__SignatureRequestList::PAGE_SIZE' + schema: + type: integer + default: 20 + - + name: query + in: query + description: '_t__SignatureRequestList::QUERY' + schema: + type: string + 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/SignatureRequestListResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestListResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/SignatureRequestListExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/SignatureRequestListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestListExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestListExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestListExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestListExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestListExample.sh + x-meta: + seo: + title: '_t__SignatureRequestList::SEO::TITLE' + description: '_t__SignatureRequestList::SEO::DESCRIPTION' + '/signature_request/release_hold/{signature_request_id}': + post: + tags: + - 'Signature Request' + summary: '_t__SignatureRequestReleaseHold::SUMMARY' + description: '_t__SignatureRequestReleaseHold::DESCRIPTION' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: '_t__SignatureRequestReleaseHold::SIGNATURE_REQUEST_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/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestReleaseHoldResponse' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/SignatureRequestReleaseHoldExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/SignatureRequestReleaseHoldExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/SignatureRequestReleaseHoldExample.ts + - + lang: Java + label: Java + source: + $ref: examples/SignatureRequestReleaseHoldExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/SignatureRequestReleaseHoldExample.rb + - + lang: Python + label: Python + source: + $ref: examples/SignatureRequestReleaseHoldExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/SignatureRequestReleaseHoldExample.sh x-meta: seo: title: '_t__SignatureRequestReleaseHold::SEO::TITLE' @@ -4249,8 +4526,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestRemindRequest' responses: '200': description: 'successful operation' @@ -4266,8 +4543,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' + example: + $ref: '#/components/examples/SignatureRequestRemindResponse' 4XX: description: failed_operation content: @@ -4276,23 +4553,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4305,42 +4582,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestRemindExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestRemindExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestRemindExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestRemindExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestRemindExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestRemindExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestRemindExample.sh x-meta: seo: title: '_t__SignatureRequestRemind::SEO::TITLE' @@ -4381,21 +4653,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4404,42 +4676,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestRemoveExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestRemoveExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestRemoveExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestRemoveExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestRemoveExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestRemoveExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestRemoveExample.sh x-meta: seo: title: '_t__SignatureRequestRemove::SEO::TITLE' @@ -4458,10 +4725,10 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestSendRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestSendRequest' @@ -4480,8 +4747,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' + example: + $ref: '#/components/examples/SignatureRequestSendResponse' 4XX: description: failed_operation content: @@ -4490,19 +4757,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4515,42 +4782,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestSendExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestSendExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestSendExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestSendExample.sh x-meta: seo: title: '_t__SignatureRequestSend::SEO::TITLE' @@ -4569,8 +4831,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' @@ -4589,8 +4851,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' 4XX: description: failed_operation content: @@ -4599,17 +4861,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4622,42 +4884,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestSendWithTemplateExample.sh x-meta: seo: title: '_t__SignatureRequestSendWithTemplate::SEO::TITLE' @@ -4685,8 +4942,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestUpdateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestUpdateRequest' responses: '200': description: 'successful operation' @@ -4702,8 +4959,8 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' + example: + $ref: '#/components/examples/SignatureRequestUpdateResponse' 4XX: description: failed_operation content: @@ -4712,17 +4969,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4734,42 +4991,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestUpdateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestUpdateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestUpdateExample.sh x-meta: seo: title: '_t__SignatureRequestUpdate::SEO::TITLE' @@ -4797,10 +5049,10 @@ paths: schema: $ref: '#/components/schemas/TeamAddMemberRequest' examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamAddMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamAddMemberRequestAccountId' responses: '200': description: 'successful operation' @@ -4816,8 +5068,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' + example: + $ref: '#/components/examples/TeamAddMemberResponse' 4XX: description: failed_operation content: @@ -4826,17 +5078,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4848,42 +5100,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/TeamAddMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamAddMember.js + $ref: examples/TeamAddMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/TeamAddMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/TeamAddMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/TeamAddMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/TeamAddMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/TeamAddMemberExample.sh x-meta: seo: title: '_t__TeamAddMember::SEO::TITLE' @@ -4902,8 +5149,8 @@ paths: schema: $ref: '#/components/schemas/TeamCreateRequest' examples: - default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamCreateRequest' responses: '200': description: 'successful operation' @@ -4919,8 +5166,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamCreateResponseExample' + example: + $ref: '#/components/examples/TeamCreateResponse' 4XX: description: failed_operation content: @@ -4929,15 +5176,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4949,42 +5196,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/TeamCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamCreate.js + $ref: examples/TeamCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/TeamCreateExample.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/TeamCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/TeamCreateExample.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/TeamCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/TeamCreateExample.sh x-meta: seo: title: '_t__TeamCreate::SEO::TITLE' @@ -5014,15 +5256,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5034,42 +5276,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/TeamDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamDelete.js + $ref: examples/TeamDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/TeamDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/TeamDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/TeamDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/TeamDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/TeamDeleteExample.sh x-meta: seo: title: '_t__TeamDelete::SEO::TITLE' @@ -5096,8 +5333,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetResponseExample' + example: + $ref: '#/components/examples/TeamGetResponse' 4XX: description: failed_operation content: @@ -5106,17 +5343,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5128,42 +5365,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/TeamGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamGet.js + $ref: examples/TeamGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/TeamGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/TeamGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/TeamGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/TeamGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/TeamGetExample.sh x-meta: seo: title: '_t__TeamGet::SEO::TITLE' @@ -5181,8 +5413,8 @@ paths: schema: $ref: '#/components/schemas/TeamUpdateRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: '200': description: 'successful operation' @@ -5198,8 +5430,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' + example: + $ref: '#/components/examples/TeamUpdateResponse' 4XX: description: failed_operation content: @@ -5208,15 +5440,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5228,42 +5460,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamUpdateExample.sh x-meta: seo: title: '_t__TeamUpdate::SEO::TITLE' @@ -5299,8 +5526,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetInfoResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' + example: + $ref: '#/components/examples/TeamGetInfoResponse' 4XX: description: failed_operation content: @@ -5309,19 +5536,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5333,42 +5560,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamInfoExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInfo.js + $ref: examples/TeamInfoExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamInfoExample.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamInfoExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamInfoExample.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamInfoExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamInfoExample.sh x-meta: seo: title: '_t__TeamInfo::SEO::TITLE' @@ -5403,8 +5625,8 @@ paths: schema: $ref: '#/components/schemas/TeamInvitesResponse' examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' + example: + $ref: '#/components/examples/TeamInvitesResponse' 4XX: description: failed_operation content: @@ -5413,15 +5635,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5434,42 +5656,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamInvitesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInvites.js + $ref: examples/TeamInvitesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamInvitesExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamInvitesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamInvitesExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamInvitesExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamInvitesExample.sh x-meta: seo: title: '_t__TeamInvites::SEO::TITLE' @@ -5521,8 +5738,8 @@ paths: schema: $ref: '#/components/schemas/TeamMembersResponse' examples: - default_example: - $ref: '#/components/examples/TeamMembersResponseExample' + example: + $ref: '#/components/examples/TeamMembersResponse' 4XX: description: failed_operation content: @@ -5531,19 +5748,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5555,42 +5772,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamMembersExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamMembers.js + $ref: examples/TeamMembersExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamMembersExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamMembersExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamMembersExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamMembersExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamMembersExample.sh x-meta: seo: title: '_t__TeamMembers::SEO::TITLE' @@ -5609,10 +5821,10 @@ paths: schema: $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: '201': description: 'successful operation' @@ -5628,8 +5840,8 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' + example: + $ref: '#/components/examples/TeamRemoveMemberResponse' 4XX: description: failed_operation content: @@ -5638,17 +5850,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5660,42 +5872,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: title: '_t__TeamRemoveMember::SEO::TITLE' @@ -5747,8 +5954,8 @@ paths: schema: $ref: '#/components/schemas/TeamSubTeamsResponse' examples: - default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' + example: + $ref: '#/components/examples/TeamSubTeamsResponse' 4XX: description: failed_operation content: @@ -5757,19 +5964,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5781,42 +5988,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamSubTeamsExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamSubTeamsExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamSubTeamsExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamSubTeamsExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamSubTeamsExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamSubTeamsExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamSubTeamsExample.sh x-meta: seo: title: '_t__TeamSubTeams::SEO::TITLE' @@ -5844,8 +6046,8 @@ paths: schema: $ref: '#/components/schemas/TemplateAddUserRequest' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateAddUserRequest' responses: '200': description: 'successful operation' @@ -5861,8 +6063,8 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' + example: + $ref: '#/components/examples/TemplateAddUserResponse' 4XX: description: failed_operation content: @@ -5871,17 +6073,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5893,42 +6095,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TemplateAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateAddUser.js + $ref: examples/TemplateAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TemplateAddUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TemplateAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TemplateAddUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TemplateAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TemplateAddUserExample.sh x-meta: seo: title: '_t__TemplateAddUser::SEO::TITLE' @@ -5947,14 +6144,14 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/TemplateCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/TemplateCreateRequest' @@ -5973,8 +6170,8 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' + example: + $ref: '#/components/examples/TemplateCreateResponse' 4XX: description: failed_operation content: @@ -5983,19 +6180,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6007,42 +6204,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TemplateCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreate.js + $ref: examples/TemplateCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TemplateCreateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TemplateCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TemplateCreateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TemplateCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TemplateCreateExample.sh x-meta: seo: title: '_t__TemplateCreate::SEO::TITLE' @@ -6061,14 +6253,14 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' @@ -6087,8 +6279,8 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponse' 4XX: description: failed_operation content: @@ -6097,19 +6289,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6121,42 +6313,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TemplateCreateEmbeddedDraftExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TemplateCreateEmbeddedDraftExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TemplateCreateEmbeddedDraftExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TemplateCreateEmbeddedDraftExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TemplateCreateEmbeddedDraftExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TemplateCreateEmbeddedDraftExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TemplateCreateEmbeddedDraftExample.sh x-meta: seo: title: '_t__TemplateCreateEmbeddedDraft::SEO::TITLE' @@ -6197,19 +6384,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6221,42 +6408,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TemplateDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateDelete.js + $ref: examples/TemplateDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TemplateDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TemplateDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TemplateDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TemplateDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TemplateDeleteExample.sh x-meta: seo: title: '_t__TemplateDelete::SEO::TITLE' @@ -6313,23 +6495,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6341,42 +6523,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateFilesExample.sh x-meta: seo: title: '_t__TemplateFiles::SEO::TITLE' @@ -6412,8 +6589,8 @@ paths: schema: $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' + example: + $ref: '#/components/examples/TemplateFilesResponse' 4XX: description: failed_operation content: @@ -6422,23 +6599,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6450,42 +6627,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateFilesAsDataUriExample.php - lang: 'C#' - label: 'C#' - source: - $ref: examples/TemplateFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript + label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateFilesAsDataUriExample.sh x-meta: seo: title: '_t__TemplateFiles::SEO::TITLE' @@ -6528,8 +6700,8 @@ paths: schema: $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' + example: + $ref: '#/components/examples/TemplateFilesResponse' 4XX: description: failed_operation content: @@ -6538,23 +6710,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6566,42 +6738,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateFilesAsFileUrlExample.sh x-meta: seo: title: '_t__TemplateFiles::SEO::TITLE' @@ -6637,8 +6804,8 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' + example: + $ref: '#/components/examples/TemplateGetResponse' 4XX: description: failed_operation content: @@ -6647,19 +6814,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6671,42 +6838,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateGetExample.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateGetExample.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateGetExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateGetExample.sh x-meta: seo: title: '_t__TemplateGet::SEO::TITLE' @@ -6762,8 +6924,8 @@ paths: schema: $ref: '#/components/schemas/TemplateListResponse' examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' + example: + $ref: '#/components/examples/TemplateListResponse' 4XX: description: failed_operation content: @@ -6772,19 +6934,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6796,42 +6958,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateList.js + $ref: examples/TemplateListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateListExample.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateListExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateListExample.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateListExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateListExample.sh x-meta: seo: title: '_t__TemplateList::SEO::TITLE' @@ -6859,8 +7016,8 @@ paths: schema: $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateRemoveUserRequest' responses: '200': description: 'successful operation' @@ -6876,8 +7033,8 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' + example: + $ref: '#/components/examples/TemplateRemoveUserResponse' 4XX: description: failed_operation content: @@ -6886,17 +7043,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6908,42 +7065,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateRemoveUserExample.sh x-meta: seo: title: '_t__TemplateRemoveUser::SEO::TITLE' @@ -6971,8 +7123,8 @@ paths: schema: $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesRequest' multipart/form-data: schema: $ref: '#/components/schemas/TemplateUpdateFilesRequest' @@ -6991,8 +7143,8 @@ paths: schema: $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesResponse' 4XX: description: failed_operation content: @@ -7001,21 +7153,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7027,42 +7179,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateUpdateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateUpdateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateUpdateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateUpdateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateUpdateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateUpdateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateUpdateFilesExample.sh x-meta: seo: title: '_t__TemplateUpdateFiles::SEO::TITLE' @@ -7081,14 +7228,14 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateRequest' @@ -7107,8 +7254,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateResponse' 4XX: description: failed_operation content: @@ -7117,15 +7264,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7137,42 +7284,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/UnclaimedDraftCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/UnclaimedDraftCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/UnclaimedDraftCreateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/UnclaimedDraftCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/UnclaimedDraftCreateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/UnclaimedDraftCreateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/UnclaimedDraftCreateExample.sh x-meta: seo: title: '_t__UnclaimedDraftCreate::SEO::TITLE' @@ -7191,14 +7333,14 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' @@ -7217,8 +7359,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponse' 4XX: description: failed_operation content: @@ -7227,19 +7369,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7252,42 +7394,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/UnclaimedDraftCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/UnclaimedDraftCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/UnclaimedDraftCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/UnclaimedDraftCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/UnclaimedDraftCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/UnclaimedDraftCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/UnclaimedDraftCreateEmbeddedExample.sh x-meta: seo: title: '_t__UnclaimedDraftCreateEmbedded::SEO::TITLE' @@ -7306,8 +7443,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' @@ -7326,8 +7463,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponse' 4XX: description: failed_operation content: @@ -7336,21 +7473,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7362,42 +7499,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: '_t__UnclaimedDraftCreateEmbeddedWithTemplate::SEO::TITLE' @@ -7425,8 +7557,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequest' responses: '200': description: 'successful operation' @@ -7442,8 +7574,8 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResend' 4XX: description: failed_operation content: @@ -7452,21 +7584,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7479,42 +7611,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/UnclaimedDraftEditAndResendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/UnclaimedDraftEditAndResendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/UnclaimedDraftEditAndResendExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/UnclaimedDraftEditAndResendExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/UnclaimedDraftEditAndResendExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/UnclaimedDraftEditAndResendExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/UnclaimedDraftEditAndResendExample.sh x-meta: seo: title: '_t__UnclaimedDraftEditAndResend::SEO::TITLE' @@ -7961,51 +8088,332 @@ components: type: string maxLength: 255 test_mode: - description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::TEST_MODE' + description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::TEST_MODE' + type: boolean + default: false + title: + description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::TITLE' + type: string + maxLength: 255 + type: object + SignatureRequestBulkSendWithTemplateRequest: + required: + - template_ids + properties: + template_ids: + description: '_t__SignatureRequestBulkSendWithTemplate::TEMPLATE_IDS' + type: array + items: + type: string + signer_file: + description: '_t__SignatureRequestBulkSendWithTemplate::SIGNER_FILE' + type: string + format: binary + signer_list: + description: '_t__SignatureRequestBulkSendWithTemplate::SIGNER_LIST' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: '_t__SignatureRequestBulkSendWithTemplate::ALLOW_DECLINE' + type: boolean + default: false + ccs: + description: '_t__Sub::CC::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: '_t__SignatureRequestBulkSendWithTemplate::CLIENT_ID' + type: string + custom_fields: + description: '_t__Sub::CustomField::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: '_t__SignatureRequestBulkSendWithTemplate::MESSAGE' + type: string + maxLength: 5000 + metadata: + description: '_t__Sub::Metadata::DESCRIPTION' + type: object + maxItems: 10 + additionalProperties: { } + signing_redirect_url: + description: '_t__SignatureRequestBulkSendWithTemplate::SIGNING_REDIRECT_URL' + type: string + subject: + description: '_t__SignatureRequestBulkSendWithTemplate::SUBJECT' + type: string + maxLength: 255 + test_mode: + description: '_t__SignatureRequestBulkSendWithTemplate::TEST_MODE' + type: boolean + default: false + title: + description: '_t__SignatureRequestBulkSendWithTemplate::TITLE' + type: string + maxLength: 255 + type: object + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: '_t__SignatureRequestCreateEmbedded::FILES' + type: array + items: + type: string + format: binary + file_urls: + description: '_t__SignatureRequestCreateEmbedded::FILE_URLS' + type: array + items: + type: string + signers: + description: '_t__Sub::SignatureRequestSigner::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: '_t__Sub::SignatureRequestGroupedSigners::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: '_t__SignatureRequestCreateEmbedded::ALLOW_DECLINE' + type: boolean + default: false + allow_reassign: + description: '_t__SignatureRequestCreateEmbedded::ALLOW_REASSIGN' + type: boolean + default: false + attachments: + description: '_t__SubAttachment::LIST_DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: '_t__SignatureRequestCreateEmbedded::CC_EMAIL_ADDRESSES' + type: array + items: + type: string + format: email + client_id: + description: '_t__SignatureRequestCreateEmbedded::CLIENT_ID' + type: string + custom_fields: + description: '_t__Sub::CustomField::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: '_t__Sub::FormFieldGroup::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: '_t__Sub::FormFieldRule::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: '_t__Sub::FormFieldsPerDocument::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: '_t__SignatureRequestCreateEmbedded::HIDE_TEXT_TAGS' + type: boolean + default: false + message: + description: '_t__SignatureRequestCreateEmbedded::MESSAGE' + type: string + maxLength: 5000 + metadata: + description: '_t__Sub::Metadata::DESCRIPTION' + type: object + maxItems: 10 + additionalProperties: { } + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: '_t__SignatureRequestCreateEmbedded::SUBJECT' + type: string + maxLength: 255 + test_mode: + description: '_t__SignatureRequestCreateEmbedded::TEST_MODE' + type: boolean + default: false + title: + description: '_t__SignatureRequestCreateEmbedded::TITLE' + type: string + maxLength: 255 + use_text_tags: + description: '_t__SignatureRequestCreateEmbedded::USE_TEXT_TAGS' + type: boolean + default: false + populate_auto_fill_fields: + description: '_t__SignatureRequestCreateEmbedded::POPULATE_AUTO_FILL_FIELDS' + type: boolean + default: false + expires_at: + description: '_t__SignatureRequestCreateEmbedded::EXPIRES_AT' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + - signers + properties: + template_ids: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::TEMPLATE_IDS' + type: array + items: + type: string + allow_decline: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::ALLOW_DECLINE' + type: boolean + default: false + ccs: + description: '_t__Sub::CC::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::CLIENT_ID' + type: string + custom_fields: + description: '_t__Sub::CustomField::TEMPLATE' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::FILES' + type: array + items: + type: string + format: binary + file_urls: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::FILE_URLS' + type: array + items: + type: string + message: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::MESSAGE' + type: string + maxLength: 5000 + metadata: + description: '_t__Sub::Metadata::DESCRIPTION' + type: object + maxItems: 10 + additionalProperties: { } + signers: + description: '_t__Sub::SignatureRequestTemplateSigner::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::SUBJECT' + type: string + maxLength: 255 + test_mode: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::TEST_MODE' type: boolean default: false title: - description: '_t__SignatureRequestBulkCreateEmbeddedWithTemplate::TITLE' + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::TITLE' type: string maxLength: 255 + populate_auto_fill_fields: + description: '_t__SignatureRequestCreateEmbeddedWithTemplate::POPULATE_AUTO_FILL_FIELDS' + type: boolean + default: false type: object - SignatureRequestBulkSendWithTemplateRequest: - required: - - template_ids + SignatureRequestEditRequest: properties: - template_ids: - description: '_t__SignatureRequestBulkSendWithTemplate::TEMPLATE_IDS' + files: + description: '_t__SignatureRequestSend::FILES' type: array items: type: string - signer_file: - description: '_t__SignatureRequestBulkSendWithTemplate::SIGNER_FILE' - type: string - format: binary - signer_list: - description: '_t__SignatureRequestBulkSendWithTemplate::SIGNER_LIST' + format: binary + file_urls: + description: '_t__SignatureRequestSend::FILE_URLS' type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + type: string + signers: + description: '_t__Sub::SignatureRequestSigner::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: '_t__Sub::SignatureRequestGroupedSigners::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: - description: '_t__SignatureRequestBulkSendWithTemplate::ALLOW_DECLINE' + description: '_t__SignatureRequestSend::ALLOW_DECLINE' type: boolean default: false - ccs: - description: '_t__Sub::CC::DESCRIPTION' + allow_reassign: + description: '_t__SignatureRequestSend::ALLOW_REASSIGN' + type: boolean + default: false + attachments: + description: '_t__SubAttachment::LIST_DESCRIPTION' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: '_t__SignatureRequestSend::CC_EMAIL_ADDRESSES' + type: array + items: + type: string + format: email client_id: - description: '_t__SignatureRequestBulkSendWithTemplate::CLIENT_ID' + description: '_t__SignatureRequestSend::CLIENT_ID' type: string custom_fields: description: '_t__Sub::CustomField::DESCRIPTION' type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: '_t__Sub::FormFieldGroup::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: '_t__Sub::FormFieldRule::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: '_t__Sub::FormFieldsPerDocument::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: '_t__SignatureRequestSend::HIDE_TEXT_TAGS' + type: boolean + default: false + is_eid: + description: '_t__SignatureRequestSend::IS_EID' + type: boolean + default: false message: - description: '_t__SignatureRequestBulkSendWithTemplate::MESSAGE' + description: '_t__SignatureRequestSend::MESSAGE' type: string maxLength: 5000 metadata: @@ -8013,23 +8421,33 @@ components: type: object maxItems: 10 additionalProperties: { } + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: - description: '_t__SignatureRequestBulkSendWithTemplate::SIGNING_REDIRECT_URL' + description: '_t__SignatureRequestSend::SIGNING_REDIRECT_URL' type: string subject: - description: '_t__SignatureRequestBulkSendWithTemplate::SUBJECT' + description: '_t__SignatureRequestSend::SUBJECT' type: string maxLength: 255 test_mode: - description: '_t__SignatureRequestBulkSendWithTemplate::TEST_MODE' + description: '_t__SignatureRequestSend::TEST_MODE' type: boolean default: false title: - description: '_t__SignatureRequestBulkSendWithTemplate::TITLE' + description: '_t__SignatureRequestSend::TITLE' type: string maxLength: 255 + use_text_tags: + description: '_t__SignatureRequestSend::USE_PREEXISTING_FIELDS' + type: boolean + default: false + expires_at: + description: '_t__SignatureRequestSend::EXPIRES_AT' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -8138,7 +8556,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -8210,6 +8628,81 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: '_t__SignatureRequestSendWithTemplate::TEMPLATE_IDS' + type: array + items: + type: string + allow_decline: + description: '_t__SignatureRequestSendWithTemplate::ALLOW_DECLINE' + type: boolean + default: false + ccs: + description: '_t__Sub::CC::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: '_t__SignatureRequestSendWithTemplate::CLIENT_ID' + type: string + custom_fields: + description: '_t__Sub::CustomField::TEMPLATE' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: '_t__SignatureRequestSendWithTemplate::FILES' + type: array + items: + type: string + format: binary + file_urls: + description: '_t__SignatureRequestSendWithTemplate::FILE_URLS' + type: array + items: + type: string + is_eid: + description: '_t__SignatureRequestSendWithTemplate::IS_EID' + type: boolean + default: false + message: + description: '_t__SignatureRequestSendWithTemplate::MESSAGE' + type: string + maxLength: 5000 + metadata: + description: '_t__Sub::Metadata::DESCRIPTION' + type: object + maxItems: 10 + additionalProperties: { } + signers: + description: '_t__Sub::SignatureRequestTemplateSigner::DESCRIPTION' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: '_t__SignatureRequestSendWithTemplate::SIGNING_REDIRECT_URL' + type: string + subject: + description: '_t__SignatureRequestSendWithTemplate::SUBJECT' + type: string + maxLength: 255 + test_mode: + description: '_t__SignatureRequestSendWithTemplate::TEST_MODE' + type: boolean + default: false + title: + description: '_t__SignatureRequestSendWithTemplate::TITLE' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -12293,498 +12786,522 @@ components: type: string default: 'Hello API Event Received' examples: - AccountCreateRequestDefaultExample: + AccountCreateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountCreateRequestDefaultExample.json - AccountCreateRequestOAuthExample: + $ref: examples/json/AccountCreateRequest.json + AccountCreateRequestOAuth: summary: 'OAuth Example' value: - $ref: examples/json/AccountCreateRequestOAuthExample.json - AccountUpdateRequestDefaultExample: + $ref: examples/json/AccountCreateRequestOAuth.json + AccountUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountUpdateRequestDefaultExample.json - AccountVerifyRequestDefaultExample: + $ref: examples/json/AccountUpdateRequest.json + AccountVerifyRequest: summary: 'Default Example' value: - $ref: examples/json/AccountVerifyRequestDefaultExample.json - ApiAppCreateRequestDefaultExample: + $ref: examples/json/AccountVerifyRequest.json + ApiAppCreateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppCreateRequestDefaultExample.json - ApiAppUpdateRequestDefaultExample: + $ref: examples/json/ApiAppCreateRequest.json + ApiAppUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppUpdateRequestDefaultExample.json - EmbeddedEditUrlRequestDefaultExample: + $ref: examples/json/ApiAppUpdateRequest.json + EmbeddedEditUrlRequest: summary: 'Default Example' value: - $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json - FaxLineAddUserRequestExample: + $ref: examples/json/EmbeddedEditUrlRequest.json + FaxLineAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineAddUserRequestExample.json - FaxLineCreateRequestExample: + $ref: examples/json/FaxLineAddUserRequest.json + FaxLineCreateRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineCreateRequestExample.json - FaxLineDeleteRequestExample: + $ref: examples/json/FaxLineCreateRequest.json + FaxLineDeleteRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineDeleteRequestExample.json - FaxLineRemoveUserRequestExample: + $ref: examples/json/FaxLineDeleteRequest.json + FaxLineRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineRemoveUserRequestExample.json - FaxSendRequestExample: + $ref: examples/json/FaxLineRemoveUserRequest.json + FaxSendRequest: summary: 'Default Example' value: - $ref: examples/json/FaxSendRequestExample.json - OAuthTokenGenerateRequestExample: + $ref: examples/json/FaxSendRequest.json + OAuthTokenGenerateRequest: summary: 'OAuth Token Generate Example' value: - $ref: examples/json/OAuthTokenGenerateRequestExample.json - OAuthTokenRefreshRequestExample: + $ref: examples/json/OAuthTokenGenerateRequest.json + OAuthTokenRefreshRequest: summary: 'OAuth Token Refresh Example' value: - $ref: examples/json/OAuthTokenRefreshRequestExample.json - ReportCreateRequestDefaultExample: + $ref: examples/json/OAuthTokenRefreshRequest.json + ReportCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/ReportCreateRequest.json + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json + SignatureRequestBulkSendWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkSendWithTemplateRequest.json + SignatureRequestCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/ReportCreateRequestDefaultExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedRequest.json + SignatureRequestCreateEmbeddedRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json + SignatureRequestCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestBulkSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json + SignatureRequestEditRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestDefaultExample: + $ref: examples/json/SignatureRequestEditRequest.json + SignatureRequestEditRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSigners.json + SignatureRequestEditEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequest.json + SignatureRequestEditEmbeddedRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json - SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json + SignatureRequestEditEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json + SignatureRequestEditWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestRemindRequestDefaultExample: + $ref: examples/json/SignatureRequestEditWithTemplateRequest.json + SignatureRequestRemindRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestRemindRequestDefaultExample.json - SignatureRequestSendRequestDefaultExample: + $ref: examples/json/SignatureRequestRemindRequest.json + SignatureRequestSendRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendRequestDefaultExample.json - SignatureRequestSendRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestSendRequest.json + SignatureRequestSendRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestSendRequestGroupedSignersExample.json - SignatureRequestSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendRequestGroupedSigners.json + SignatureRequestSendWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json - SignatureRequestUpdateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendWithTemplateRequest.json + SignatureRequestUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestUpdateRequestDefaultExample.json - TeamAddMemberRequestEmailAddressExample: + $ref: examples/json/SignatureRequestUpdateRequest.json + TeamAddMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamAddMemberRequestEmailAddressExample.json - TeamAddMemberRequestAccountIdExample: + $ref: examples/json/TeamAddMemberRequest.json + TeamAddMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamAddMemberRequestAccountIdExample.json - TeamCreateRequestDefaultExample: + $ref: examples/json/TeamAddMemberRequestAccountId.json + TeamCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamCreateRequestDefaultExample.json - TeamRemoveMemberRequestEmailAddressExample: + $ref: examples/json/TeamCreateRequest.json + TeamRemoveMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamRemoveMemberRequestEmailAddressExample.json - TeamRemoveMemberRequestAccountIdExample: + $ref: examples/json/TeamRemoveMemberRequest.json + TeamRemoveMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamRemoveMemberRequestAccountIdExample.json - TeamUpdateRequestDefaultExample: + $ref: examples/json/TeamRemoveMemberRequestAccountId.json + TeamUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamUpdateRequestDefaultExample.json - TemplateAddUserRequestDefaultExample: + $ref: examples/json/TeamUpdateRequest.json + TemplateAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateAddUserRequestDefaultExample.json - TemplateCreateRequestDefaultExample: + $ref: examples/json/TemplateAddUserRequest.json + TemplateCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateRequestDefaultExample.json - TemplateCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateRequest.json + TemplateCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json - TemplateCreateRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateRequestFormFieldsPerDocument.json + TemplateCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldGroupsExample.json - TemplateCreateRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateRequestFormFieldGroups.json + TemplateCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldRulesExample.json - TemplateCreateEmbeddedDraftRequestDefaultExample: + $ref: examples/json/TemplateCreateRequestFormFieldRules.json + TemplateCreateEmbeddedDraftRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json - TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequest.json + TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json - TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json + TemplateCreateEmbeddedDraftRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json - TemplateCreateEmbeddedDraftRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json + TemplateCreateEmbeddedDraftRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json - TemplateRemoveUserRequestDefaultExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json + TemplateRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateRemoveUserRequestDefaultExample.json - TemplateUpdateFilesRequestDefaultExample: + $ref: examples/json/TemplateRemoveUserRequest.json + TemplateUpdateFilesRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateUpdateFilesRequestDefaultExample.json - UnclaimedDraftCreateRequestDefaultExample: + $ref: examples/json/TemplateUpdateFilesRequest.json + UnclaimedDraftCreateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestDefaultExample.json - UnclaimedDraftCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateRequest.json + UnclaimedDraftCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json + UnclaimedDraftCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json - UnclaimedDraftCreateRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json + UnclaimedDraftCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequest.json + UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json + UnclaimedDraftCreateEmbeddedRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json + UnclaimedDraftCreateEmbeddedRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json - UnclaimedDraftEditAndResendRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json + UnclaimedDraftEditAndResendRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json - AccountCreateResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountCreateResponse: summary: '_t__AccountCreateResponseExample::SUMMARY' value: - $ref: examples/json/AccountCreateResponseExample.json - AccountCreateOAuthResponseExample: + $ref: examples/json/AccountCreateResponse.json + AccountCreateOAuthResponse: summary: '_t__AccountCreateOAuthResponseExample::SUMMARY' value: - $ref: examples/json/AccountCreateOAuthResponseExample.json - AccountGetResponseExample: + $ref: examples/json/AccountCreateOAuthResponse.json + AccountGetResponse: summary: '_t__AccountGetResponseExample::SUMMARY' value: - $ref: examples/json/AccountGetResponseExample.json - AccountVerifyFoundResponseExample: + $ref: examples/json/AccountGetResponse.json + AccountVerifyFoundResponse: summary: '_t__AccountVerifyFoundResponseExample::SUMMARY' value: - $ref: examples/json/AccountVerifyFoundResponseExample.json - AccountVerifyNotFoundResponseExample: + $ref: examples/json/AccountVerifyFoundResponse.json + AccountVerifyNotFoundResponse: summary: '_t__AccountVerifyNotFoundResponseExample::SUMMARY' value: - $ref: examples/json/AccountVerifyNotFoundResponseExample.json - ApiAppGetResponseExample: + $ref: examples/json/AccountVerifyNotFoundResponse.json + ApiAppGetResponse: summary: '_t__ApiAppGetResponseExample::SUMMARY' value: - $ref: examples/json/ApiAppGetResponseExample.json - ApiAppListResponseExample: + $ref: examples/json/ApiAppGetResponse.json + ApiAppListResponse: summary: '_t__ApiAppListResponseExample::SUMMARY' value: - $ref: examples/json/ApiAppListResponseExample.json - BulkSendJobGetResponseExample: + $ref: examples/json/ApiAppListResponse.json + BulkSendJobGetResponse: summary: '_t__BulkSendJobGetResponseExample::SUMMARY' value: - $ref: examples/json/BulkSendJobGetResponseExample.json - BulkSendJobListResponseExample: + $ref: examples/json/BulkSendJobGetResponse.json + BulkSendJobListResponse: summary: '_t__BulkSendJobListResponseExample::SUMMARY' value: - $ref: examples/json/BulkSendJobListResponseExample.json - EmbeddedEditUrlResponseExample: + $ref: examples/json/BulkSendJobListResponse.json + EmbeddedEditUrlResponse: summary: '_t__EmbeddedEditUrlResponseExample::SUMMARY' value: - $ref: examples/json/EmbeddedEditUrlResponseExample.json - EmbeddedSignUrlResponseExample: + $ref: examples/json/EmbeddedEditUrlResponse.json + EmbeddedSignUrlResponse: summary: '_t__EmbeddedSignUrlResponseExample::SUMMARY' value: - $ref: examples/json/EmbeddedSignUrlResponseExample.json - Error400ResponseExample: + $ref: examples/json/EmbeddedSignUrlResponse.json + Error400Response: summary: '_t__Error::400' value: - $ref: examples/json/Error400ResponseExample.json - Error401ResponseExample: + $ref: examples/json/Error400Response.json + Error401Response: summary: '_t__Error::401' value: - $ref: examples/json/Error401ResponseExample.json - Error402ResponseExample: + $ref: examples/json/Error401Response.json + Error402Response: summary: '_t__Error::402' value: - $ref: examples/json/Error402ResponseExample.json - Error403ResponseExample: + $ref: examples/json/Error402Response.json + Error403Response: summary: '_t__Error::403' value: - $ref: examples/json/Error403ResponseExample.json - Error404ResponseExample: + $ref: examples/json/Error403Response.json + Error404Response: summary: '_t__Error::404' value: - $ref: examples/json/Error404ResponseExample.json - Error409ResponseExample: + $ref: examples/json/Error404Response.json + Error409Response: summary: '_t__Error::409' value: - $ref: examples/json/Error409ResponseExample.json - Error410ResponseExample: + $ref: examples/json/Error409Response.json + Error410Response: summary: '_t__Error::410' value: - $ref: examples/json/Error410ResponseExample.json - Error422ResponseExample: + $ref: examples/json/Error410Response.json + Error422Response: summary: '_t__Error::422' value: - $ref: examples/json/Error422ResponseExample.json - Error429ResponseExample: + $ref: examples/json/Error422Response.json + Error429Response: summary: '_t__Error::429' value: - $ref: examples/json/Error429ResponseExample.json - Error4XXResponseExample: + $ref: examples/json/Error429Response.json + Error4XXResponse: summary: '_t__Error::4XX' value: - $ref: examples/json/Error4XXResponseExample.json - FaxGetResponseExample: + $ref: examples/json/Error4XXResponse.json + FaxGetResponse: summary: '_t__FaxGetResponseExample::SUMMARY' value: - $ref: examples/json/FaxGetResponseExample.json - FaxLineResponseExample: + $ref: examples/json/FaxGetResponse.json + FaxLineResponse: summary: '_t__FaxLineResponseExample::SUMMARY' value: - $ref: examples/json/FaxLineResponseExample.json - FaxLineAreaCodeGetResponseExample: + $ref: examples/json/FaxLineResponse.json + FaxLineAreaCodeGetResponse: summary: '_t__FaxLineAreaCodeGetResponseExample::SUMMARY' value: - $ref: examples/json/FaxLineAreaCodeGetResponseExample.json - FaxLineListResponseExample: + $ref: examples/json/FaxLineAreaCodeGetResponse.json + FaxLineListResponse: summary: '_t__FaxLineListResponseExample::SUMMARY' value: - $ref: examples/json/FaxLineListResponseExample.json - FaxListResponseExample: + $ref: examples/json/FaxLineListResponse.json + FaxListResponse: summary: '_t__FaxListResponseExample::SUMMARY' value: - $ref: examples/json/FaxListResponseExample.json - ReportCreateResponseExample: + $ref: examples/json/FaxListResponse.json + ReportCreateResponse: summary: '_t__ReportCreateResponseExample::SUMMARY' value: - $ref: examples/json/ReportCreateResponseExample.json - SignatureRequestGetResponseExample: + $ref: examples/json/ReportCreateResponse.json + SignatureRequestGetResponse: summary: '_t__SignatureRequestGetResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestGetResponseExample.json - SignatureRequestListResponseExample: + $ref: examples/json/SignatureRequestGetResponse.json + SignatureRequestListResponse: summary: '_t__SignatureRequestListResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestListResponseExample.json - AccountUpdateResponseExample: + $ref: examples/json/SignatureRequestListResponse.json + AccountUpdateResponse: summary: '_t__AccountUpdateResponseExample::SUMMARY' value: - $ref: examples/json/AccountUpdateResponseExample.json - OAuthTokenGenerateResponseExample: + $ref: examples/json/AccountUpdateResponse.json + OAuthTokenGenerateResponse: summary: '_t__OAuthTokenGenerateResponseExample::SUMMARY' value: - $ref: examples/json/OAuthTokenGenerateResponseExample.json - OAuthTokenRefreshResponseExample: + $ref: examples/json/OAuthTokenGenerateResponse.json + OAuthTokenRefreshResponse: summary: '_t__OAuthTokenRefreshResponseExample::SUMMARY' value: - $ref: examples/json/OAuthTokenRefreshResponseExample.json - ApiAppCreateResponseExample: + $ref: examples/json/OAuthTokenRefreshResponse.json + ApiAppCreateResponse: summary: '_t__ApiAppCreateResponseExample::SUMMARY' value: - $ref: examples/json/ApiAppCreateResponseExample.json - ApiAppUpdateResponseExample: + $ref: examples/json/ApiAppCreateResponse.json + ApiAppUpdateResponse: summary: '_t__ApiAppUpdateResponseExample::SUMMARY' value: - $ref: examples/json/ApiAppUpdateResponseExample.json - SignatureRequestCreateEmbeddedResponseExample: + $ref: examples/json/ApiAppUpdateResponse.json + SignatureRequestCreateEmbeddedResponse: summary: '_t__SignatureRequestCreateEmbeddedResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json - SignatureRequestCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedResponse.json + SignatureRequestCreateEmbeddedWithTemplateResponse: summary: '_t__SignatureRequestCreateEmbeddedWithTemplateResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json - SignatureRequestFilesResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json + SignatureRequestFilesResponse: summary: '_t__SignatureRequestFilesResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestFilesResponseExample.json - SignatureRequestReleaseHoldResponseExample: + $ref: examples/json/SignatureRequestFilesResponse.json + SignatureRequestReleaseHoldResponse: summary: '_t__SignatureRequestReleaseHoldResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestReleaseHoldResponseExample.json - SignatureRequestRemindResponseExample: + $ref: examples/json/SignatureRequestReleaseHoldResponse.json + SignatureRequestRemindResponse: summary: '_t__SignatureRequestRemindResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestRemindResponseExample.json - SignatureRequestSendResponseExample: + $ref: examples/json/SignatureRequestRemindResponse.json + SignatureRequestSendResponse: summary: '_t__SignatureRequestSendResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestSendResponseExample.json - SignatureRequestSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestSendResponse.json + SignatureRequestSendWithTemplateResponse: summary: '_t__SignatureRequestSendWithTemplateResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json - SignatureRequestUpdateResponseExample: + $ref: examples/json/SignatureRequestSendWithTemplateResponse.json + SignatureRequestUpdateResponse: summary: '_t__SignatureRequestUpdateResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestUpdateResponseExample.json - SignatureRequestBulkSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestUpdateResponse.json + SignatureRequestBulkSendWithTemplateResponse: summary: '_t__SignatureRequestBulkSendWithTemplateResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestBulkSendWithTemplateResponse.json + SignatureRequestBulkCreateEmbeddedWithTemplateResponse: summary: '_t__SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample::SUMMARY' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json - TeamCreateResponseExample: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json + TeamCreateResponse: summary: '_t__TeamCreateResponseExample::SUMMARY' value: - $ref: examples/json/TeamCreateResponseExample.json - TeamMembersResponseExample: + $ref: examples/json/TeamCreateResponse.json + TeamMembersResponse: summary: '_t__TeamMembersResponseExample::SUMMARY' value: - $ref: examples/json/TeamMembersResponseExample.json - TeamRemoveMemberResponseExample: + $ref: examples/json/TeamMembersResponse.json + TeamRemoveMemberResponse: summary: '_t__TeamRemoveMemberResponseExample::SUMMARY' value: - $ref: examples/json/TeamRemoveMemberResponseExample.json - TeamUpdateResponseExample: + $ref: examples/json/TeamRemoveMemberResponse.json + TeamUpdateResponse: summary: '_t__TeamUpdateResponseExample::SUMMARY' value: - $ref: examples/json/TeamUpdateResponseExample.json - TeamDoesNotExistResponseExample: + $ref: examples/json/TeamUpdateResponse.json + TeamDoesNotExistResponse: summary: '_t__TeamDoesNotExistResponseExample::SUMMARY' value: - $ref: examples/json/TeamDoesNotExistResponseExample.json - TemplateAddUserResponseExample: + $ref: examples/json/TeamDoesNotExistResponse.json + TemplateAddUserResponse: summary: '_t__TemplateAddUserResponseExample::SUMMARY' value: - $ref: examples/json/TemplateAddUserResponseExample.json - TemplateFilesResponseExample: + $ref: examples/json/TemplateAddUserResponse.json + TemplateFilesResponse: summary: '_t__TemplateFilesResponseExample::SUMMARY' value: - $ref: examples/json/TemplateFilesResponseExample.json - TemplateRemoveUserResponseExample: + $ref: examples/json/TemplateFilesResponse.json + TemplateRemoveUserResponse: summary: '_t__TemplateRemoveUserResponseExample::SUMMARY' value: - $ref: examples/json/TemplateRemoveUserResponseExample.json - UnclaimedDraftCreateEmbeddedResponseExample: + $ref: examples/json/TemplateRemoveUserResponse.json + UnclaimedDraftCreateEmbeddedResponse: summary: '_t__UnclaimedDraftCreateEmbeddedResponseExample::SUMMARY' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json - UnclaimedDraftCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedResponse.json + UnclaimedDraftCreateEmbeddedWithTemplateResponse: summary: '_t__UnclaimedDraftCreateEmbeddedWithTemplateResponseExample::SUMMARY' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json - UnclaimedDraftEditAndResendExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json + UnclaimedDraftEditAndResend: summary: '_t__UnclaimedDraftEditAndResendExample::SUMMARY' value: - $ref: examples/json/UnclaimedDraftEditAndResendExample.json - TeamGetResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResend.json + TeamGetResponse: summary: '_t__TeamGetResponseExample::SUMMARY' value: - $ref: examples/json/TeamGetResponseExample.json - TeamGetInfoResponseExample: + $ref: examples/json/TeamGetResponse.json + TeamGetInfoResponse: summary: '_t__TeamInfoResponseExample::SUMMARY' value: - $ref: examples/json/TeamGetInfoResponseExample.json - TeamInvitesResponseExample: + $ref: examples/json/TeamGetInfoResponse.json + TeamInvitesResponse: summary: '_t__TeamInvitesResponseExample::SUMMARY' value: - $ref: examples/json/TeamInvitesResponseExample.json - TeamAddMemberResponseExample: + $ref: examples/json/TeamInvitesResponse.json + TeamAddMemberResponse: summary: '_t__TeamAddMemberResponseExample::SUMMARY' value: - $ref: examples/json/TeamAddMemberResponseExample.json - TeamSubTeamsResponseExample: + $ref: examples/json/TeamAddMemberResponse.json + TeamSubTeamsResponse: summary: '_t__TeamSubTeamsResponseExample::SUMMARY' value: - $ref: examples/json/TeamSubTeamsResponseExample.json - TemplateCreateResponseExample: + $ref: examples/json/TeamSubTeamsResponse.json + TemplateCreateResponse: summary: '_t__TemplateCreateResponseExample::SUMMARY' value: - $ref: examples/json/TemplateCreateResponseExample.json - TemplateCreateEmbeddedDraftResponseExample: + $ref: examples/json/TemplateCreateResponse.json + TemplateCreateEmbeddedDraftResponse: summary: '_t__TemplateCreateEmbeddedDraftResponseExample::SUMMARY' value: - $ref: examples/json/TemplateCreateEmbeddedDraftResponseExample.json - TemplateGetResponseExample: + $ref: examples/json/TemplateCreateEmbeddedDraftResponse.json + TemplateGetResponse: summary: '_t__TemplateGetResponseExample::SUMMARY' value: - $ref: examples/json/TemplateGetResponseExample.json - TemplateListResponseExample: + $ref: examples/json/TemplateGetResponse.json + TemplateListResponse: summary: '_t__TemplateListResponseExample::SUMMARY' value: - $ref: examples/json/TemplateListResponseExample.json - TemplateUpdateFilesResponseExample: + $ref: examples/json/TemplateListResponse.json + TemplateUpdateFilesResponse: summary: '_t__TemplateUpdateFilesResponseExample::SUMMARY' value: - $ref: examples/json/TemplateUpdateFilesResponseExample.json - UnclaimedDraftCreateResponseExample: + $ref: examples/json/TemplateUpdateFilesResponse.json + UnclaimedDraftCreateResponse: summary: '_t__UnclaimedDraftCreateResponseExample::SUMMARY' value: - $ref: examples/json/UnclaimedDraftCreateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: + $ref: examples/json/UnclaimedDraftCreateResponse.json + EventCallbackAccountSignatureRequestSent: summary: '_t__EventCallbackAccountSignatureRequestSentExample::SUMMARY' value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: + $ref: examples/json/EventCallbackAccountSignatureRequestSent.json + EventCallbackAccountTemplateCreated: summary: '_t__EventCallbackAccountTemplateCreatedExample::SUMMARY' value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: + $ref: examples/json/EventCallbackAccountTemplateCreated.json + EventCallbackAppAccountConfirmed: summary: '_t__EventCallbackAppAccountConfirmedExample::SUMMARY' value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: + $ref: examples/json/EventCallbackAppAccountConfirmed.json + EventCallbackAppSignatureRequestSent: summary: '_t__EventCallbackAppSignatureRequestSentExample::SUMMARY' value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: + $ref: examples/json/EventCallbackAppSignatureRequestSent.json + EventCallbackAppTemplateCreated: summary: '_t__EventCallbackAppTemplateCreatedExample::SUMMARY' value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json + $ref: examples/json/EventCallbackAppTemplateCreated.json requestBodies: EventCallbackAccountRequest: description: '_t__EventCallbackAccountRequest::DESCRIPTION' @@ -12794,9 +13311,9 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAccountSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAccountSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAccountTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAccountTemplateCreated' EventCallbackAppRequest: description: '_t__EventCallbackAppRequest::DESCRIPTION' content: @@ -12805,11 +13322,11 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: account_confirmed_example: - $ref: '#/components/examples/EventCallbackAppAccountConfirmedExample' + $ref: '#/components/examples/EventCallbackAppAccountConfirmed' signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAppSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAppSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAppTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAppTemplateCreated' headers: X-RateLimit-Limit: description: '_t__Common::RateLimiting::LIMIT' @@ -12842,6 +13359,7 @@ components: security: - api_key: [] + - oauth2: - account_access - signature_request_access @@ -12905,37 +13423,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: @@ -12957,37 +13470,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 608b57dd4..2a95555ab 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -27,12 +27,12 @@ paths: schema: $ref: '#/components/schemas/AccountCreateRequest' examples: - default_example: - $ref: '#/components/examples/AccountCreateRequestDefaultExample' - oauth: - $ref: '#/components/examples/AccountCreateRequestOAuthExample' + example: + $ref: '#/components/examples/AccountCreateRequest' + oauth_example: + $ref: '#/components/examples/AccountCreateRequestOAuth' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -46,11 +46,11 @@ paths: schema: $ref: '#/components/schemas/AccountCreateResponse' examples: - default_example: - $ref: '#/components/examples/AccountCreateResponseExample' - oauth: - $ref: '#/components/examples/AccountCreateOAuthResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountCreateResponse' + oauth_example: + $ref: '#/components/examples/AccountCreateOAuthResponse' + '4XX': description: failed_operation content: application/json: @@ -58,15 +58,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -78,42 +78,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountCreate.php + $ref: examples/AccountCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountCreate.js + $ref: examples/AccountCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountCreate.ts + $ref: examples/AccountCreateExample.ts - lang: Java label: Java source: - $ref: examples/AccountCreate.java + $ref: examples/AccountCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountCreate.rb + $ref: examples/AccountCreateExample.rb - lang: Python label: Python source: - $ref: examples/AccountCreate.py + $ref: examples/AccountCreateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountCreate.sh + $ref: examples/AccountCreateExample.sh x-meta: seo: title: 'Create Account | API Documentation | Dropbox Sign for Developers' @@ -147,7 +142,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -161,9 +156,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountGetResponse' + '4XX': description: failed_operation content: application/json: @@ -171,15 +166,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -192,42 +187,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountGet.php + $ref: examples/AccountGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountGet.js + $ref: examples/AccountGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountGet.ts + $ref: examples/AccountGetExample.ts - lang: Java label: Java source: - $ref: examples/AccountGet.java + $ref: examples/AccountGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountGet.rb + $ref: examples/AccountGetExample.rb - lang: Python label: Python source: - $ref: examples/AccountGet.py + $ref: examples/AccountGetExample.py - lang: cURL label: cURL source: - $ref: examples/AccountGet.sh + $ref: examples/AccountGetExample.sh x-meta: seo: title: 'Get Account | API Documentation | Dropbox Sign for Developers' @@ -245,10 +235,10 @@ paths: schema: $ref: '#/components/schemas/AccountUpdateRequest' examples: - default_example: - $ref: '#/components/examples/AccountUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/AccountUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -262,9 +252,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -272,17 +262,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -294,42 +284,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountUpdate.php + $ref: examples/AccountUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountUpdate.js + $ref: examples/AccountUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountUpdate.ts + $ref: examples/AccountUpdateExample.ts - lang: Java label: Java source: - $ref: examples/AccountUpdate.java + $ref: examples/AccountUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountUpdate.rb + $ref: examples/AccountUpdateExample.rb - lang: Python label: Python source: - $ref: examples/AccountUpdate.py + $ref: examples/AccountUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountUpdate.sh + $ref: examples/AccountUpdateExample.sh x-meta: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' @@ -348,10 +333,10 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyRequest' examples: - default_example: - $ref: '#/components/examples/AccountVerifyRequestDefaultExample' + example: + $ref: '#/components/examples/AccountVerifyRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -365,11 +350,11 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyResponse' examples: - default_example: - $ref: '#/components/examples/AccountVerifyFoundResponseExample' - not_found: - $ref: '#/components/examples/AccountVerifyNotFoundResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountVerifyFoundResponse' + not_found_example: + $ref: '#/components/examples/AccountVerifyNotFoundResponse' + '4XX': description: failed_operation content: application/json: @@ -377,15 +362,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -397,42 +382,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountVerify.php + $ref: examples/AccountVerifyExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountVerify.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountVerify.js + $ref: examples/AccountVerifyExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountVerify.ts + $ref: examples/AccountVerifyExample.ts - lang: Java label: Java source: - $ref: examples/AccountVerify.java + $ref: examples/AccountVerifyExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountVerify.rb + $ref: examples/AccountVerifyExample.rb - lang: Python label: Python source: - $ref: examples/AccountVerify.py + $ref: examples/AccountVerifyExample.py - lang: cURL label: cURL source: - $ref: examples/AccountVerify.sh + $ref: examples/AccountVerifyExample.sh x-meta: seo: title: 'Verify Account | API Documentation | Dropbox Sign for Developers' @@ -451,13 +431,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 201: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -471,9 +451,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -481,17 +461,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -503,42 +483,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppCreate.php + $ref: examples/ApiAppCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppCreate.js + $ref: examples/ApiAppCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppCreate.ts + $ref: examples/ApiAppCreateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppCreate.java + $ref: examples/ApiAppCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppCreate.rb + $ref: examples/ApiAppCreateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppCreate.py + $ref: examples/ApiAppCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppCreate.sh + $ref: examples/ApiAppCreateExample.sh x-meta: seo: title: 'Create API App | API Documentation | Dropbox Sign for Developers' @@ -560,7 +535,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -574,9 +549,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppGetResponse' + '4XX': description: failed_operation content: application/json: @@ -584,19 +559,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -608,42 +583,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppGet.php + $ref: examples/ApiAppGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppGet.js + $ref: examples/ApiAppGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppGet.ts + $ref: examples/ApiAppGetExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppGet.java + $ref: examples/ApiAppGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppGet.rb + $ref: examples/ApiAppGetExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppGet.py + $ref: examples/ApiAppGetExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppGet.sh + $ref: examples/ApiAppGetExample.sh x-meta: seo: title: 'Get API App | API Documentation | Dropbox Sign for Developers' @@ -670,13 +640,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -690,9 +660,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -700,19 +670,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -724,42 +694,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppUpdate.php + $ref: examples/ApiAppUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppUpdate.js + $ref: examples/ApiAppUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppUpdate.ts + $ref: examples/ApiAppUpdateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppUpdate.java + $ref: examples/ApiAppUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppUpdate.rb + $ref: examples/ApiAppUpdateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppUpdate.py + $ref: examples/ApiAppUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppUpdate.sh + $ref: examples/ApiAppUpdateExample.sh x-meta: seo: title: 'Update API App | API Documentation | Dropbox Sign for Developers' @@ -780,7 +745,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -789,7 +754,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -797,17 +762,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -819,42 +784,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppDelete.php + $ref: examples/ApiAppDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppDelete.js + $ref: examples/ApiAppDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppDelete.ts + $ref: examples/ApiAppDeleteExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppDelete.java + $ref: examples/ApiAppDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppDelete.rb + $ref: examples/ApiAppDeleteExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppDelete.py + $ref: examples/ApiAppDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppDelete.sh + $ref: examples/ApiAppDeleteExample.sh x-meta: seo: title: 'Delete API App | API Documentation | Dropbox Sign for Developers' @@ -882,7 +842,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -896,9 +856,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppListResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppListResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppListResponse' + '4XX': description: failed_operation content: application/json: @@ -906,15 +866,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -926,42 +886,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppList.php + $ref: examples/ApiAppListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppList.js + $ref: examples/ApiAppListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppList.ts + $ref: examples/ApiAppListExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppList.java + $ref: examples/ApiAppListExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppList.rb + $ref: examples/ApiAppListExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppList.py + $ref: examples/ApiAppListExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppList.sh + $ref: examples/ApiAppListExample.sh x-meta: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' @@ -997,7 +952,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1011,9 +966,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobGetResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1021,15 +976,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1042,42 +997,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobGet.php + $ref: examples/BulkSendJobGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobGet.js + $ref: examples/BulkSendJobGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobGet.ts + $ref: examples/BulkSendJobGetExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobGet.java + $ref: examples/BulkSendJobGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobGet.rb + $ref: examples/BulkSendJobGetExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobGet.py + $ref: examples/BulkSendJobGetExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobGet.sh + $ref: examples/BulkSendJobGetExample.sh x-meta: seo: title: 'Get Bulk Send Job | API Documentation | Dropbox Sign for Developers' @@ -1105,7 +1055,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1119,9 +1069,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobListResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobListResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobListResponse' + '4XX': description: failed_operation content: application/json: @@ -1129,15 +1079,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1150,42 +1100,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobList.php + $ref: examples/BulkSendJobListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobList.js + $ref: examples/BulkSendJobListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobList.ts + $ref: examples/BulkSendJobListExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobList.java + $ref: examples/BulkSendJobListExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobList.rb + $ref: examples/BulkSendJobListExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobList.py + $ref: examples/BulkSendJobListExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobList.sh + $ref: examples/BulkSendJobListExample.sh x-meta: seo: title: 'List Bulk Send Jobs | Documentation | Dropbox Sign for Developers' @@ -1213,10 +1158,10 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlRequestDefaultExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1230,9 +1175,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedEditUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1240,17 +1185,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1262,42 +1207,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedEditUrl.php + $ref: examples/EmbeddedEditUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedEditUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedEditUrl.js + $ref: examples/EmbeddedEditUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedEditUrl.ts + $ref: examples/EmbeddedEditUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedEditUrl.java + $ref: examples/EmbeddedEditUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedEditUrl.rb + $ref: examples/EmbeddedEditUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedEditUrl.py + $ref: examples/EmbeddedEditUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedEditUrl.sh + $ref: examples/EmbeddedEditUrlExample.sh x-meta: seo: title: 'Get Embedded Template URL | iFrame | Dropbox Sign for Developers' @@ -1319,7 +1259,7 @@ paths: type: string example: 50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1333,9 +1273,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedSignUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedSignUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedSignUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1343,21 +1283,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1369,42 +1309,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedSignUrl.php + $ref: examples/EmbeddedSignUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedSignUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedSignUrl.js + $ref: examples/EmbeddedSignUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedSignUrl.ts + $ref: examples/EmbeddedSignUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedSignUrl.java + $ref: examples/EmbeddedSignUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedSignUrl.rb + $ref: examples/EmbeddedSignUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedSignUrl.py + $ref: examples/EmbeddedSignUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedSignUrl.sh + $ref: examples/EmbeddedSignUrlExample.sh x-meta: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' @@ -1414,7 +1349,7 @@ paths: tags: - Fax summary: 'Get Fax' - description: 'Returns information about fax' + description: 'Returns information about a Fax' operationId: faxGet parameters: - @@ -1426,7 +1361,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1440,9 +1375,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1450,19 +1385,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1471,51 +1406,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxGet.php + $ref: examples/FaxGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxGet.js + $ref: examples/FaxGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxGet.ts + $ref: examples/FaxGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxGet.java + $ref: examples/FaxGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxGet.rb + $ref: examples/FaxGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxGet.py + $ref: examples/FaxGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxGet.sh + $ref: examples/FaxGetExample.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.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve properties of a fax, click here.' delete: tags: - Fax summary: 'Delete Fax' - description: 'Deletes the specified Fax from the system.' + description: 'Deletes the specified Fax from the system' operationId: faxDelete parameters: - @@ -1527,7 +1457,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1536,7 +1466,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1544,19 +1474,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1565,42 +1495,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxDelete.php + $ref: examples/FaxDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxDelete.js + $ref: examples/FaxDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxDelete.ts + $ref: examples/FaxDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxDelete.java + $ref: examples/FaxDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxDelete.rb + $ref: examples/FaxDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxDelete.py + $ref: examples/FaxDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxDelete.sh + $ref: examples/FaxDeleteExample.sh x-meta: seo: title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' @@ -1609,8 +1534,8 @@ paths: get: tags: - Fax - summary: 'List Fax Files' - description: 'Returns list of fax files' + summary: 'Download Fax Files' + description: 'Downloads files associated with a Fax' operationId: faxFiles parameters: - @@ -1622,7 +1547,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1636,7 +1561,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1644,21 +1569,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1667,46 +1592,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxFiles.php + $ref: examples/FaxFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxFiles.js + $ref: examples/FaxFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxFiles.ts + $ref: examples/FaxFilesExample.ts - lang: Java label: Java source: - $ref: examples/FaxFiles.java + $ref: examples/FaxFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxFiles.rb + $ref: examples/FaxFilesExample.rb - lang: Python label: Python source: - $ref: examples/FaxFiles.py + $ref: examples/FaxFilesExample.py - lang: cURL label: cURL source: - $ref: examples/FaxFiles.sh + $ref: examples/FaxFilesExample.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.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list the files of a fax, click here.' /fax_line/add_user: put: tags: @@ -1721,10 +1641,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineAddUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineAddUserRequestExample' + example: + $ref: '#/components/examples/FaxLineAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1738,9 +1658,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -1748,17 +1668,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1767,42 +1687,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAddUser.php + $ref: examples/FaxLineAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAddUser.js + $ref: examples/FaxLineAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAddUser.ts + $ref: examples/FaxLineAddUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAddUser.java + $ref: examples/FaxLineAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAddUser.rb + $ref: examples/FaxLineAddUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAddUser.py + $ref: examples/FaxLineAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAddUser.sh + $ref: examples/FaxLineAddUserExample.sh x-meta: seo: title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' @@ -1812,13 +1727,13 @@ paths: tags: - 'Fax Line' summary: 'Get Available Fax Line Area Codes' - description: 'Returns a response with the area codes available for a given state/provice and city.' + description: 'Returns a list of available area codes for a given state/province and city' operationId: faxLineAreaCodeGet parameters: - name: country in: query - description: 'Filter area codes by country.' + description: 'Filter area codes by country' required: true schema: type: string @@ -1826,10 +1741,11 @@ paths: - CA - US - UK + example: US - name: state in: query - description: 'Filter area codes by state.' + description: 'Filter area codes by state' schema: type: string enum: @@ -1887,7 +1803,7 @@ paths: - name: province in: query - description: 'Filter area codes by province.' + description: 'Filter area codes by province' schema: type: string enum: @@ -1907,11 +1823,11 @@ paths: - name: city in: query - description: 'Filter area codes by city.' + description: 'Filter area codes by city' schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1925,9 +1841,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1935,15 +1851,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1952,52 +1868,47 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAreaCodeGet.php + $ref: examples/FaxLineAreaCodeGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAreaCodeGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAreaCodeGet.js + $ref: examples/FaxLineAreaCodeGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAreaCodeGet.ts + $ref: examples/FaxLineAreaCodeGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAreaCodeGet.java + $ref: examples/FaxLineAreaCodeGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAreaCodeGet.rb + $ref: examples/FaxLineAreaCodeGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAreaCodeGet.py + $ref: examples/FaxLineAreaCodeGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAreaCodeGet.sh + $ref: examples/FaxLineAreaCodeGetExample.sh x-meta: seo: title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out what area codes are available, click here.' /fax_line/create: post: tags: - 'Fax Line' summary: 'Purchase Fax Line' - description: 'Purchases a new Fax Line.' + description: 'Purchases a new Fax Line' operationId: faxLineCreate requestBody: required: true @@ -2006,10 +1917,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineCreateRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineCreateRequestExample' + example: + $ref: '#/components/examples/FaxLineCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2023,9 +1934,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2033,17 +1944,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2052,42 +1963,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineCreate.php + $ref: examples/FaxLineCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineCreate.js + $ref: examples/FaxLineCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineCreate.ts + $ref: examples/FaxLineCreateExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineCreate.java + $ref: examples/FaxLineCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineCreate.rb + $ref: examples/FaxLineCreateExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineCreate.py + $ref: examples/FaxLineCreateExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineCreate.sh + $ref: examples/FaxLineCreateExample.sh x-meta: seo: title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2103,12 +2009,13 @@ paths: - name: number in: query - description: 'The Fax Line number.' + description: 'The Fax Line number' required: true schema: type: string + example: 123-123-1234 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2122,9 +2029,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2132,17 +2039,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2151,46 +2058,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineGet.php + $ref: examples/FaxLineGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineGet.js + $ref: examples/FaxLineGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineGet.ts + $ref: examples/FaxLineGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineGet.java + $ref: examples/FaxLineGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineGet.rb + $ref: examples/FaxLineGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineGet.py + $ref: examples/FaxLineGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineGet.sh + $ref: examples/FaxLineGetExample.sh x-meta: seo: title: 'Get Fax Line | 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 line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve the properties of a fax line, click here.' delete: tags: - 'Fax Line' @@ -2204,10 +2106,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineDeleteRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineDeleteRequestExample' + example: + $ref: '#/components/examples/FaxLineDeleteRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2218,7 +2120,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -2226,17 +2128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2245,42 +2147,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineDelete.php + $ref: examples/FaxLineDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineDelete.js + $ref: examples/FaxLineDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineDelete.ts + $ref: examples/FaxLineDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineDelete.java + $ref: examples/FaxLineDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineDelete.rb + $ref: examples/FaxLineDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineDeleteExample.sh x-meta: seo: title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2299,31 +2196,31 @@ paths: description: 'Account ID' schema: type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query - description: Page + description: 'Which page number of the Fax Line List to return. Defaults to `1`.' schema: type: integer default: 1 - example: 1 + example: 1 - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 - example: 20 + example: 20 - name: show_team_lines in: query - description: 'Show team lines' + description: 'Include Fax Lines belonging to team members in the list' schema: type: boolean responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2337,9 +2234,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineListResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineListResponse' + '4XX': description: failed_operation content: application/json: @@ -2347,15 +2244,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2364,42 +2261,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxLineListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineList.js + $ref: examples/FaxLineListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxLineListExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxLineListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxLineListExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxLineListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxLineListExample.sh x-meta: seo: title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' @@ -2409,7 +2301,7 @@ paths: tags: - 'Fax Line' summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' + description: 'Removes a user''s access to the specified Fax Line' operationId: faxLineRemoveUser requestBody: required: true @@ -2418,10 +2310,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + example: + $ref: '#/components/examples/FaxLineRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2435,9 +2327,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2445,17 +2337,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2464,42 +2356,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxLineRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxLineRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxLineRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxLineRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxLineRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxLineRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxLineRemoveUserExample.sh x-meta: seo: title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' @@ -2509,13 +2396,13 @@ paths: tags: - Fax summary: 'Lists Faxes' - description: 'Returns properties of multiple faxes' + description: 'Returns properties of multiple Faxes' operationId: faxList parameters: - name: page in: query - description: Page + description: 'Which page number of the Fax List to return. Defaults to `1`.' schema: type: integer default: 1 @@ -2524,7 +2411,7 @@ paths: - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 @@ -2532,7 +2419,7 @@ paths: minimum: 1 example: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2546,9 +2433,9 @@ paths: schema: $ref: '#/components/schemas/FaxListResponse' examples: - default_example: - $ref: '#/components/examples/FaxListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxListResponse' + '4XX': description: failed_operation content: application/json: @@ -2556,15 +2443,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2573,42 +2460,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxList.php + $ref: examples/FaxListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxList.js + $ref: examples/FaxListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxList.ts + $ref: examples/FaxListExample.ts - lang: Java label: Java source: - $ref: examples/FaxList.java + $ref: examples/FaxListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxList.rb + $ref: examples/FaxListExample.rb - lang: Python label: Python source: - $ref: examples/FaxList.py + $ref: examples/FaxListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxList.sh + $ref: examples/FaxListExample.sh x-meta: seo: title: 'List Faxes | API Documentation | Dropbox Fax for Developers' @@ -2618,7 +2500,7 @@ paths: tags: - Fax summary: 'Send Fax' - description: 'Action to prepare and send a fax' + description: 'Creates and sends a new Fax with the submitted file(s)' operationId: faxSend requestBody: required: true @@ -2627,13 +2509,13 @@ paths: schema: $ref: '#/components/schemas/FaxSendRequest' examples: - default_example: - $ref: '#/components/examples/FaxSendRequestExample' + example: + $ref: '#/components/examples/FaxSendRequest' multipart/form-data: schema: $ref: '#/components/schemas/FaxSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2647,9 +2529,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -2657,19 +2539,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2678,45 +2560,40 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxSend.php + $ref: examples/FaxSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxSend.js + $ref: examples/FaxSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxSend.ts + $ref: examples/FaxSendExample.ts - lang: Java label: Java source: - $ref: examples/FaxSend.java + $ref: examples/FaxSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxSend.rb + $ref: examples/FaxSendExample.rb - lang: Python label: Python source: - $ref: examples/FaxSend.py + $ref: examples/FaxSendExample.py - lang: cURL label: cURL source: - $ref: examples/FaxSend.sh + $ref: examples/FaxSendExample.sh x-meta: seo: - title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + 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: @@ -2732,10 +2609,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenGenerateRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateRequestExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2749,9 +2626,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenGenerateResponse' + '4XX': description: failed_operation content: application/json: @@ -2759,15 +2636,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2777,42 +2654,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenGenerate.php + $ref: examples/OauthTokenGenerateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenGenerate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenGenerate.js + $ref: examples/OauthTokenGenerateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenGenerate.ts + $ref: examples/OauthTokenGenerateExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenGenerate.java + $ref: examples/OauthTokenGenerateExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenGenerate.rb + $ref: examples/OauthTokenGenerateExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenGenerate.py + $ref: examples/OauthTokenGenerateExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenGenerate.sh + $ref: examples/OauthTokenGenerateExample.sh x-meta: seo: title: 'Generate OAuth Token | Documentation | Dropbox Sign for Developers' @@ -2832,10 +2704,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenRefreshRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshRequestExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2849,9 +2721,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenRefreshResponse' + '4XX': description: failed_operation content: application/json: @@ -2859,15 +2731,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2877,42 +2749,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenRefresh.php + $ref: examples/OauthTokenRefreshExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenRefresh.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenRefresh.js + $ref: examples/OauthTokenRefreshExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenRefresh.ts + $ref: examples/OauthTokenRefreshExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenRefresh.java + $ref: examples/OauthTokenRefreshExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenRefresh.rb + $ref: examples/OauthTokenRefreshExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenRefresh.py + $ref: examples/OauthTokenRefreshExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenRefresh.sh + $ref: examples/OauthTokenRefreshExample.sh x-meta: seo: title: 'OAuth Token Refresh | Documentation | Dropbox Sign for Developers' @@ -2935,10 +2802,10 @@ paths: schema: $ref: '#/components/schemas/ReportCreateRequest' examples: - default_example: - $ref: '#/components/examples/ReportCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ReportCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2952,9 +2819,9 @@ paths: schema: $ref: '#/components/schemas/ReportCreateResponse' examples: - default_example: - $ref: '#/components/examples/ReportCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ReportCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -2962,15 +2829,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2979,42 +2846,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ReportCreate.php + $ref: examples/ReportCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ReportCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ReportCreate.js + $ref: examples/ReportCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ReportCreate.ts + $ref: examples/ReportCreateExample.ts - lang: Java label: Java source: - $ref: examples/ReportCreate.java + $ref: examples/ReportCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ReportCreate.rb + $ref: examples/ReportCreateExample.rb - lang: Python label: Python source: - $ref: examples/ReportCreate.py + $ref: examples/ReportCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ReportCreate.sh + $ref: examples/ReportCreateExample.sh x-meta: seo: title: 'Create Report | API Documentation | Dropbox Sign for Developers' @@ -3036,13 +2898,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3056,9 +2918,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3066,21 +2928,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3089,42 +2951,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Embedded Bulk Send with Template | Dropbox Sign for Developers' @@ -3146,13 +3003,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3166,9 +3023,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3176,17 +3033,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3199,42 +3056,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkSendWithTemplate.php + $ref: examples/SignatureRequestBulkSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkSendWithTemplate.js + $ref: examples/SignatureRequestBulkSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkSendWithTemplate.ts + $ref: examples/SignatureRequestBulkSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkSendWithTemplate.java + $ref: examples/SignatureRequestBulkSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkSendWithTemplate.rb + $ref: examples/SignatureRequestBulkSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkSendWithTemplate.py + $ref: examples/SignatureRequestBulkSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkSendWithTemplate.sh + $ref: examples/SignatureRequestBulkSendWithTemplateExample.sh x-meta: seo: title: 'Bulk Send with Template | REST API | Dropbox Sign for Developers' @@ -3265,7 +3117,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3276,7 +3128,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -3284,21 +3136,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3311,42 +3163,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCancel.php + $ref: examples/SignatureRequestCancelExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCancel.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCancel.js + $ref: examples/SignatureRequestCancelExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCancel.ts + $ref: examples/SignatureRequestCancelExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCancel.java + $ref: examples/SignatureRequestCancelExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCancel.rb + $ref: examples/SignatureRequestCancelExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCancel.py + $ref: examples/SignatureRequestCancelExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCancel.sh + $ref: examples/SignatureRequestCancelExample.sh x-meta: seo: title: 'Cancel Incomplete Signature Request | Dropbox Sign for Developers' @@ -3365,15 +3212,15 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3387,9 +3234,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3397,19 +3244,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3421,42 +3268,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbedded.php + $ref: examples/SignatureRequestCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbedded.js + $ref: examples/SignatureRequestCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbedded.ts + $ref: examples/SignatureRequestCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbedded.java + $ref: examples/SignatureRequestCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbedded.rb + $ref: examples/SignatureRequestCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbedded.py + $ref: examples/SignatureRequestCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbedded.sh + $ref: examples/SignatureRequestCreateEmbeddedExample.sh x-meta: seo: title: 'Create Embedded Signature Request | Dropbox Sign for Developers' @@ -3475,13 +3317,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3495,9 +3337,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3505,19 +3347,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3529,77 +3371,76 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create a new SignatureRequest based on the given Template, click here.' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files' + summary: 'Edit Signature Request' description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFiles + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3609,15 +3450,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditResponse' + '4XX': description: failed_operation content: application/json: @@ -3625,23 +3464,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3654,67 +3491,75 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEditExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEditExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEditExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEditExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEditExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEditExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEditExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsDataUri + summary: 'Edit Embedded Signature Request' + description: 'Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3726,11 +3571,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3738,103 +3583,99 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbeddedExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsFileUrl + summary: 'Edit Embedded Signature Request with Template' + description: 'Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3846,11 +3687,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3858,93 +3699,102 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplateExample.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/{signature_request_id}': - get: + title: 'Signature Request with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Get Signature Request' - description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' - operationId: signatureRequestGet + summary: 'Edit Signature Request With Template' + description: |- + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3958,9 +3808,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3968,19 +3818,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3993,86 +3845,74 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplateExample.sh x-meta: seo: - title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' - /signature_request/list: + title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: 'List Signature Requests' + summary: 'Download Files' description: |- - Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - operationId: signatureRequestList + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page + name: file_type in: query - description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - - - name: query - in: query - description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + default: pdf + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4082,13 +3922,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -4096,17 +3938,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4119,64 +3967,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFilesExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFilesExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFilesExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFilesExample.sh x-meta: seo: - title: 'List Signature Requests | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' - '/signature_request/release_hold/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Release On-Hold Signature Request' - description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' - operationId: signatureRequestReleaseHold + summary: 'Download Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsDataUri parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to release.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4188,11 +4034,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4200,98 +4046,98 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestFilesAsDataUriExample.sh x-meta: seo: - title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' - '/signature_request/remind/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_file_url/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Send Request Reminder' + summary: 'Download Files as File Url' description: |- - Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - **NOTE:** This action can **not** be used with embedded signature requests. - operationId: signatureRequestRemind + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsFileUrl parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to send a reminder for.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestRemindRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4303,11 +4149,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -4315,23 +4161,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4344,69 +4190,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestFilesAsFileUrlExample.sh x-meta: seo: - title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' - '/signature_request/remove/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Remove Signature Request Access' - description: |- - Removes your access to a completed signature request. This action is **not reversible**. - - The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). - - Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. - operationId: signatureRequestRemove + summary: 'Get Signature Request' + description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' + operationId: signatureRequestGet parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to remove.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4416,8 +4252,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestGetResponse' + '4XX': description: failed_operation content: application/json: @@ -4425,92 +4266,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] + - + oauth2: + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestGetExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestGetExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestGetExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestGetExample.sh x-meta: seo: - title: 'Remove Signature Request Access | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' - /signature_request/send: - post: + title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' + /signature_request/list: + get: tags: - 'Signature Request' - summary: 'Send Signature Request' - description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' - operationId: signatureRequestSend - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' - grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' + summary: 'List Signature Requests' + description: |- + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + + Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4522,11 +4377,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/SignatureRequestListResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestListResponse' + '4XX': description: failed_operation content: application/json: @@ -4534,19 +4389,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4559,67 +4412,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestListExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestListExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestListExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestListExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestListExample.sh x-meta: seo: - title: 'Send Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' - /signature_request/send_with_template: + title: 'List Signature Requests | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' + '/signature_request/release_hold/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Send with Template' - description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' - operationId: signatureRequestSendWithTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + summary: 'Release On-Hold Signature Request' + description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to release.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4633,9 +4478,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestReleaseHoldResponse' + '4XX': description: failed_operation content: application/json: @@ -4643,86 +4488,78 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestReleaseHoldExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestReleaseHoldExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestReleaseHoldExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestReleaseHoldExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestReleaseHoldExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestReleaseHoldExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestReleaseHoldExample.sh x-meta: seo: - title: 'Send with Template | API Documentation | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' - '/signature_request/update/{signature_request_id}': + title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' + '/signature_request/remind/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Update Signature Request' + summary: 'Send Request Reminder' description: |- - Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. - - Updating the email address of a signer will generate a new `signature_id` value. + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. - **NOTE:** This action cannot be performed on a signature request with an appended signature page. - operationId: signatureRequestUpdate + **NOTE:** This action can **not** be used with embedded signature requests. + operationId: signatureRequestRemind parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to update.' + description: 'The id of the SignatureRequest to send a reminder for.' required: true schema: type: string @@ -4732,12 +4569,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestUpdateRequest' + $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestRemindRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4751,9 +4588,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestRemindResponse' + '4XX': description: failed_operation content: application/json: @@ -4761,97 +4598,93 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' - security: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: - api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestRemindExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestRemindExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestRemindExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestRemindExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestRemindExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestRemindExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestRemindExample.sh x-meta: seo: - title: 'Update Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' - /team/add_member: - put: + title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' + '/signature_request/remove/{signature_request_id}': + post: tags: - - Team - summary: 'Add User to Team' - description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' - operationId: teamAddMember + - 'Signature Request' + summary: 'Remove Signature Request Access' + description: |- + Removes your access to a completed signature request. This action is **not reversible**. + + The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + + Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + operationId: signatureRequestRemove parameters: - - name: team_id - in: query - description: 'The id of the team.' - required: false + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to remove.' + required: true schema: type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamAddMemberRequest' - examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4861,13 +4694,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -4875,86 +4703,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - - - oauth2: - - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/SignatureRequestRemoveExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamAddMember.js + $ref: examples/SignatureRequestRemoveExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/SignatureRequestRemoveExample.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/SignatureRequestRemoveExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/SignatureRequestRemoveExample.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/SignatureRequestRemoveExample.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/SignatureRequestRemoveExample.sh x-meta: seo: - title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: + title: 'Remove Signature Request Access | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' + /signature_request/send: post: tags: - - Team - summary: 'Create Team' - description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' - operationId: teamCreate + - 'Signature Request' + summary: 'Send Signature Request' + description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' + operationId: signatureRequestSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamCreateRequest' + $ref: '#/components/schemas/SignatureRequestSendRequest' examples: - default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendRequest' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSigners' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4966,11 +4795,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestSendResponse' + '4XX': description: failed_operation content: application/json: @@ -4978,75 +4807,87 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/SignatureRequestSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamCreate.js + $ref: examples/SignatureRequestSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/SignatureRequestSendExample.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/SignatureRequestSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/SignatureRequestSendExample.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/SignatureRequestSendExample.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/SignatureRequestSendExample.sh x-meta: seo: - title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: 'Send Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' + /signature_request/send_with_template: + post: tags: - - Team - summary: 'Delete Team' - description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' - operationId: teamDelete + - 'Signature Request' + summary: 'Send with Template' + description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' + operationId: signatureRequestSendWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5055,7 +4896,14 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -5063,75 +4911,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/SignatureRequestSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamDelete.js + $ref: examples/SignatureRequestSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/SignatureRequestSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/SignatureRequestSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/SignatureRequestSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/SignatureRequestSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/SignatureRequestSendWithTemplateExample.sh x-meta: seo: - title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: - get: + title: 'Send with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' + '/signature_request/update/{signature_request_id}': + post: tags: - - Team - summary: 'Get Team' - description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' - operationId: teamGet + - 'Signature Request' + summary: 'Update Signature Request' + description: |- + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + + Updating the email address of a signer will generate a new `signature_id` value. + + **NOTE:** This action cannot be performed on a signature request with an appended signature page. + operationId: signatureRequestUpdate + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to update.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestUpdateRequest' + examples: + example: + $ref: '#/components/examples/SignatureRequestUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5143,11 +5012,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5155,85 +5024,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - team_access + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/SignatureRequestUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamGet.js + $ref: examples/SignatureRequestUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/SignatureRequestUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/SignatureRequestUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/SignatureRequestUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/SignatureRequestUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/SignatureRequestUpdateExample.sh x-meta: seo: - title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + title: 'Update Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' + /team/add_member: put: tags: - Team - summary: 'Update Team' - description: 'Updates the name of your Team.' - operationId: teamUpdate + summary: 'Add User to Team' + description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' + operationId: teamAddMember + parameters: + - + name: team_id + in: query + description: 'The id of the team.' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamUpdateRequest' + $ref: '#/components/schemas/TeamAddMemberRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamAddMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamAddMemberRequestAccountId' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5247,9 +5123,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamAddMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -5257,15 +5133,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5277,64 +5155,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamAddMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamAddMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamAddMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamAddMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamAddMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamAddMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamAddMemberExample.sh x-meta: seo: - title: 'Update Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: - get: + title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: tags: - Team - summary: 'Get Team Info' - description: 'Provides information about a team.' - operationId: teamInfo - parameters: - - - name: team_id - in: query - description: 'The id of the team.' - required: false - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + summary: 'Create Team' + description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + example: + $ref: '#/components/examples/TeamCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5346,11 +5219,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -5358,19 +5231,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5382,63 +5251,50 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInfo.js + $ref: examples/TeamCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamCreateExample.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamCreateExample.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamCreateExample.sh x-meta: seo: - title: 'Get Team Info | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: tags: - Team - summary: 'List Team Invites' - description: 'Provides a list of team invites (and their roles).' - operationId: teamInvites - parameters: - - - name: email_address - in: query - description: 'The email address for which to display the team invites.' - required: false - schema: - type: string + summary: 'Delete Team' + description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' + operationId: teamDelete responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5447,14 +5303,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/TeamInvitesResponse' - examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -5462,101 +5311,70 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInvites.js + $ref: examples/TeamDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamDeleteExample.sh x-meta: seo: - title: 'List Team Invites | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' - '/team/members/{team_id}': + title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: get: tags: - Team - summary: 'List Team Members' - description: 'Provides a paginated list of members (and their roles) that belong to a given team.' - operationId: teamMembers - parameters: - - - name: team_id - in: path - description: 'The id of the team that a member list is being requested from.' - required: true - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the team member list to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 + summary: 'Get Team' + description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' + operationId: teamGet responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5568,11 +5386,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamMembersResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetResponse' + '4XX': description: failed_operation content: application/json: @@ -5580,19 +5398,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5604,66 +5420,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamMembers.js + $ref: examples/TeamGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamGetExample.sh x-meta: seo: - title: 'List Team Members | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: - post: + title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: 'Remove User from Team' - description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' - operationId: teamRemoveMember + summary: 'Update Team' + description: 'Updates the name of your Team.' + operationId: teamUpdate requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' + $ref: '#/components/schemas/TeamUpdateRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: - 201: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5677,9 +5485,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5687,17 +5495,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5709,80 +5515,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamUpdateExample.sh x-meta: seo: - title: 'Remove User from Team | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + title: 'Update Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get Team Info' + description: 'Provides information about a team.' + operationId: teamInfo parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'The id of the team.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5794,11 +5579,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: - default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetInfoResponse' + '4XX': description: failed_operation content: application/json: @@ -5806,19 +5591,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5830,73 +5615,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamInfoExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamInfoExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamInfoExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamInfoExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamInfoExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamInfoExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamInfoExample.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': - post: + title: 'Get Team Info | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'List Team Invites' + description: 'Provides a list of team invites (and their roles).' + operationId: teamInvites parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: email_address + in: query + description: 'The email address for which to display the team invites.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5908,11 +5678,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamInvitesResponse' + '4XX': description: failed_operation content: application/json: @@ -5920,95 +5690,96 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TeamInvitesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateAddUser.js + $ref: examples/TeamInvitesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TeamInvitesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TeamInvitesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TeamInvitesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TeamInvitesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TeamInvitesExample.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'List Team Invites | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' + '/team/members/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: 'Creates a template that can then be used.' - operationId: templateCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' + - Team + summary: 'List Team Members' + description: 'Provides a paginated list of members (and their roles) that belong to a given team.' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: 'The id of the team that a member list is being requested from.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the team member list to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6020,11 +5791,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamMembersResponse' + '4XX': description: failed_operation content: application/json: @@ -6032,97 +5803,85 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TeamMembersExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreate.js + $ref: examples/TeamMembersExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TeamMembersExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TeamMembersExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TeamMembersExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TeamMembersExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TeamMembersExample.sh x-meta: seo: - title: 'Create Template | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' - /template/create_embedded_draft: + title: 'List Team Members | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: post: tags: - - Template - summary: 'Create Embedded Template Draft' - description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' - operationId: templateCreateEmbeddedDraft + - Team + summary: 'Remove User from Team' + description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' + operationId: teamRemoveMember requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: - 200: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6134,11 +5893,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamRemoveMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -6146,88 +5905,97 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: - title: 'Create Embedded Template Draft | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' - '/template/delete/{template_id}': - post: + title: 'Remove User from Team | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Delete Template' - description: 'Completely deletes the template specified from the account.' - operationId: templateDelete - parameters: - - - name: template_id + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams + parameters: + - + name: team_id in: path - description: 'The id of the Template to delete.' + description: 'The id of the parent Team.' required: true schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6237,8 +6005,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} - 4XX: + application/json: + schema: + $ref: '#/components/schemas/TeamSubTeamsResponse' + examples: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': description: failed_operation content: application/json: @@ -6246,100 +6019,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TeamSubTeamsExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateDelete.js + $ref: examples/TeamSubTeamsExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TeamSubTeamsExample.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TeamSubTeamsExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TeamSubTeamsExample.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TeamSubTeamsExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TeamSubTeamsExample.sh x-meta: seo: - title: 'Delete Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' - '/template/files/{template_id}': - get: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: tags: - Template - summary: 'Get Template Files' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFiles + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser parameters: - name: template_id in: path - description: 'The id of the template files to retrieve.' + description: 'The id of the Template to give the Account access to.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + example: + $ref: '#/components/examples/TemplateAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6349,15 +6114,13 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary - 4XX: + $ref: '#/components/schemas/TemplateGetResponse' + examples: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': description: failed_operation content: application/json: @@ -6365,23 +6128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6393,67 +6150,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateAddUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateAddUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateAddUserExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_data_uri/{template_id}': - get: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: tags: - Template - summary: 'Get Template Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsDataUri - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 + summary: 'Create Template' + description: 'Creates a template that can then be used.' + operationId: templateCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6465,11 +6223,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/TemplateCreateResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -6477,23 +6235,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6505,74 +6259,68 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateCreateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateCreateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateCreateExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_file_url/{template_id}': - get: + title: 'Create Template | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' + /template/create_embedded_draft: + post: tags: - Template - summary: 'Get Template Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsFileUrl - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + summary: 'Create Embedded Template Draft' + description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' + operationId: templateCreateEmbeddedDraft + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + examples: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6584,11 +6332,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponse' + '4XX': description: failed_operation content: application/json: @@ -6596,23 +6344,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6624,64 +6368,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateCreateEmbeddedDraftExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateCreateEmbeddedDraftExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateCreateEmbeddedDraftExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateCreateEmbeddedDraftExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateCreateEmbeddedDraftExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateCreateEmbeddedDraftExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateCreateEmbeddedDraftExample.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/{template_id}': - get: + title: 'Create Embedded Template Draft | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' + '/template/delete/{template_id}': + post: tags: - Template - summary: 'Get Template' - description: 'Returns the Template specified by the `template_id` parameter.' - operationId: templateGet + summary: 'Delete Template' + description: 'Completely deletes the template specified from the account.' + operationId: templateDelete parameters: - name: template_id in: path - description: 'The id of the Template to retrieve.' + description: 'The id of the Template to delete.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6691,13 +6430,8 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' - 4XX: + application/json: {} + '4XX': description: failed_operation content: application/json: @@ -6705,19 +6439,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6729,87 +6463,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateDeleteExample.sh x-meta: seo: - title: 'Get Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' - /template/list: + title: 'Delete Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' + '/template/files/{template_id}': get: tags: - Template - summary: 'List Templates' + summary: 'Get Template Files' description: |- - Returns a list of the Templates that are accessible by you. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - operationId: templateList + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFiles parameters: - - name: account_id - in: query - description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: template_id + in: path + description: 'The id of the template files to retrieve.' + required: true schema: type: string + example: f57db65d3f933b5316d398057a36176831451a35 - - name: page - in: query - description: 'Which page number of the Template List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + enum: + - pdf + - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6819,13 +6537,15 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/TemplateListResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' - 4XX: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + '4XX': description: failed_operation content: application/json: @@ -6833,19 +6553,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6857,73 +6581,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateList.js + $ref: examples/TemplateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateFilesExample.sh x-meta: seo: - title: 'List Templates | API Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' - '/template/remove_user/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_data_uri/{template_id}': + get: tags: - Template - summary: 'Remove User from Template' - description: 'Removes the specified Account''s access to the specified Template.' - operationId: templateRemoveUser + summary: 'Get Template Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsDataUri parameters: - name: template_id in: path - description: 'The id of the Template to remove the Account''s access to.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateRemoveUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6935,11 +6648,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -6947,17 +6660,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6969,88 +6688,69 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateFilesAsDataUriExample.sh x-meta: seo: - title: 'Remove User from Template | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' - '/template/update_files/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_file_url/{template_id}': + get: tags: - Template - summary: 'Update Template Files' + summary: 'Get Template Files as File Url' description: |- - Overlays a new file with the overlay of an existing template. The new file(s) must: - - 1. have the same or higher page count - 2. the same orientation as the file(s) being replaced. - - This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. - - Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. - - It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - operationId: templateUpdateFiles + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsFileUrl parameters: - name: template_id in: path - description: 'The ID of the template whose files to update.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7062,11 +6762,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateUpdateFilesResponse' + $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7074,21 +6774,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 422_example: + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7100,73 +6802,59 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateFilesAsFileUrlExample.sh x-meta: seo: - title: 'Update Template Files | REST API | Dropbox Sign for Developers' - description: 'Overlays a new file with the overlay of an existing template' - /unclaimed_draft/create: - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/{template_id}': + get: tags: - - 'Unclaimed Draft' - summary: 'Create Unclaimed Draft' - description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' - operationId: unclaimedDraftCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + - Template + summary: 'Get Template' + description: 'Returns the Template specified by the `template_id` parameter.' + operationId: templateGet + parameters: + - + name: template_id + in: path + description: 'The id of the Template to retrieve.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7178,11 +6866,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateGetResponse' + '4XX': description: failed_operation content: application/json: @@ -7190,96 +6878,106 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/TemplateGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/TemplateGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/TemplateGetExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/TemplateGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/TemplateGetExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/TemplateGetExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/TemplateGetExample.sh x-meta: seo: - title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' - /unclaimed_draft/create_embedded: - post: + title: 'Get Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' + /template/list: + get: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft' + - Template + summary: 'List Templates' description: |- - Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + Returns a list of the Templates that are accessible by you. - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbedded - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + operationId: templateList + parameters: + - + name: account_id + in: query + description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the Template List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + schema: + type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7291,11 +6989,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateListResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateListResponse' + '4XX': description: failed_operation content: application/json: @@ -7303,95 +7001,92 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/TemplateListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/TemplateListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/TemplateListExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/TemplateListExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/TemplateListExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/TemplateListExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/TemplateListExample.sh x-meta: seo: - title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' - /unclaimed_draft/create_embedded_with_template: + title: 'List Templates | API Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' + '/template/remove_user/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft with Template' - description: |- - Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbeddedWithTemplate + - Template + summary: 'Remove User from Template' + description: 'Removes the specified Account''s access to the specified Template.' + operationId: templateRemoveUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to remove the Account''s access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + example: + $ref: '#/components/examples/TemplateRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7403,11 +7098,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateRemoveUserResponse' + '4XX': description: failed_operation content: application/json: @@ -7415,102 +7110,105 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/TemplateRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/TemplateRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/TemplateRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/TemplateRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/TemplateRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/TemplateRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/TemplateRemoveUserExample.sh x-meta: seo: - title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' - '/unclaimed_draft/edit_and_resend/{signature_request_id}': + title: 'Remove User from Template | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' + '/template/update_files/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Edit and Resend Unclaimed Draft' + - Template + summary: 'Update Template Files' description: |- - Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + Overlays a new file with the overlay of an existing template. The new file(s) must: - **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftEditAndResend + 1. have the same or higher page count + 2. the same orientation as the file(s) being replaced. + + This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + + Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + + It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. + + If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + operationId: templateUpdateFiles parameters: - - name: signature_request_id + name: template_id in: path - description: 'The ID of the signature request to edit and resend.' + description: 'The ID of the template whose files to update.' required: true schema: type: string - example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7522,11 +7220,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' - 4XX: + example: + $ref: '#/components/examples/TemplateUpdateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7534,119 +7232,554 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/TemplateUpdateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs + $ref: examples/TemplateUpdateFilesExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/TemplateUpdateFilesExample.ts + - + lang: Java + label: Java + source: + $ref: examples/TemplateUpdateFilesExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/TemplateUpdateFilesExample.rb + - + lang: Python + label: Python + source: + $ref: examples/TemplateUpdateFilesExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/TemplateUpdateFilesExample.sh + x-meta: + seo: + title: 'Update Template Files | REST API | Dropbox Sign for Developers' + description: 'Overlays a new file with the overlay of an existing template' + /unclaimed_draft/create: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Unclaimed Draft' + description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' + operationId: unclaimedDraftCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + 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/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateExample.php - - lang: JavaScript - label: JavaScript + lang: 'C#' + label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/UnclaimedDraftCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/UnclaimedDraftCreateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/UnclaimedDraftCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/UnclaimedDraftCreateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/UnclaimedDraftCreateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/UnclaimedDraftCreateExample.sh x-meta: seo: - title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' -components: - schemas: - AccountCreateRequest: - required: - - email_address - properties: - client_id: - description: |- - Used when creating a new account with OAuth authorization. + title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' + /unclaimed_draft/create_embedded: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft' + description: |- + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - client_secret: - description: |- - Used when creating a new account with OAuth authorization. + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbedded + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRules' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + 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/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedExample.sh + x-meta: + seo: + title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' + /unclaimed_draft/create_embedded_with_template: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft with Template' + description: |- + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - email_address: - description: 'The email address which will be associated with the new Account.' - type: string - format: email - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountUpdateRequest: - properties: - account_id: - description: 'The ID of the Account' - type: string - nullable: true - callback_url: - description: 'The URL that Dropbox Sign should POST events to.' - type: string - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountVerifyRequest: - required: - - email_address - properties: - email_address: - description: 'Email address to run the verification for.' - type: string + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbeddedWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + 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/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponse' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh + x-meta: + seo: + title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' + '/unclaimed_draft/edit_and_resend/{signature_request_id}': + post: + tags: + - 'Unclaimed Draft' + summary: 'Edit and Resend Unclaimed Draft' + description: |- + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + + **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftEditAndResend + parameters: + - + name: signature_request_id + in: path + description: 'The ID of the signature request to edit and resend.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequest' + 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/UnclaimedDraftCreateResponse' + examples: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResend' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' + 410_example: + $ref: '#/components/examples/Error410Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftEditAndResendExample.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftEditAndResendExample.cs + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftEditAndResendExample.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftEditAndResendExample.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftEditAndResendExample.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftEditAndResendExample.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftEditAndResendExample.sh + x-meta: + seo: + title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' +components: + schemas: + AccountCreateRequest: + required: + - email_address + properties: + client_id: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + client_secret: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + email_address: + description: 'The email address which will be associated with the new Account.' + type: string + format: email + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountUpdateRequest: + properties: + account_id: + description: 'The ID of the Account' + type: string + nullable: true + callback_url: + description: 'The URL that Dropbox Sign should POST events to.' + type: string + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountVerifyRequest: + required: + - email_address + properties: + email_address: + description: 'Email address to run the verification for.' + type: string format: email type: object ApiAppCreateRequest: @@ -7757,7 +7890,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: description: 'Account ID' @@ -7850,20 +7983,20 @@ components: - country properties: area_code: - description: 'Area code' + description: 'Area code of the new Fax Line' type: integer country: - description: Country + description: 'Country of the area code' type: string enum: - CA - US - UK city: - description: City + description: 'City of the area code' type: string account_id: - description: 'Account ID' + description: 'Account ID of the account that will be assigned this new Fax Line' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 type: object @@ -7872,7 +8005,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string type: object FaxLineRemoveUserRequest: @@ -7880,14 +8013,14 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: - description: 'Account ID' + description: 'Account ID of the user to remove access' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 email_address: - description: 'Email address' + description: 'Email address of the user to remove access' type: string format: email type: object @@ -7896,7 +8029,9 @@ components: - recipient properties: recipient: - description: 'Fax Send To Recipient' + description: |- + Recipient of the fax + Can be a phone number in E.164 format or email address type: string example: recipient@example.com sender: @@ -7904,13 +8039,19 @@ components: type: string example: sender@example.com files: - description: 'Fax File to Send' + description: |- + Use `files[]` to indicate the uploaded file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string format: binary file_urls: - description: 'Fax File URL to Send' + description: |- + Use `file_urls[]` to have Dropbox Fax download the file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string @@ -7919,11 +8060,11 @@ components: type: boolean default: false cover_page_to: - description: 'Fax Cover Page for Recipient' + description: 'Fax cover page recipient information' type: string example: 'Recipient Name' cover_page_from: - description: 'Fax Cover Page for Sender' + description: 'Fax cover page sender information' type: string example: 'Sender Name' cover_page_message: @@ -8119,27 +8260,361 @@ components: Example CSV: - ``` - name, email_address, pin, company_field - George, george@example.com, d79a3td, ABC Corp - Mary, mary@example.com, gd9as5b, 123 LLC - ``` - type: string - format: binary - signer_list: - description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + ``` + name, email_address, pin, company_field + George, george@example.com, d79a3td, ABC Corp + Mary, mary@example.com, gd9as5b, 123 LLC + ``` + type: string + format: binary + signer_list: + description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + - signers + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + type: object + SignatureRequestEditRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' type: boolean default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan and higher. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email client_id: description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string @@ -8153,6 +8628,52 @@ components: type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false message: description: 'The custom message in the email that will be sent to the signers.' type: string @@ -8165,6 +8686,8 @@ components: type: object maxItems: 10 additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' type: string @@ -8180,8 +8703,16 @@ components: description: 'The title you want to assign to the SignatureRequest.' type: string maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -8333,7 +8864,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -8417,6 +8948,94 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -13085,498 +13704,522 @@ components: type: string default: 'Hello API Event Received' examples: - AccountCreateRequestDefaultExample: + AccountCreateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountCreateRequestDefaultExample.json - AccountCreateRequestOAuthExample: + $ref: examples/json/AccountCreateRequest.json + AccountCreateRequestOAuth: summary: 'OAuth Example' value: - $ref: examples/json/AccountCreateRequestOAuthExample.json - AccountUpdateRequestDefaultExample: + $ref: examples/json/AccountCreateRequestOAuth.json + AccountUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountUpdateRequestDefaultExample.json - AccountVerifyRequestDefaultExample: + $ref: examples/json/AccountUpdateRequest.json + AccountVerifyRequest: summary: 'Default Example' value: - $ref: examples/json/AccountVerifyRequestDefaultExample.json - ApiAppCreateRequestDefaultExample: + $ref: examples/json/AccountVerifyRequest.json + ApiAppCreateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppCreateRequestDefaultExample.json - ApiAppUpdateRequestDefaultExample: + $ref: examples/json/ApiAppCreateRequest.json + ApiAppUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppUpdateRequestDefaultExample.json - EmbeddedEditUrlRequestDefaultExample: + $ref: examples/json/ApiAppUpdateRequest.json + EmbeddedEditUrlRequest: summary: 'Default Example' value: - $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json - FaxLineAddUserRequestExample: + $ref: examples/json/EmbeddedEditUrlRequest.json + FaxLineAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineAddUserRequestExample.json - FaxLineCreateRequestExample: + $ref: examples/json/FaxLineAddUserRequest.json + FaxLineCreateRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineCreateRequestExample.json - FaxLineDeleteRequestExample: + $ref: examples/json/FaxLineCreateRequest.json + FaxLineDeleteRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineDeleteRequestExample.json - FaxLineRemoveUserRequestExample: + $ref: examples/json/FaxLineDeleteRequest.json + FaxLineRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineRemoveUserRequestExample.json - FaxSendRequestExample: + $ref: examples/json/FaxLineRemoveUserRequest.json + FaxSendRequest: summary: 'Default Example' value: - $ref: examples/json/FaxSendRequestExample.json - OAuthTokenGenerateRequestExample: + $ref: examples/json/FaxSendRequest.json + OAuthTokenGenerateRequest: summary: 'OAuth Token Generate Example' value: - $ref: examples/json/OAuthTokenGenerateRequestExample.json - OAuthTokenRefreshRequestExample: + $ref: examples/json/OAuthTokenGenerateRequest.json + OAuthTokenRefreshRequest: summary: 'OAuth Token Refresh Example' value: - $ref: examples/json/OAuthTokenRefreshRequestExample.json - ReportCreateRequestDefaultExample: + $ref: examples/json/OAuthTokenRefreshRequest.json + ReportCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/ReportCreateRequest.json + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json + SignatureRequestBulkSendWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkSendWithTemplateRequest.json + SignatureRequestCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/ReportCreateRequestDefaultExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedRequest.json + SignatureRequestCreateEmbeddedRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json + SignatureRequestCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestBulkSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json + SignatureRequestEditRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestDefaultExample: + $ref: examples/json/SignatureRequestEditRequest.json + SignatureRequestEditRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSigners.json + SignatureRequestEditEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequest.json + SignatureRequestEditEmbeddedRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json - SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json + SignatureRequestEditEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json + SignatureRequestEditWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestRemindRequestDefaultExample: + $ref: examples/json/SignatureRequestEditWithTemplateRequest.json + SignatureRequestRemindRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestRemindRequestDefaultExample.json - SignatureRequestSendRequestDefaultExample: + $ref: examples/json/SignatureRequestRemindRequest.json + SignatureRequestSendRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendRequestDefaultExample.json - SignatureRequestSendRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestSendRequest.json + SignatureRequestSendRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestSendRequestGroupedSignersExample.json - SignatureRequestSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendRequestGroupedSigners.json + SignatureRequestSendWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json - SignatureRequestUpdateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendWithTemplateRequest.json + SignatureRequestUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestUpdateRequestDefaultExample.json - TeamAddMemberRequestEmailAddressExample: + $ref: examples/json/SignatureRequestUpdateRequest.json + TeamAddMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamAddMemberRequestEmailAddressExample.json - TeamAddMemberRequestAccountIdExample: + $ref: examples/json/TeamAddMemberRequest.json + TeamAddMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamAddMemberRequestAccountIdExample.json - TeamCreateRequestDefaultExample: + $ref: examples/json/TeamAddMemberRequestAccountId.json + TeamCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamCreateRequestDefaultExample.json - TeamRemoveMemberRequestEmailAddressExample: + $ref: examples/json/TeamCreateRequest.json + TeamRemoveMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamRemoveMemberRequestEmailAddressExample.json - TeamRemoveMemberRequestAccountIdExample: + $ref: examples/json/TeamRemoveMemberRequest.json + TeamRemoveMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamRemoveMemberRequestAccountIdExample.json - TeamUpdateRequestDefaultExample: + $ref: examples/json/TeamRemoveMemberRequestAccountId.json + TeamUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamUpdateRequestDefaultExample.json - TemplateAddUserRequestDefaultExample: + $ref: examples/json/TeamUpdateRequest.json + TemplateAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateAddUserRequestDefaultExample.json - TemplateCreateRequestDefaultExample: + $ref: examples/json/TemplateAddUserRequest.json + TemplateCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateRequestDefaultExample.json - TemplateCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateRequest.json + TemplateCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json - TemplateCreateRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateRequestFormFieldsPerDocument.json + TemplateCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldGroupsExample.json - TemplateCreateRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateRequestFormFieldGroups.json + TemplateCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldRulesExample.json - TemplateCreateEmbeddedDraftRequestDefaultExample: + $ref: examples/json/TemplateCreateRequestFormFieldRules.json + TemplateCreateEmbeddedDraftRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json - TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequest.json + TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json - TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json + TemplateCreateEmbeddedDraftRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json - TemplateCreateEmbeddedDraftRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json + TemplateCreateEmbeddedDraftRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json - TemplateRemoveUserRequestDefaultExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json + TemplateRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateRemoveUserRequestDefaultExample.json - TemplateUpdateFilesRequestDefaultExample: + $ref: examples/json/TemplateRemoveUserRequest.json + TemplateUpdateFilesRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateUpdateFilesRequestDefaultExample.json - UnclaimedDraftCreateRequestDefaultExample: + $ref: examples/json/TemplateUpdateFilesRequest.json + UnclaimedDraftCreateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestDefaultExample.json - UnclaimedDraftCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateRequest.json + UnclaimedDraftCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json + UnclaimedDraftCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json - UnclaimedDraftCreateRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json + UnclaimedDraftCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequest.json + UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json + UnclaimedDraftCreateEmbeddedRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json + UnclaimedDraftCreateEmbeddedRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json - UnclaimedDraftEditAndResendRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json + UnclaimedDraftEditAndResendRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json - AccountCreateResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountCreateResponse: summary: 'Account Create' value: - $ref: examples/json/AccountCreateResponseExample.json - AccountCreateOAuthResponseExample: + $ref: examples/json/AccountCreateResponse.json + AccountCreateOAuthResponse: summary: 'Account Create with OAuth Authorization' value: - $ref: examples/json/AccountCreateOAuthResponseExample.json - AccountGetResponseExample: + $ref: examples/json/AccountCreateOAuthResponse.json + AccountGetResponse: summary: 'Account Get' value: - $ref: examples/json/AccountGetResponseExample.json - AccountVerifyFoundResponseExample: + $ref: examples/json/AccountGetResponse.json + AccountVerifyFoundResponse: summary: 'Account Found' value: - $ref: examples/json/AccountVerifyFoundResponseExample.json - AccountVerifyNotFoundResponseExample: + $ref: examples/json/AccountVerifyFoundResponse.json + AccountVerifyNotFoundResponse: summary: 'Account Not Found' value: - $ref: examples/json/AccountVerifyNotFoundResponseExample.json - ApiAppGetResponseExample: + $ref: examples/json/AccountVerifyNotFoundResponse.json + ApiAppGetResponse: summary: 'API App' value: - $ref: examples/json/ApiAppGetResponseExample.json - ApiAppListResponseExample: + $ref: examples/json/ApiAppGetResponse.json + ApiAppListResponse: summary: 'API App List' value: - $ref: examples/json/ApiAppListResponseExample.json - BulkSendJobGetResponseExample: + $ref: examples/json/ApiAppListResponse.json + BulkSendJobGetResponse: summary: 'Bulk Send Job' value: - $ref: examples/json/BulkSendJobGetResponseExample.json - BulkSendJobListResponseExample: + $ref: examples/json/BulkSendJobGetResponse.json + BulkSendJobListResponse: summary: 'Bulk Send Job List' value: - $ref: examples/json/BulkSendJobListResponseExample.json - EmbeddedEditUrlResponseExample: + $ref: examples/json/BulkSendJobListResponse.json + EmbeddedEditUrlResponse: summary: 'Embedded Edit URL' value: - $ref: examples/json/EmbeddedEditUrlResponseExample.json - EmbeddedSignUrlResponseExample: + $ref: examples/json/EmbeddedEditUrlResponse.json + EmbeddedSignUrlResponse: summary: 'Embedded Sign URL' value: - $ref: examples/json/EmbeddedSignUrlResponseExample.json - Error400ResponseExample: + $ref: examples/json/EmbeddedSignUrlResponse.json + Error400Response: summary: 'Error 400 bad_request' value: - $ref: examples/json/Error400ResponseExample.json - Error401ResponseExample: + $ref: examples/json/Error400Response.json + Error401Response: summary: 'Error 401 unauthorized' value: - $ref: examples/json/Error401ResponseExample.json - Error402ResponseExample: + $ref: examples/json/Error401Response.json + Error402Response: summary: 'Error 402 payment_required' value: - $ref: examples/json/Error402ResponseExample.json - Error403ResponseExample: + $ref: examples/json/Error402Response.json + Error403Response: summary: 'Error 403 forbidden' value: - $ref: examples/json/Error403ResponseExample.json - Error404ResponseExample: + $ref: examples/json/Error403Response.json + Error404Response: summary: 'Error 404 not_found' value: - $ref: examples/json/Error404ResponseExample.json - Error409ResponseExample: + $ref: examples/json/Error404Response.json + Error409Response: summary: 'Error 409 conflict' value: - $ref: examples/json/Error409ResponseExample.json - Error410ResponseExample: + $ref: examples/json/Error409Response.json + Error410Response: summary: 'Error 410 deleted' value: - $ref: examples/json/Error410ResponseExample.json - Error422ResponseExample: + $ref: examples/json/Error410Response.json + Error422Response: summary: 'Error 422 unprocessable_entity' value: - $ref: examples/json/Error422ResponseExample.json - Error429ResponseExample: + $ref: examples/json/Error422Response.json + Error429Response: summary: 'Error 429 exceeded_rate' value: - $ref: examples/json/Error429ResponseExample.json - Error4XXResponseExample: + $ref: examples/json/Error429Response.json + Error4XXResponse: summary: 'Error 4XX failed_operation' value: - $ref: examples/json/Error4XXResponseExample.json - FaxGetResponseExample: + $ref: examples/json/Error4XXResponse.json + FaxGetResponse: summary: 'Fax Response' value: - $ref: examples/json/FaxGetResponseExample.json - FaxLineResponseExample: + $ref: examples/json/FaxGetResponse.json + FaxLineResponse: summary: 'Sample Fax Line Response' value: - $ref: examples/json/FaxLineResponseExample.json - FaxLineAreaCodeGetResponseExample: + $ref: examples/json/FaxLineResponse.json + FaxLineAreaCodeGetResponse: summary: 'Sample Area Code Response' value: - $ref: examples/json/FaxLineAreaCodeGetResponseExample.json - FaxLineListResponseExample: + $ref: examples/json/FaxLineAreaCodeGetResponse.json + FaxLineListResponse: summary: 'Sample Fax Line List Response' value: - $ref: examples/json/FaxLineListResponseExample.json - FaxListResponseExample: - summary: 'Returns the properties and settings of multiple Faxes.' + $ref: examples/json/FaxLineListResponse.json + FaxListResponse: + summary: 'Returns the properties and settings of multiple Faxes' value: - $ref: examples/json/FaxListResponseExample.json - ReportCreateResponseExample: + $ref: examples/json/FaxListResponse.json + ReportCreateResponse: summary: Report value: - $ref: examples/json/ReportCreateResponseExample.json - SignatureRequestGetResponseExample: + $ref: examples/json/ReportCreateResponse.json + SignatureRequestGetResponse: summary: 'Get Signature Request' value: - $ref: examples/json/SignatureRequestGetResponseExample.json - SignatureRequestListResponseExample: + $ref: examples/json/SignatureRequestGetResponse.json + SignatureRequestListResponse: summary: 'List Signature Requests' value: - $ref: examples/json/SignatureRequestListResponseExample.json - AccountUpdateResponseExample: + $ref: examples/json/SignatureRequestListResponse.json + AccountUpdateResponse: summary: 'Account Update' value: - $ref: examples/json/AccountUpdateResponseExample.json - OAuthTokenGenerateResponseExample: + $ref: examples/json/AccountUpdateResponse.json + OAuthTokenGenerateResponse: summary: 'Retrieving the OAuth token' value: - $ref: examples/json/OAuthTokenGenerateResponseExample.json - OAuthTokenRefreshResponseExample: + $ref: examples/json/OAuthTokenGenerateResponse.json + OAuthTokenRefreshResponse: summary: 'Refresh an existing OAuth token' value: - $ref: examples/json/OAuthTokenRefreshResponseExample.json - ApiAppCreateResponseExample: + $ref: examples/json/OAuthTokenRefreshResponse.json + ApiAppCreateResponse: summary: 'API App' value: - $ref: examples/json/ApiAppCreateResponseExample.json - ApiAppUpdateResponseExample: + $ref: examples/json/ApiAppCreateResponse.json + ApiAppUpdateResponse: summary: 'API App Update' value: - $ref: examples/json/ApiAppUpdateResponseExample.json - SignatureRequestCreateEmbeddedResponseExample: + $ref: examples/json/ApiAppUpdateResponse.json + SignatureRequestCreateEmbeddedResponse: summary: 'Create Embedded Signature Request' value: - $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json - SignatureRequestCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedResponse.json + SignatureRequestCreateEmbeddedWithTemplateResponse: summary: 'Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json - SignatureRequestFilesResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json + SignatureRequestFilesResponse: summary: 'Signature Requests Files' value: - $ref: examples/json/SignatureRequestFilesResponseExample.json - SignatureRequestReleaseHoldResponseExample: + $ref: examples/json/SignatureRequestFilesResponse.json + SignatureRequestReleaseHoldResponse: summary: 'Send Signature Release Hold' value: - $ref: examples/json/SignatureRequestReleaseHoldResponseExample.json - SignatureRequestRemindResponseExample: + $ref: examples/json/SignatureRequestReleaseHoldResponse.json + SignatureRequestRemindResponse: summary: 'Send Signature Request Reminder' value: - $ref: examples/json/SignatureRequestRemindResponseExample.json - SignatureRequestSendResponseExample: + $ref: examples/json/SignatureRequestRemindResponse.json + SignatureRequestSendResponse: summary: 'Send Signature Request' value: - $ref: examples/json/SignatureRequestSendResponseExample.json - SignatureRequestSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestSendResponse.json + SignatureRequestSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json - SignatureRequestUpdateResponseExample: + $ref: examples/json/SignatureRequestSendWithTemplateResponse.json + SignatureRequestUpdateResponse: summary: 'Signature Request Update' value: - $ref: examples/json/SignatureRequestUpdateResponseExample.json - SignatureRequestBulkSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestUpdateResponse.json + SignatureRequestBulkSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestBulkSendWithTemplateResponse.json + SignatureRequestBulkCreateEmbeddedWithTemplateResponse: summary: 'Bulk Send Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json - TeamCreateResponseExample: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json + TeamCreateResponse: summary: 'Team Create' value: - $ref: examples/json/TeamCreateResponseExample.json - TeamMembersResponseExample: + $ref: examples/json/TeamCreateResponse.json + TeamMembersResponse: summary: 'Team Members List' value: - $ref: examples/json/TeamMembersResponseExample.json - TeamRemoveMemberResponseExample: + $ref: examples/json/TeamMembersResponse.json + TeamRemoveMemberResponse: summary: 'Team Remove Member' value: - $ref: examples/json/TeamRemoveMemberResponseExample.json - TeamUpdateResponseExample: + $ref: examples/json/TeamRemoveMemberResponse.json + TeamUpdateResponse: summary: 'Team Update' value: - $ref: examples/json/TeamUpdateResponseExample.json - TeamDoesNotExistResponseExample: + $ref: examples/json/TeamUpdateResponse.json + TeamDoesNotExistResponse: summary: 'Team Does Not Exist' value: - $ref: examples/json/TeamDoesNotExistResponseExample.json - TemplateAddUserResponseExample: + $ref: examples/json/TeamDoesNotExistResponse.json + TemplateAddUserResponse: summary: 'Add User to Template' value: - $ref: examples/json/TemplateAddUserResponseExample.json - TemplateFilesResponseExample: + $ref: examples/json/TemplateAddUserResponse.json + TemplateFilesResponse: summary: 'Template Files' value: - $ref: examples/json/TemplateFilesResponseExample.json - TemplateRemoveUserResponseExample: + $ref: examples/json/TemplateFilesResponse.json + TemplateRemoveUserResponse: summary: 'Remove User from Template' value: - $ref: examples/json/TemplateRemoveUserResponseExample.json - UnclaimedDraftCreateEmbeddedResponseExample: + $ref: examples/json/TemplateRemoveUserResponse.json + UnclaimedDraftCreateEmbeddedResponse: summary: 'Unclaimed Draft Create Embedded' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json - UnclaimedDraftCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedResponse.json + UnclaimedDraftCreateEmbeddedWithTemplateResponse: summary: 'Unclaimed Draft Create Embedded With Template' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json - UnclaimedDraftEditAndResendExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json + UnclaimedDraftEditAndResend: summary: 'Unclaimed Draft Edit and Resend' value: - $ref: examples/json/UnclaimedDraftEditAndResendExample.json - TeamGetResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResend.json + TeamGetResponse: summary: 'Team Get' value: - $ref: examples/json/TeamGetResponseExample.json - TeamGetInfoResponseExample: + $ref: examples/json/TeamGetResponse.json + TeamGetInfoResponse: summary: 'Team Get Info' value: - $ref: examples/json/TeamGetInfoResponseExample.json - TeamInvitesResponseExample: + $ref: examples/json/TeamGetInfoResponse.json + TeamInvitesResponse: summary: 'Team Invites' value: - $ref: examples/json/TeamInvitesResponseExample.json - TeamAddMemberResponseExample: + $ref: examples/json/TeamInvitesResponse.json + TeamAddMemberResponse: summary: 'Team Add Member' value: - $ref: examples/json/TeamAddMemberResponseExample.json - TeamSubTeamsResponseExample: + $ref: examples/json/TeamAddMemberResponse.json + TeamSubTeamsResponse: summary: 'Team Sub Teams List' value: - $ref: examples/json/TeamSubTeamsResponseExample.json - TemplateCreateResponseExample: + $ref: examples/json/TeamSubTeamsResponse.json + TemplateCreateResponse: summary: 'Create Template' value: - $ref: examples/json/TemplateCreateResponseExample.json - TemplateCreateEmbeddedDraftResponseExample: + $ref: examples/json/TemplateCreateResponse.json + TemplateCreateEmbeddedDraftResponse: summary: 'Create Embedded Draft Template' value: - $ref: examples/json/TemplateCreateEmbeddedDraftResponseExample.json - TemplateGetResponseExample: + $ref: examples/json/TemplateCreateEmbeddedDraftResponse.json + TemplateGetResponse: summary: 'Get Template' value: - $ref: examples/json/TemplateGetResponseExample.json - TemplateListResponseExample: + $ref: examples/json/TemplateGetResponse.json + TemplateListResponse: summary: 'List Templates' value: - $ref: examples/json/TemplateListResponseExample.json - TemplateUpdateFilesResponseExample: + $ref: examples/json/TemplateListResponse.json + TemplateUpdateFilesResponse: summary: 'Update Template Files' value: - $ref: examples/json/TemplateUpdateFilesResponseExample.json - UnclaimedDraftCreateResponseExample: + $ref: examples/json/TemplateUpdateFilesResponse.json + UnclaimedDraftCreateResponse: summary: 'Unclaimed Draft Create' value: - $ref: examples/json/UnclaimedDraftCreateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: + $ref: examples/json/UnclaimedDraftCreateResponse.json + EventCallbackAccountSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: + $ref: examples/json/EventCallbackAccountSignatureRequestSent.json + EventCallbackAccountTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: + $ref: examples/json/EventCallbackAccountTemplateCreated.json + EventCallbackAppAccountConfirmed: summary: 'Example: account_confirmed' value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: + $ref: examples/json/EventCallbackAppAccountConfirmed.json + EventCallbackAppSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: + $ref: examples/json/EventCallbackAppSignatureRequestSent.json + EventCallbackAppTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json + $ref: examples/json/EventCallbackAppTemplateCreated.json requestBodies: EventCallbackAccountRequest: description: |- @@ -13588,9 +14231,9 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAccountSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAccountSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAccountTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAccountTemplateCreated' EventCallbackAppRequest: description: |- **API App Callback Payloads --** @@ -13601,11 +14244,11 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: account_confirmed_example: - $ref: '#/components/examples/EventCallbackAppAccountConfirmedExample' + $ref: '#/components/examples/EventCallbackAppAccountConfirmed' signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAppSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAppSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAppTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAppTemplateCreated' headers: X-RateLimit-Limit: description: 'The maximum number of requests per hour that you can make.' @@ -13642,6 +14285,7 @@ components: security: - api_key: [] + - oauth2: - account_access - signature_request_access @@ -13669,37 +14313,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: @@ -13722,37 +14361,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: diff --git a/openapi.yaml b/openapi.yaml index faa843be3..f90363d47 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -27,12 +27,12 @@ paths: schema: $ref: '#/components/schemas/AccountCreateRequest' examples: - default_example: - $ref: '#/components/examples/AccountCreateRequestDefaultExample' - oauth: - $ref: '#/components/examples/AccountCreateRequestOAuthExample' + example: + $ref: '#/components/examples/AccountCreateRequest' + oauth_example: + $ref: '#/components/examples/AccountCreateRequestOAuth' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -46,11 +46,11 @@ paths: schema: $ref: '#/components/schemas/AccountCreateResponse' examples: - default_example: - $ref: '#/components/examples/AccountCreateResponseExample' - oauth: - $ref: '#/components/examples/AccountCreateOAuthResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountCreateResponse' + oauth_example: + $ref: '#/components/examples/AccountCreateOAuthResponse' + '4XX': description: failed_operation content: application/json: @@ -58,15 +58,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -78,42 +78,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountCreate.php + $ref: examples/AccountCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountCreate.js + $ref: examples/AccountCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountCreate.ts + $ref: examples/AccountCreateExample.ts - lang: Java label: Java source: - $ref: examples/AccountCreate.java + $ref: examples/AccountCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountCreate.rb + $ref: examples/AccountCreateExample.rb - lang: Python label: Python source: - $ref: examples/AccountCreate.py + $ref: examples/AccountCreateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountCreate.sh + $ref: examples/AccountCreateExample.sh x-meta: seo: title: 'Create Account | API Documentation | Dropbox Sign for Developers' @@ -147,7 +142,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -161,9 +156,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountGetResponse' + '4XX': description: failed_operation content: application/json: @@ -171,15 +166,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -192,42 +187,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountGet.php + $ref: examples/AccountGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountGet.js + $ref: examples/AccountGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountGet.ts + $ref: examples/AccountGetExample.ts - lang: Java label: Java source: - $ref: examples/AccountGet.java + $ref: examples/AccountGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountGet.rb + $ref: examples/AccountGetExample.rb - lang: Python label: Python source: - $ref: examples/AccountGet.py + $ref: examples/AccountGetExample.py - lang: cURL label: cURL source: - $ref: examples/AccountGet.sh + $ref: examples/AccountGetExample.sh x-meta: seo: title: 'Get Account | API Documentation | Dropbox Sign for Developers' @@ -245,10 +235,10 @@ paths: schema: $ref: '#/components/schemas/AccountUpdateRequest' examples: - default_example: - $ref: '#/components/examples/AccountUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/AccountUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -262,9 +252,9 @@ paths: schema: $ref: '#/components/schemas/AccountGetResponse' examples: - default_example: - $ref: '#/components/examples/AccountUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -272,17 +262,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -294,42 +284,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountUpdate.php + $ref: examples/AccountUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountUpdate.js + $ref: examples/AccountUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountUpdate.ts + $ref: examples/AccountUpdateExample.ts - lang: Java label: Java source: - $ref: examples/AccountUpdate.java + $ref: examples/AccountUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountUpdate.rb + $ref: examples/AccountUpdateExample.rb - lang: Python label: Python source: - $ref: examples/AccountUpdate.py + $ref: examples/AccountUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/AccountUpdate.sh + $ref: examples/AccountUpdateExample.sh x-meta: seo: title: 'Update Account | API Documentation | Dropbox Sign for Developers' @@ -348,10 +333,10 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyRequest' examples: - default_example: - $ref: '#/components/examples/AccountVerifyRequestDefaultExample' + example: + $ref: '#/components/examples/AccountVerifyRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -365,11 +350,11 @@ paths: schema: $ref: '#/components/schemas/AccountVerifyResponse' examples: - default_example: - $ref: '#/components/examples/AccountVerifyFoundResponseExample' - not_found: - $ref: '#/components/examples/AccountVerifyNotFoundResponseExample' - 4XX: + example: + $ref: '#/components/examples/AccountVerifyFoundResponse' + not_found_example: + $ref: '#/components/examples/AccountVerifyNotFoundResponse' + '4XX': description: failed_operation content: application/json: @@ -377,15 +362,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -397,42 +382,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/AccountVerify.php + $ref: examples/AccountVerifyExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/AccountVerify.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/AccountVerify.js + $ref: examples/AccountVerifyExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/AccountVerify.ts + $ref: examples/AccountVerifyExample.ts - lang: Java label: Java source: - $ref: examples/AccountVerify.java + $ref: examples/AccountVerifyExample.java - lang: Ruby label: Ruby source: - $ref: examples/AccountVerify.rb + $ref: examples/AccountVerifyExample.rb - lang: Python label: Python source: - $ref: examples/AccountVerify.py + $ref: examples/AccountVerifyExample.py - lang: cURL label: cURL source: - $ref: examples/AccountVerify.sh + $ref: examples/AccountVerifyExample.sh x-meta: seo: title: 'Verify Account | API Documentation | Dropbox Sign for Developers' @@ -451,13 +431,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 201: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -471,9 +451,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -481,17 +461,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -503,42 +483,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppCreate.php + $ref: examples/ApiAppCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppCreate.js + $ref: examples/ApiAppCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppCreate.ts + $ref: examples/ApiAppCreateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppCreate.java + $ref: examples/ApiAppCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppCreate.rb + $ref: examples/ApiAppCreateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppCreate.py + $ref: examples/ApiAppCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppCreate.sh + $ref: examples/ApiAppCreateExample.sh x-meta: seo: title: 'Create API App | API Documentation | Dropbox Sign for Developers' @@ -560,7 +535,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -574,9 +549,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppGetResponse' + '4XX': description: failed_operation content: application/json: @@ -584,19 +559,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -608,42 +583,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppGet.php + $ref: examples/ApiAppGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppGet.js + $ref: examples/ApiAppGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppGet.ts + $ref: examples/ApiAppGetExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppGet.java + $ref: examples/ApiAppGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppGet.rb + $ref: examples/ApiAppGetExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppGet.py + $ref: examples/ApiAppGetExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppGet.sh + $ref: examples/ApiAppGetExample.sh x-meta: seo: title: 'Get API App | API Documentation | Dropbox Sign for Developers' @@ -670,13 +640,13 @@ paths: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/ApiAppUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/ApiAppUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -690,9 +660,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppGetResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -700,19 +670,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -724,42 +694,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppUpdate.php + $ref: examples/ApiAppUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppUpdate.js + $ref: examples/ApiAppUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppUpdate.ts + $ref: examples/ApiAppUpdateExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppUpdate.java + $ref: examples/ApiAppUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppUpdate.rb + $ref: examples/ApiAppUpdateExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppUpdate.py + $ref: examples/ApiAppUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppUpdate.sh + $ref: examples/ApiAppUpdateExample.sh x-meta: seo: title: 'Update API App | API Documentation | Dropbox Sign for Developers' @@ -780,7 +745,7 @@ paths: type: string example: 0dd3b823a682527788c4e40cb7b6f7e9 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -789,7 +754,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -797,17 +762,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -819,42 +784,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppDelete.php + $ref: examples/ApiAppDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppDelete.js + $ref: examples/ApiAppDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppDelete.ts + $ref: examples/ApiAppDeleteExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppDelete.java + $ref: examples/ApiAppDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppDelete.rb + $ref: examples/ApiAppDeleteExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppDelete.py + $ref: examples/ApiAppDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppDelete.sh + $ref: examples/ApiAppDeleteExample.sh x-meta: seo: title: 'Delete API App | API Documentation | Dropbox Sign for Developers' @@ -882,7 +842,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -896,9 +856,9 @@ paths: schema: $ref: '#/components/schemas/ApiAppListResponse' examples: - default_example: - $ref: '#/components/examples/ApiAppListResponseExample' - 4XX: + example: + $ref: '#/components/examples/ApiAppListResponse' + '4XX': description: failed_operation content: application/json: @@ -906,15 +866,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -926,42 +886,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ApiAppList.php + $ref: examples/ApiAppListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ApiAppList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ApiAppList.js + $ref: examples/ApiAppListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ApiAppList.ts + $ref: examples/ApiAppListExample.ts - lang: Java label: Java source: - $ref: examples/ApiAppList.java + $ref: examples/ApiAppListExample.java - lang: Ruby label: Ruby source: - $ref: examples/ApiAppList.rb + $ref: examples/ApiAppListExample.rb - lang: Python label: Python source: - $ref: examples/ApiAppList.py + $ref: examples/ApiAppListExample.py - lang: cURL label: cURL source: - $ref: examples/ApiAppList.sh + $ref: examples/ApiAppListExample.sh x-meta: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' @@ -997,7 +952,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1011,9 +966,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobGetResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1021,15 +976,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1042,42 +997,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobGet.php + $ref: examples/BulkSendJobGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobGet.js + $ref: examples/BulkSendJobGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobGet.ts + $ref: examples/BulkSendJobGetExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobGet.java + $ref: examples/BulkSendJobGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobGet.rb + $ref: examples/BulkSendJobGetExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobGet.py + $ref: examples/BulkSendJobGetExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobGet.sh + $ref: examples/BulkSendJobGetExample.sh x-meta: seo: title: 'Get Bulk Send Job | API Documentation | Dropbox Sign for Developers' @@ -1105,7 +1055,7 @@ paths: type: integer default: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1119,9 +1069,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobListResponse' examples: - default_example: - $ref: '#/components/examples/BulkSendJobListResponseExample' - 4XX: + example: + $ref: '#/components/examples/BulkSendJobListResponse' + '4XX': description: failed_operation content: application/json: @@ -1129,15 +1079,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1150,42 +1100,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/BulkSendJobList.php + $ref: examples/BulkSendJobListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/BulkSendJobList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/BulkSendJobList.js + $ref: examples/BulkSendJobListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/BulkSendJobList.ts + $ref: examples/BulkSendJobListExample.ts - lang: Java label: Java source: - $ref: examples/BulkSendJobList.java + $ref: examples/BulkSendJobListExample.java - lang: Ruby label: Ruby source: - $ref: examples/BulkSendJobList.rb + $ref: examples/BulkSendJobListExample.rb - lang: Python label: Python source: - $ref: examples/BulkSendJobList.py + $ref: examples/BulkSendJobListExample.py - lang: cURL label: cURL source: - $ref: examples/BulkSendJobList.sh + $ref: examples/BulkSendJobListExample.sh x-meta: seo: title: 'List Bulk Send Jobs | Documentation | Dropbox Sign for Developers' @@ -1213,10 +1158,10 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlRequestDefaultExample' + example: + $ref: '#/components/examples/EmbeddedEditUrlRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1230,9 +1175,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedEditUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedEditUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedEditUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1240,17 +1185,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1262,42 +1207,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedEditUrl.php + $ref: examples/EmbeddedEditUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedEditUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedEditUrl.js + $ref: examples/EmbeddedEditUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedEditUrl.ts + $ref: examples/EmbeddedEditUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedEditUrl.java + $ref: examples/EmbeddedEditUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedEditUrl.rb + $ref: examples/EmbeddedEditUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedEditUrl.py + $ref: examples/EmbeddedEditUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedEditUrl.sh + $ref: examples/EmbeddedEditUrlExample.sh x-meta: seo: title: 'Get Embedded Template URL | iFrame | Dropbox Sign for Developers' @@ -1319,7 +1259,7 @@ paths: type: string example: 50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1333,9 +1273,9 @@ paths: schema: $ref: '#/components/schemas/EmbeddedSignUrlResponse' examples: - default_example: - $ref: '#/components/examples/EmbeddedSignUrlResponseExample' - 4XX: + example: + $ref: '#/components/examples/EmbeddedSignUrlResponse' + '4XX': description: failed_operation content: application/json: @@ -1343,21 +1283,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1369,42 +1309,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/EmbeddedSignUrl.php + $ref: examples/EmbeddedSignUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EmbeddedSignUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EmbeddedSignUrl.js + $ref: examples/EmbeddedSignUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EmbeddedSignUrl.ts + $ref: examples/EmbeddedSignUrlExample.ts - lang: Java label: Java source: - $ref: examples/EmbeddedSignUrl.java + $ref: examples/EmbeddedSignUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/EmbeddedSignUrl.rb + $ref: examples/EmbeddedSignUrlExample.rb - lang: Python label: Python source: - $ref: examples/EmbeddedSignUrl.py + $ref: examples/EmbeddedSignUrlExample.py - lang: cURL label: cURL source: - $ref: examples/EmbeddedSignUrl.sh + $ref: examples/EmbeddedSignUrlExample.sh x-meta: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' @@ -1414,7 +1349,7 @@ paths: tags: - Fax summary: 'Get Fax' - description: 'Returns information about fax' + description: 'Returns information about a Fax' operationId: faxGet parameters: - @@ -1426,7 +1361,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1440,9 +1375,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1450,19 +1385,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1471,51 +1406,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxGet.php + $ref: examples/FaxGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxGet.js + $ref: examples/FaxGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxGet.ts + $ref: examples/FaxGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxGet.java + $ref: examples/FaxGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxGet.rb + $ref: examples/FaxGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxGet.py + $ref: examples/FaxGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxGet.sh + $ref: examples/FaxGetExample.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.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve properties of a fax, click here.' delete: tags: - Fax summary: 'Delete Fax' - description: 'Deletes the specified Fax from the system.' + description: 'Deletes the specified Fax from the system' operationId: faxDelete parameters: - @@ -1527,7 +1457,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 204: + '204': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1536,7 +1466,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1544,19 +1474,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1565,42 +1495,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxDelete.php + $ref: examples/FaxDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxDelete.js + $ref: examples/FaxDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxDelete.ts + $ref: examples/FaxDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxDelete.java + $ref: examples/FaxDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxDelete.rb + $ref: examples/FaxDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxDelete.py + $ref: examples/FaxDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxDelete.sh + $ref: examples/FaxDeleteExample.sh x-meta: seo: title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' @@ -1609,8 +1534,8 @@ paths: get: tags: - Fax - summary: 'List Fax Files' - description: 'Returns list of fax files' + summary: 'Download Fax Files' + description: 'Downloads files associated with a Fax' operationId: faxFiles parameters: - @@ -1622,7 +1547,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1636,7 +1561,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -1644,21 +1569,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1667,46 +1592,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxFiles.php + $ref: examples/FaxFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxFiles.js + $ref: examples/FaxFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxFiles.ts + $ref: examples/FaxFilesExample.ts - lang: Java label: Java source: - $ref: examples/FaxFiles.java + $ref: examples/FaxFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxFiles.rb + $ref: examples/FaxFilesExample.rb - lang: Python label: Python source: - $ref: examples/FaxFiles.py + $ref: examples/FaxFilesExample.py - lang: cURL label: cURL source: - $ref: examples/FaxFiles.sh + $ref: examples/FaxFilesExample.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.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list the files of a fax, click here.' /fax_line/add_user: put: tags: @@ -1721,10 +1641,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineAddUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineAddUserRequestExample' + example: + $ref: '#/components/examples/FaxLineAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1738,9 +1658,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -1748,17 +1668,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1767,42 +1687,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAddUser.php + $ref: examples/FaxLineAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAddUser.js + $ref: examples/FaxLineAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAddUser.ts + $ref: examples/FaxLineAddUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAddUser.java + $ref: examples/FaxLineAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAddUser.rb + $ref: examples/FaxLineAddUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAddUser.py + $ref: examples/FaxLineAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAddUser.sh + $ref: examples/FaxLineAddUserExample.sh x-meta: seo: title: 'Fax Line Add User | API Documentation | Dropbox Fax for Developers' @@ -1812,13 +1727,13 @@ paths: tags: - 'Fax Line' summary: 'Get Available Fax Line Area Codes' - description: 'Returns a response with the area codes available for a given state/provice and city.' + description: 'Returns a list of available area codes for a given state/province and city' operationId: faxLineAreaCodeGet parameters: - name: country in: query - description: 'Filter area codes by country.' + description: 'Filter area codes by country' required: true schema: type: string @@ -1826,10 +1741,11 @@ paths: - CA - US - UK + example: US - name: state in: query - description: 'Filter area codes by state.' + description: 'Filter area codes by state' schema: type: string enum: @@ -1887,7 +1803,7 @@ paths: - name: province in: query - description: 'Filter area codes by province.' + description: 'Filter area codes by province' schema: type: string enum: @@ -1907,11 +1823,11 @@ paths: - name: city in: query - description: 'Filter area codes by city.' + description: 'Filter area codes by city' schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -1925,9 +1841,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineAreaCodeGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineAreaCodeGetResponse' + '4XX': description: failed_operation content: application/json: @@ -1935,15 +1851,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -1952,52 +1868,47 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineAreaCodeGet.php + $ref: examples/FaxLineAreaCodeGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineAreaCodeGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineAreaCodeGet.js + $ref: examples/FaxLineAreaCodeGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineAreaCodeGet.ts + $ref: examples/FaxLineAreaCodeGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineAreaCodeGet.java + $ref: examples/FaxLineAreaCodeGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineAreaCodeGet.rb + $ref: examples/FaxLineAreaCodeGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineAreaCodeGet.py + $ref: examples/FaxLineAreaCodeGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineAreaCodeGet.sh + $ref: examples/FaxLineAreaCodeGetExample.sh x-meta: seo: title: 'Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out what area codes are available, click here.' /fax_line/create: post: tags: - 'Fax Line' summary: 'Purchase Fax Line' - description: 'Purchases a new Fax Line.' + description: 'Purchases a new Fax Line' operationId: faxLineCreate requestBody: required: true @@ -2006,10 +1917,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineCreateRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineCreateRequestExample' + example: + $ref: '#/components/examples/FaxLineCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2023,9 +1934,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2033,17 +1944,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2052,42 +1963,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineCreate.php + $ref: examples/FaxLineCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineCreate.js + $ref: examples/FaxLineCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineCreate.ts + $ref: examples/FaxLineCreateExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineCreate.java + $ref: examples/FaxLineCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineCreate.rb + $ref: examples/FaxLineCreateExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineCreate.py + $ref: examples/FaxLineCreateExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineCreate.sh + $ref: examples/FaxLineCreateExample.sh x-meta: seo: title: 'Purchase Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2103,12 +2009,13 @@ paths: - name: number in: query - description: 'The Fax Line number.' + description: 'The Fax Line number' required: true schema: type: string + example: 123-123-1234 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2122,9 +2029,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2132,17 +2039,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2151,46 +2058,41 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineGet.php + $ref: examples/FaxLineGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineGet.js + $ref: examples/FaxLineGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineGet.ts + $ref: examples/FaxLineGetExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineGet.java + $ref: examples/FaxLineGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineGet.rb + $ref: examples/FaxLineGetExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineGet.py + $ref: examples/FaxLineGetExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineGet.sh + $ref: examples/FaxLineGetExample.sh x-meta: seo: title: 'Get Fax Line | 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 line, click here.' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve the properties of a fax line, click here.' delete: tags: - 'Fax Line' @@ -2204,10 +2106,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineDeleteRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineDeleteRequestExample' + example: + $ref: '#/components/examples/FaxLineDeleteRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2218,7 +2120,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -2226,17 +2128,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2245,42 +2147,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineDelete.php + $ref: examples/FaxLineDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineDelete.js + $ref: examples/FaxLineDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineDelete.ts + $ref: examples/FaxLineDeleteExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineDelete.java + $ref: examples/FaxLineDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineDelete.rb + $ref: examples/FaxLineDeleteExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineDeleteExample.sh x-meta: seo: title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' @@ -2299,31 +2196,31 @@ paths: description: 'Account ID' schema: type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query - description: Page + description: 'Which page number of the Fax Line List to return. Defaults to `1`.' schema: type: integer default: 1 - example: 1 + example: 1 - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 - example: 20 + example: 20 - name: show_team_lines in: query - description: 'Show team lines' + description: 'Include Fax Lines belonging to team members in the list' schema: type: boolean responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2337,9 +2234,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineListResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineListResponse' + '4XX': description: failed_operation content: application/json: @@ -2347,15 +2244,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2364,42 +2261,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxLineListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineList.js + $ref: examples/FaxLineListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxLineListExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxLineListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxLineListExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxLineListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxLineListExample.sh x-meta: seo: title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' @@ -2409,7 +2301,7 @@ paths: tags: - 'Fax Line' summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' + description: 'Removes a user''s access to the specified Fax Line' operationId: faxLineRemoveUser requestBody: required: true @@ -2418,10 +2310,10 @@ paths: schema: $ref: '#/components/schemas/FaxLineRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + example: + $ref: '#/components/examples/FaxLineRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2435,9 +2327,9 @@ paths: schema: $ref: '#/components/schemas/FaxLineResponse' examples: - default_example: - $ref: '#/components/examples/FaxLineResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxLineResponse' + '4XX': description: failed_operation content: application/json: @@ -2445,17 +2337,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2464,42 +2356,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxLineRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxLineRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxLineRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxLineRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxLineRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxLineRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxLineRemoveUserExample.sh x-meta: seo: title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' @@ -2509,13 +2396,13 @@ paths: tags: - Fax summary: 'Lists Faxes' - description: 'Returns properties of multiple faxes' + description: 'Returns properties of multiple Faxes' operationId: faxList parameters: - name: page in: query - description: Page + description: 'Which page number of the Fax List to return. Defaults to `1`.' schema: type: integer default: 1 @@ -2524,7 +2411,7 @@ paths: - name: page_size in: query - description: 'Page size' + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' schema: type: integer default: 20 @@ -2532,7 +2419,7 @@ paths: minimum: 1 example: 20 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2546,9 +2433,9 @@ paths: schema: $ref: '#/components/schemas/FaxListResponse' examples: - default_example: - $ref: '#/components/examples/FaxListResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxListResponse' + '4XX': description: failed_operation content: application/json: @@ -2556,15 +2443,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2573,42 +2460,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxList.php + $ref: examples/FaxListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxList.js + $ref: examples/FaxListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxList.ts + $ref: examples/FaxListExample.ts - lang: Java label: Java source: - $ref: examples/FaxList.java + $ref: examples/FaxListExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxList.rb + $ref: examples/FaxListExample.rb - lang: Python label: Python source: - $ref: examples/FaxList.py + $ref: examples/FaxListExample.py - lang: cURL label: cURL source: - $ref: examples/FaxList.sh + $ref: examples/FaxListExample.sh x-meta: seo: title: 'List Faxes | API Documentation | Dropbox Fax for Developers' @@ -2618,7 +2500,7 @@ paths: tags: - Fax summary: 'Send Fax' - description: 'Action to prepare and send a fax' + description: 'Creates and sends a new Fax with the submitted file(s)' operationId: faxSend requestBody: required: true @@ -2627,13 +2509,13 @@ paths: schema: $ref: '#/components/schemas/FaxSendRequest' examples: - default_example: - $ref: '#/components/examples/FaxSendRequestExample' + example: + $ref: '#/components/examples/FaxSendRequest' multipart/form-data: schema: $ref: '#/components/schemas/FaxSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2647,9 +2529,9 @@ paths: schema: $ref: '#/components/schemas/FaxGetResponse' examples: - default_example: - $ref: '#/components/examples/FaxGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/FaxGetResponse' + '4XX': description: failed_operation content: application/json: @@ -2657,19 +2539,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2678,45 +2560,40 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxSend.php + $ref: examples/FaxSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/FaxSend.js + $ref: examples/FaxSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/FaxSend.ts + $ref: examples/FaxSendExample.ts - lang: Java label: Java source: - $ref: examples/FaxSend.java + $ref: examples/FaxSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/FaxSend.rb + $ref: examples/FaxSendExample.rb - lang: Python label: Python source: - $ref: examples/FaxSend.py + $ref: examples/FaxSendExample.py - lang: cURL label: cURL source: - $ref: examples/FaxSend.sh + $ref: examples/FaxSendExample.sh x-meta: seo: - title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + 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: @@ -2732,10 +2609,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenGenerateRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateRequestExample' + example: + $ref: '#/components/examples/OAuthTokenGenerateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2749,9 +2626,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenGenerateResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenGenerateResponse' + '4XX': description: failed_operation content: application/json: @@ -2759,15 +2636,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2777,42 +2654,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenGenerate.php + $ref: examples/OauthTokenGenerateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenGenerate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenGenerate.js + $ref: examples/OauthTokenGenerateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenGenerate.ts + $ref: examples/OauthTokenGenerateExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenGenerate.java + $ref: examples/OauthTokenGenerateExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenGenerate.rb + $ref: examples/OauthTokenGenerateExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenGenerate.py + $ref: examples/OauthTokenGenerateExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenGenerate.sh + $ref: examples/OauthTokenGenerateExample.sh x-meta: seo: title: 'Generate OAuth Token | Documentation | Dropbox Sign for Developers' @@ -2832,10 +2704,10 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenRefreshRequest' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshRequestExample' + example: + $ref: '#/components/examples/OAuthTokenRefreshRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2849,9 +2721,9 @@ paths: schema: $ref: '#/components/schemas/OAuthTokenResponse' examples: - default_example: - $ref: '#/components/examples/OAuthTokenRefreshResponseExample' - 4XX: + example: + $ref: '#/components/examples/OAuthTokenRefreshResponse' + '4XX': description: failed_operation content: application/json: @@ -2859,15 +2731,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2877,42 +2749,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/OauthTokenRefresh.php + $ref: examples/OauthTokenRefreshExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/OauthTokenRefresh.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/OauthTokenRefresh.js + $ref: examples/OauthTokenRefreshExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/OauthTokenRefresh.ts + $ref: examples/OauthTokenRefreshExample.ts - lang: Java label: Java source: - $ref: examples/OauthTokenRefresh.java + $ref: examples/OauthTokenRefreshExample.java - lang: Ruby label: Ruby source: - $ref: examples/OauthTokenRefresh.rb + $ref: examples/OauthTokenRefreshExample.rb - lang: Python label: Python source: - $ref: examples/OauthTokenRefresh.py + $ref: examples/OauthTokenRefreshExample.py - lang: cURL label: cURL source: - $ref: examples/OauthTokenRefresh.sh + $ref: examples/OauthTokenRefreshExample.sh x-meta: seo: title: 'OAuth Token Refresh | Documentation | Dropbox Sign for Developers' @@ -2935,10 +2802,10 @@ paths: schema: $ref: '#/components/schemas/ReportCreateRequest' examples: - default_example: - $ref: '#/components/examples/ReportCreateRequestDefaultExample' + example: + $ref: '#/components/examples/ReportCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -2952,9 +2819,9 @@ paths: schema: $ref: '#/components/schemas/ReportCreateResponse' examples: - default_example: - $ref: '#/components/examples/ReportCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/ReportCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -2962,15 +2829,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -2979,42 +2846,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/ReportCreate.php + $ref: examples/ReportCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/ReportCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/ReportCreate.js + $ref: examples/ReportCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/ReportCreate.ts + $ref: examples/ReportCreateExample.ts - lang: Java label: Java source: - $ref: examples/ReportCreate.java + $ref: examples/ReportCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/ReportCreate.rb + $ref: examples/ReportCreateExample.rb - lang: Python label: Python source: - $ref: examples/ReportCreate.py + $ref: examples/ReportCreateExample.py - lang: cURL label: cURL source: - $ref: examples/ReportCreate.sh + $ref: examples/ReportCreateExample.sh x-meta: seo: title: 'Create Report | API Documentation | Dropbox Sign for Developers' @@ -3036,13 +2898,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3056,9 +2918,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3066,21 +2928,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3089,42 +2951,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestBulkCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Embedded Bulk Send with Template | Dropbox Sign for Developers' @@ -3146,13 +3003,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestBulkSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3166,9 +3023,9 @@ paths: schema: $ref: '#/components/schemas/BulkSendJobSendResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestBulkSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3176,17 +3033,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3199,42 +3056,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestBulkSendWithTemplate.php + $ref: examples/SignatureRequestBulkSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestBulkSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestBulkSendWithTemplate.js + $ref: examples/SignatureRequestBulkSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestBulkSendWithTemplate.ts + $ref: examples/SignatureRequestBulkSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestBulkSendWithTemplate.java + $ref: examples/SignatureRequestBulkSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestBulkSendWithTemplate.rb + $ref: examples/SignatureRequestBulkSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestBulkSendWithTemplate.py + $ref: examples/SignatureRequestBulkSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestBulkSendWithTemplate.sh + $ref: examples/SignatureRequestBulkSendWithTemplateExample.sh x-meta: seo: title: 'Bulk Send with Template | REST API | Dropbox Sign for Developers' @@ -3265,7 +3117,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3276,7 +3128,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -3284,21 +3136,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3311,42 +3163,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCancel.php + $ref: examples/SignatureRequestCancelExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCancel.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCancel.js + $ref: examples/SignatureRequestCancelExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCancel.ts + $ref: examples/SignatureRequestCancelExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCancel.java + $ref: examples/SignatureRequestCancelExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCancel.rb + $ref: examples/SignatureRequestCancelExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCancel.py + $ref: examples/SignatureRequestCancelExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCancel.sh + $ref: examples/SignatureRequestCancelExample.sh x-meta: seo: title: 'Cancel Incomplete Signature Request | Dropbox Sign for Developers' @@ -3365,15 +3212,15 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestCreateEmbeddedRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3387,9 +3234,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -3397,19 +3244,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3421,42 +3268,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbedded.php + $ref: examples/SignatureRequestCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbedded.js + $ref: examples/SignatureRequestCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbedded.ts + $ref: examples/SignatureRequestCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbedded.java + $ref: examples/SignatureRequestCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbedded.rb + $ref: examples/SignatureRequestCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbedded.py + $ref: examples/SignatureRequestCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbedded.sh + $ref: examples/SignatureRequestCreateEmbeddedExample.sh x-meta: seo: title: 'Create Embedded Signature Request | Dropbox Sign for Developers' @@ -3475,13 +3317,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3495,9 +3337,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -3505,19 +3347,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3529,42 +3371,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.php + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.js + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.ts + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.java + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.rb + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.py + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestCreateEmbeddedWithTemplate.sh + $ref: examples/SignatureRequestCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' @@ -3599,7 +3436,7 @@ paths: - pdf - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3617,7 +3454,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -3625,23 +3462,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3654,42 +3491,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestFilesExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestFilesExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestFilesExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestFilesExample.sh x-meta: seo: title: 'Download Files | API Documentation | Dropbox Sign for Developers' @@ -3714,7 +3546,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3728,9 +3560,9 @@ paths: schema: $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -3738,23 +3570,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3767,42 +3599,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestFilesAsDataUriExample.sh x-meta: seo: title: 'Download Files | API Documentation | Dropbox Sign for Developers' @@ -3834,7 +3661,7 @@ paths: type: integer default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3848,9 +3675,9 @@ paths: schema: $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -3858,23 +3685,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3887,42 +3714,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestFilesAsFileUrlExample.sh x-meta: seo: title: 'Download Files | API Documentation | Dropbox Sign for Developers' @@ -3944,7 +3766,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -3958,9 +3780,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestGetResponse' + '4XX': description: failed_operation content: application/json: @@ -3968,19 +3790,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -3993,42 +3815,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestGetExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestGetExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestGetExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestGetExample.sh x-meta: seo: title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' @@ -4072,7 +3889,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4086,9 +3903,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestListResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestListResponse' + '4XX': description: failed_operation content: application/json: @@ -4096,17 +3913,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4119,42 +3936,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestListExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestListExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestListExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestListExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestListExample.sh x-meta: seo: title: 'List Signature Requests | REST API | Dropbox Sign for Developers' @@ -4176,7 +3988,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4190,9 +4002,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestReleaseHoldResponse' + '4XX': description: failed_operation content: application/json: @@ -4200,17 +4012,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4222,42 +4034,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestReleaseHoldExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestReleaseHoldExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestReleaseHoldExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestReleaseHoldExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestReleaseHoldExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestReleaseHoldExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestReleaseHoldExample.sh x-meta: seo: title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' @@ -4288,10 +4095,10 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestRemindRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4305,9 +4112,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestRemindResponse' + '4XX': description: failed_operation content: application/json: @@ -4315,23 +4122,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4344,42 +4151,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestRemindExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestRemindExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestRemindExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestRemindExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestRemindExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestRemindExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestRemindExample.sh x-meta: seo: title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' @@ -4406,7 +4208,7 @@ paths: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4417,7 +4219,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -4425,21 +4227,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4448,42 +4250,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestRemoveExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestRemoveExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestRemoveExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestRemoveExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestRemoveExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestRemoveExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestRemoveExample.sh x-meta: seo: title: 'Remove Signature Request Access | Dropbox Sign for Developers' @@ -4502,15 +4299,15 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestSendRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendRequest' grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSigners' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestSendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4524,9 +4321,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestSendResponse' + '4XX': description: failed_operation content: application/json: @@ -4534,19 +4331,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4559,42 +4356,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestSendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestSendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestSendExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestSendExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestSendExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestSendExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestSendExample.sh x-meta: seo: title: 'Send Signature Request | REST API | Dropbox Sign for Developers' @@ -4613,13 +4405,13 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4633,9 +4425,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -4643,17 +4435,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4666,42 +4458,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestSendWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestSendWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestSendWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestSendWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestSendWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestSendWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestSendWithTemplateExample.sh x-meta: seo: title: 'Send with Template | API Documentation | Dropbox Sign for Developers' @@ -4734,10 +4521,10 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestUpdateRequest' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/SignatureRequestUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4751,9 +4538,9 @@ paths: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: - default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/SignatureRequestUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -4761,17 +4548,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4783,42 +4570,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestUpdateExample.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestUpdateExample.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestUpdateExample.sh x-meta: seo: title: 'Update Signature Request | REST API | Dropbox Sign for Developers' @@ -4846,12 +4628,12 @@ paths: schema: $ref: '#/components/schemas/TeamAddMemberRequest' examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamAddMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamAddMemberRequestAccountId' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4865,9 +4647,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamAddMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -4875,17 +4657,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4897,42 +4679,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/TeamAddMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamAddMember.js + $ref: examples/TeamAddMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/TeamAddMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/TeamAddMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/TeamAddMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/TeamAddMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/TeamAddMemberExample.sh x-meta: seo: title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' @@ -4951,10 +4728,10 @@ paths: schema: $ref: '#/components/schemas/TeamCreateRequest' examples: - default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -4968,9 +4745,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -4978,15 +4755,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -4998,42 +4775,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/TeamCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamCreate.js + $ref: examples/TeamCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/TeamCreateExample.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/TeamCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/TeamCreateExample.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/TeamCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/TeamCreateExample.sh x-meta: seo: title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' @@ -5046,7 +4818,7 @@ paths: description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' operationId: teamDelete responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5055,7 +4827,7 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - 4XX: + '4XX': description: failed_operation content: application/json: @@ -5063,15 +4835,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5083,42 +4855,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/TeamDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamDelete.js + $ref: examples/TeamDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/TeamDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/TeamDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/TeamDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/TeamDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/TeamDeleteExample.sh x-meta: seo: title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' @@ -5131,7 +4898,7 @@ paths: description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' operationId: teamGet responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5145,9 +4912,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetResponse' + '4XX': description: failed_operation content: application/json: @@ -5155,17 +4922,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5177,42 +4944,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/TeamGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamGet.js + $ref: examples/TeamGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/TeamGetExample.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/TeamGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/TeamGetExample.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/TeamGetExample.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/TeamGetExample.sh x-meta: seo: title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' @@ -5230,10 +4992,10 @@ paths: schema: $ref: '#/components/schemas/TeamUpdateRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + example: + $ref: '#/components/examples/TeamUpdateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5247,9 +5009,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamUpdateResponse' + '4XX': description: failed_operation content: application/json: @@ -5257,15 +5019,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5277,42 +5039,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamUpdateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamUpdateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamUpdateExample.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamUpdateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamUpdateExample.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamUpdateExample.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamUpdateExample.sh x-meta: seo: title: 'Update Team | API Documentation | Dropbox Sign for Developers' @@ -5334,7 +5091,7 @@ paths: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5348,9 +5105,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetInfoResponse' examples: - default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamGetInfoResponse' + '4XX': description: failed_operation content: application/json: @@ -5358,19 +5115,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5382,42 +5139,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamInfoExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInfo.js + $ref: examples/TeamInfoExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamInfoExample.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamInfoExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamInfoExample.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamInfoExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamInfoExample.sh x-meta: seo: title: 'Get Team Info | Dropbox Sign for Developers' @@ -5438,7 +5190,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5452,9 +5204,9 @@ paths: schema: $ref: '#/components/schemas/TeamInvitesResponse' examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamInvitesResponse' + '4XX': description: failed_operation content: application/json: @@ -5462,15 +5214,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5483,42 +5235,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamInvitesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamInvites.js + $ref: examples/TeamInvitesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamInvitesExample.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamInvitesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamInvitesExample.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamInvitesExample.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamInvitesExample.sh x-meta: seo: title: 'List Team Invites | Dropbox Sign for Developers' @@ -5556,7 +5303,7 @@ paths: maximum: 100 minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5570,9 +5317,9 @@ paths: schema: $ref: '#/components/schemas/TeamMembersResponse' examples: - default_example: - $ref: '#/components/examples/TeamMembersResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamMembersResponse' + '4XX': description: failed_operation content: application/json: @@ -5580,19 +5327,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5604,42 +5351,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamMembersExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamMembers.js + $ref: examples/TeamMembersExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamMembersExample.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamMembersExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamMembersExample.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamMembersExample.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamMembersExample.sh x-meta: seo: title: 'List Team Members | Dropbox Sign for Developers' @@ -5658,12 +5400,12 @@ paths: schema: $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + example: + $ref: '#/components/examples/TeamRemoveMemberRequest' + account_id_example: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountId' responses: - 201: + '201': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5677,9 +5419,9 @@ paths: schema: $ref: '#/components/schemas/TeamGetResponse' examples: - default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamRemoveMemberResponse' + '4XX': description: failed_operation content: application/json: @@ -5687,17 +5429,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5709,42 +5451,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamRemoveMemberExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamRemoveMemberExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamRemoveMemberExample.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamRemoveMemberExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamRemoveMemberExample.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamRemoveMemberExample.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamRemoveMemberExample.sh x-meta: seo: title: 'Remove User from Team | REST API | Dropbox Sign for Developers' @@ -5782,7 +5519,7 @@ paths: maximum: 100 minimum: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5796,9 +5533,9 @@ paths: schema: $ref: '#/components/schemas/TeamSubTeamsResponse' examples: - default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' - 4XX: + example: + $ref: '#/components/examples/TeamSubTeamsResponse' + '4XX': description: failed_operation content: application/json: @@ -5806,19 +5543,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5830,42 +5567,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamSubTeamsExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamSubTeamsExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamSubTeamsExample.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamSubTeamsExample.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamSubTeamsExample.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamSubTeamsExample.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamSubTeamsExample.sh x-meta: seo: title: 'List Sub Teams | Dropbox Sign for Developers' @@ -5893,10 +5625,10 @@ paths: schema: $ref: '#/components/schemas/TemplateAddUserRequest' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateAddUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -5910,9 +5642,9 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateAddUserResponse' + '4XX': description: failed_operation content: application/json: @@ -5920,17 +5652,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -5942,42 +5674,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TemplateAddUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateAddUser.js + $ref: examples/TemplateAddUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TemplateAddUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TemplateAddUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TemplateAddUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TemplateAddUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TemplateAddUserExample.sh x-meta: seo: title: 'Add User to Template | REST API | Dropbox Sign for Developers' @@ -5996,19 +5723,19 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/TemplateCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/TemplateCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6022,9 +5749,9 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -6032,19 +5759,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6056,42 +5783,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TemplateCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreate.js + $ref: examples/TemplateCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TemplateCreateExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TemplateCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TemplateCreateExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TemplateCreateExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TemplateCreateExample.sh x-meta: seo: title: 'Create Template | Dropbox Sign for Developers' @@ -6110,19 +5832,19 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequest' + form_fields_per_document_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6136,9 +5858,9 @@ paths: schema: $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponse' + '4XX': description: failed_operation content: application/json: @@ -6146,19 +5868,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6170,42 +5892,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TemplateCreateEmbeddedDraftExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TemplateCreateEmbeddedDraftExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TemplateCreateEmbeddedDraftExample.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TemplateCreateEmbeddedDraftExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TemplateCreateEmbeddedDraftExample.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TemplateCreateEmbeddedDraftExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TemplateCreateEmbeddedDraftExample.sh x-meta: seo: title: 'Create Embedded Template Draft | Dropbox Sign for Developers' @@ -6227,7 +5944,7 @@ paths: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6238,7 +5955,7 @@ paths: $ref: '#/components/headers/X-Ratelimit-Reset' content: application/json: {} - 4XX: + '4XX': description: failed_operation content: application/json: @@ -6246,19 +5963,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6270,42 +5987,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TemplateDeleteExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateDelete.js + $ref: examples/TemplateDeleteExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TemplateDeleteExample.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TemplateDeleteExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TemplateDeleteExample.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TemplateDeleteExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TemplateDeleteExample.sh x-meta: seo: title: 'Delete Template | API Documentation | Dropbox Sign for Developers' @@ -6339,7 +6051,7 @@ paths: - pdf - zip responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6357,7 +6069,7 @@ paths: schema: type: string format: binary - 4XX: + '4XX': description: failed_operation content: application/json: @@ -6365,23 +6077,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6393,42 +6105,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateFilesExample.sh x-meta: seo: title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' @@ -6453,7 +6160,7 @@ paths: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6467,9 +6174,9 @@ paths: schema: $ref: '#/components/schemas/FileResponseDataUri' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -6477,23 +6184,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6505,42 +6212,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateFilesAsDataUriExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateFilesAsDataUriExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateFilesAsDataUriExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateFilesAsDataUriExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateFilesAsDataUriExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateFilesAsDataUriExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateFilesAsDataUriExample.sh x-meta: seo: title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' @@ -6572,7 +6274,7 @@ paths: type: integer default: 1 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6586,9 +6288,9 @@ paths: schema: $ref: '#/components/schemas/FileResponse' examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -6596,23 +6298,23 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 422_example: - $ref: '#/components/examples/Error422ResponseExample' + $ref: '#/components/examples/Error422Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6624,42 +6326,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateFilesAsFileUrlExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateFilesAsFileUrlExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateFilesAsFileUrlExample.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateFilesAsFileUrlExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateFilesAsFileUrlExample.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateFilesAsFileUrlExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateFilesAsFileUrlExample.sh x-meta: seo: title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' @@ -6681,7 +6378,7 @@ paths: type: string example: f57db65d3f933b5316d398057a36176831451a35 responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6695,9 +6392,9 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateGetResponse' + '4XX': description: failed_operation content: application/json: @@ -6705,19 +6402,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6729,42 +6426,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateGetExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateGetExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateGetExample.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateGetExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateGetExample.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateGetExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateGetExample.sh x-meta: seo: title: 'Get Template | API Documentation | Dropbox Sign for Developers' @@ -6809,7 +6501,7 @@ paths: schema: type: string responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6823,9 +6515,9 @@ paths: schema: $ref: '#/components/schemas/TemplateListResponse' examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateListResponse' + '4XX': description: failed_operation content: application/json: @@ -6833,19 +6525,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6857,42 +6549,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateListExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateList.js + $ref: examples/TemplateListExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateListExample.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateListExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateListExample.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateListExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateListExample.sh x-meta: seo: title: 'List Templates | API Documentation | Dropbox Sign for Developers' @@ -6920,10 +6607,10 @@ paths: schema: $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateRemoveUserRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -6937,9 +6624,9 @@ paths: schema: $ref: '#/components/schemas/TemplateGetResponse' examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateRemoveUserResponse' + '4XX': description: failed_operation content: application/json: @@ -6947,17 +6634,17 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -6969,42 +6656,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateRemoveUserExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateRemoveUserExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateRemoveUserExample.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateRemoveUserExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateRemoveUserExample.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateRemoveUserExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateRemoveUserExample.sh x-meta: seo: title: 'Remove User from Template | REST API | Dropbox Sign for Developers' @@ -7044,13 +6726,13 @@ paths: schema: $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' + example: + $ref: '#/components/examples/TemplateUpdateFilesRequest' multipart/form-data: schema: $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7064,9 +6746,9 @@ paths: schema: $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' - 4XX: + example: + $ref: '#/components/examples/TemplateUpdateFilesResponse' + '4XX': description: failed_operation content: application/json: @@ -7074,21 +6756,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7100,42 +6782,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateUpdateFilesExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateUpdateFilesExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateUpdateFilesExample.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateUpdateFilesExample.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateUpdateFilesExample.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateUpdateFilesExample.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateUpdateFilesExample.sh x-meta: seo: title: 'Update Template Files | REST API | Dropbox Sign for Developers' @@ -7154,19 +6831,19 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7180,9 +6857,9 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' - 4XX: + example: + $ref: '#/components/examples/UnclaimedDraftCreateResponse' + '4XX': description: failed_operation content: application/json: @@ -7190,15 +6867,15 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7210,42 +6887,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/UnclaimedDraftCreateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/UnclaimedDraftCreateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/UnclaimedDraftCreateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/UnclaimedDraftCreateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/UnclaimedDraftCreateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/UnclaimedDraftCreateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/UnclaimedDraftCreateExample.sh x-meta: seo: title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' @@ -7267,19 +6939,19 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequest' + form_fields_per_document_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument' + form_field_groups_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups' + form_field_rules_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRules' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7293,9 +6965,9 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' - 4XX: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponse' + '4XX': description: failed_operation content: application/json: @@ -7303,19 +6975,19 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7328,42 +7000,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/UnclaimedDraftCreateEmbeddedExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/UnclaimedDraftCreateEmbeddedExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/UnclaimedDraftCreateEmbeddedExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/UnclaimedDraftCreateEmbeddedExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/UnclaimedDraftCreateEmbeddedExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/UnclaimedDraftCreateEmbeddedExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/UnclaimedDraftCreateEmbeddedExample.sh x-meta: seo: title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' @@ -7385,13 +7052,13 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequest' multipart/form-data: schema: $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7405,9 +7072,9 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' - 4XX: + example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponse' + '4XX': description: failed_operation content: application/json: @@ -7415,21 +7082,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 429_example: - $ref: '#/components/examples/Error429ResponseExample' + $ref: '#/components/examples/Error429Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7441,42 +7108,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplateExample.sh x-meta: seo: title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' @@ -7507,10 +7169,10 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequest' responses: - 200: + '200': description: 'successful operation' headers: X-RateLimit-Limit: @@ -7524,9 +7186,9 @@ paths: schema: $ref: '#/components/schemas/UnclaimedDraftCreateResponse' examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' - 4XX: + example: + $ref: '#/components/examples/UnclaimedDraftEditAndResend' + '4XX': description: failed_operation content: application/json: @@ -7534,21 +7196,21 @@ paths: $ref: '#/components/schemas/ErrorResponse' examples: 400_example: - $ref: '#/components/examples/Error400ResponseExample' + $ref: '#/components/examples/Error400Response' 401_example: - $ref: '#/components/examples/Error401ResponseExample' + $ref: '#/components/examples/Error401Response' 402_example: - $ref: '#/components/examples/Error402ResponseExample' + $ref: '#/components/examples/Error402Response' 403_example: - $ref: '#/components/examples/Error403ResponseExample' + $ref: '#/components/examples/Error403Response' 404_example: - $ref: '#/components/examples/Error404ResponseExample' + $ref: '#/components/examples/Error404Response' 409_example: - $ref: '#/components/examples/Error409ResponseExample' + $ref: '#/components/examples/Error409Response' 410_example: - $ref: '#/components/examples/Error410ResponseExample' + $ref: '#/components/examples/Error410Response' 4XX_example: - $ref: '#/components/examples/Error4XXResponseExample' + $ref: '#/components/examples/Error4XXResponse' security: - api_key: [] @@ -7561,42 +7223,37 @@ paths: lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/UnclaimedDraftEditAndResendExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/UnclaimedDraftEditAndResendExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/UnclaimedDraftEditAndResendExample.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/UnclaimedDraftEditAndResendExample.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/UnclaimedDraftEditAndResendExample.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/UnclaimedDraftEditAndResendExample.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/UnclaimedDraftEditAndResendExample.sh x-meta: seo: title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' @@ -7757,7 +7414,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: description: 'Account ID' @@ -7850,20 +7507,20 @@ components: - country properties: area_code: - description: 'Area code' + description: 'Area code of the new Fax Line' type: integer country: - description: Country + description: 'Country of the area code' type: string enum: - CA - US - UK city: - description: City + description: 'City of the area code' type: string account_id: - description: 'Account ID' + description: 'Account ID of the account that will be assigned this new Fax Line' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 type: object @@ -7872,7 +7529,7 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string type: object FaxLineRemoveUserRequest: @@ -7880,14 +7537,14 @@ components: - number properties: number: - description: 'The Fax Line number.' + description: 'The Fax Line number' type: string account_id: - description: 'Account ID' + description: 'Account ID of the user to remove access' type: string example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 email_address: - description: 'Email address' + description: 'Email address of the user to remove access' type: string format: email type: object @@ -7896,7 +7553,9 @@ components: - recipient properties: recipient: - description: 'Fax Send To Recipient' + description: |- + Recipient of the fax + Can be a phone number in E.164 format or email address type: string example: recipient@example.com sender: @@ -7904,13 +7563,19 @@ components: type: string example: sender@example.com files: - description: 'Fax File to Send' + description: |- + Use `files[]` to indicate the uploaded file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string format: binary file_urls: - description: 'Fax File URL to Send' + description: |- + Use `file_urls[]` to have Dropbox Fax download the file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string @@ -7919,11 +7584,11 @@ components: type: boolean default: false cover_page_to: - description: 'Fax Cover Page for Recipient' + description: 'Fax cover page recipient information' type: string example: 'Recipient Name' cover_page_from: - description: 'Fax Cover Page for Sender' + description: 'Fax cover page sender information' type: string example: 'Sender Name' cover_page_message: @@ -8417,19 +8082,7 @@ components: type: boolean default: false type: object - SignatureRequestRemindRequest: - required: - - email_address - properties: - email_address: - description: 'The email address of the signer to send a reminder to.' - type: string - format: email - name: - description: 'The name of the signer to send a reminder to. Include if two or more signers share an email address.' - type: string - type: object - SignatureRequestSendRequest: + SignatureRequestEditRequest: properties: files: description: |- @@ -8583,28 +8236,518 @@ components: type: integer nullable: true type: object - SignatureRequestSendWithTemplateRequest: - description: '' + SignatureRequestEditEmbeddedRequest: required: - - signers - - template_ids + - client_id properties: - template_ids: - description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. type: array items: type: string - allow_decline: - description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' - type: boolean - default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' - type: array - items: - $ref: '#/components/schemas/SubCC' - client_id: - description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestEditEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + - signers + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestRemindRequest: + required: + - email_address + properties: + email_address: + description: 'The email address of the signer to send a reminder to.' + type: string + format: email + name: + description: 'The name of the signer to send a reminder to. Include if two or more signers share an email address.' + type: string + type: object + SignatureRequestSendRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **NOTE:** Only available for Premium plan and higher. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestSendWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' type: string custom_fields: description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' @@ -13063,498 +13206,522 @@ components: type: string default: 'Hello API Event Received' examples: - AccountCreateRequestDefaultExample: + AccountCreateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountCreateRequestDefaultExample.json - AccountCreateRequestOAuthExample: + $ref: examples/json/AccountCreateRequest.json + AccountCreateRequestOAuth: summary: 'OAuth Example' value: - $ref: examples/json/AccountCreateRequestOAuthExample.json - AccountUpdateRequestDefaultExample: + $ref: examples/json/AccountCreateRequestOAuth.json + AccountUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/AccountUpdateRequestDefaultExample.json - AccountVerifyRequestDefaultExample: + $ref: examples/json/AccountUpdateRequest.json + AccountVerifyRequest: summary: 'Default Example' value: - $ref: examples/json/AccountVerifyRequestDefaultExample.json - ApiAppCreateRequestDefaultExample: + $ref: examples/json/AccountVerifyRequest.json + ApiAppCreateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppCreateRequestDefaultExample.json - ApiAppUpdateRequestDefaultExample: + $ref: examples/json/ApiAppCreateRequest.json + ApiAppUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/ApiAppUpdateRequestDefaultExample.json - EmbeddedEditUrlRequestDefaultExample: + $ref: examples/json/ApiAppUpdateRequest.json + EmbeddedEditUrlRequest: summary: 'Default Example' value: - $ref: examples/json/EmbeddedEditUrlRequestDefaultExample.json - FaxLineAddUserRequestExample: + $ref: examples/json/EmbeddedEditUrlRequest.json + FaxLineAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineAddUserRequestExample.json - FaxLineCreateRequestExample: + $ref: examples/json/FaxLineAddUserRequest.json + FaxLineCreateRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineCreateRequestExample.json - FaxLineDeleteRequestExample: + $ref: examples/json/FaxLineCreateRequest.json + FaxLineDeleteRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineDeleteRequestExample.json - FaxLineRemoveUserRequestExample: + $ref: examples/json/FaxLineDeleteRequest.json + FaxLineRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/FaxLineRemoveUserRequestExample.json - FaxSendRequestExample: + $ref: examples/json/FaxLineRemoveUserRequest.json + FaxSendRequest: summary: 'Default Example' value: - $ref: examples/json/FaxSendRequestExample.json - OAuthTokenGenerateRequestExample: + $ref: examples/json/FaxSendRequest.json + OAuthTokenGenerateRequest: summary: 'OAuth Token Generate Example' value: - $ref: examples/json/OAuthTokenGenerateRequestExample.json - OAuthTokenRefreshRequestExample: + $ref: examples/json/OAuthTokenGenerateRequest.json + OAuthTokenRefreshRequest: summary: 'OAuth Token Refresh Example' value: - $ref: examples/json/OAuthTokenRefreshRequestExample.json - ReportCreateRequestDefaultExample: + $ref: examples/json/OAuthTokenRefreshRequest.json + ReportCreateRequest: + summary: 'Default Example' + value: + $ref: examples/json/ReportCreateRequest.json + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.json + SignatureRequestBulkSendWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestBulkSendWithTemplateRequest.json + SignatureRequestCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/ReportCreateRequestDefaultExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedRequest.json + SignatureRequestCreateEmbeddedRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSigners.json + SignatureRequestCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestBulkSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequest.json + SignatureRequestEditRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestDefaultExample: + $ref: examples/json/SignatureRequestEditRequest.json + SignatureRequestEditRequestGroupedSigners: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSigners.json + SignatureRequestEditEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestDefaultExample.json - SignatureRequestCreateEmbeddedRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequest.json + SignatureRequestEditEmbeddedRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedRequestGroupedSignersExample.json - SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSigners.json + SignatureRequestEditEmbeddedWithTemplateRequest: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequest.json + SignatureRequestEditWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json - SignatureRequestRemindRequestDefaultExample: + $ref: examples/json/SignatureRequestEditWithTemplateRequest.json + SignatureRequestRemindRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestRemindRequestDefaultExample.json - SignatureRequestSendRequestDefaultExample: + $ref: examples/json/SignatureRequestRemindRequest.json + SignatureRequestSendRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendRequestDefaultExample.json - SignatureRequestSendRequestGroupedSignersExample: + $ref: examples/json/SignatureRequestSendRequest.json + SignatureRequestSendRequestGroupedSigners: summary: 'Grouped Signers Example' value: - $ref: examples/json/SignatureRequestSendRequestGroupedSignersExample.json - SignatureRequestSendWithTemplateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendRequestGroupedSigners.json + SignatureRequestSendWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestSendWithTemplateRequestDefaultExample.json - SignatureRequestUpdateRequestDefaultExample: + $ref: examples/json/SignatureRequestSendWithTemplateRequest.json + SignatureRequestUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/SignatureRequestUpdateRequestDefaultExample.json - TeamAddMemberRequestEmailAddressExample: + $ref: examples/json/SignatureRequestUpdateRequest.json + TeamAddMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamAddMemberRequestEmailAddressExample.json - TeamAddMemberRequestAccountIdExample: + $ref: examples/json/TeamAddMemberRequest.json + TeamAddMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamAddMemberRequestAccountIdExample.json - TeamCreateRequestDefaultExample: + $ref: examples/json/TeamAddMemberRequestAccountId.json + TeamCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamCreateRequestDefaultExample.json - TeamRemoveMemberRequestEmailAddressExample: + $ref: examples/json/TeamCreateRequest.json + TeamRemoveMemberRequest: summary: 'Email Address Example' value: - $ref: examples/json/TeamRemoveMemberRequestEmailAddressExample.json - TeamRemoveMemberRequestAccountIdExample: + $ref: examples/json/TeamRemoveMemberRequest.json + TeamRemoveMemberRequestAccountId: summary: 'Account ID Example' value: - $ref: examples/json/TeamRemoveMemberRequestAccountIdExample.json - TeamUpdateRequestDefaultExample: + $ref: examples/json/TeamRemoveMemberRequestAccountId.json + TeamUpdateRequest: summary: 'Default Example' value: - $ref: examples/json/TeamUpdateRequestDefaultExample.json - TemplateAddUserRequestDefaultExample: + $ref: examples/json/TeamUpdateRequest.json + TemplateAddUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateAddUserRequestDefaultExample.json - TemplateCreateRequestDefaultExample: + $ref: examples/json/TemplateAddUserRequest.json + TemplateCreateRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateRequestDefaultExample.json - TemplateCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateRequest.json + TemplateCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldsPerDocumentExample.json - TemplateCreateRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateRequestFormFieldsPerDocument.json + TemplateCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldGroupsExample.json - TemplateCreateRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateRequestFormFieldGroups.json + TemplateCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateRequestFormFieldRulesExample.json - TemplateCreateEmbeddedDraftRequestDefaultExample: + $ref: examples/json/TemplateCreateRequestFormFieldRules.json + TemplateCreateEmbeddedDraftRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestDefaultExample.json - TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequest.json + TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample.json - TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocument.json + TemplateCreateEmbeddedDraftRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample.json - TemplateCreateEmbeddedDraftRequestFormFieldRulesExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldGroups.json + TemplateCreateEmbeddedDraftRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample.json - TemplateRemoveUserRequestDefaultExample: + $ref: examples/json/TemplateCreateEmbeddedDraftRequestFormFieldRules.json + TemplateRemoveUserRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateRemoveUserRequestDefaultExample.json - TemplateUpdateFilesRequestDefaultExample: + $ref: examples/json/TemplateRemoveUserRequest.json + TemplateUpdateFilesRequest: summary: 'Default Example' value: - $ref: examples/json/TemplateUpdateFilesRequestDefaultExample.json - UnclaimedDraftCreateRequestDefaultExample: + $ref: examples/json/TemplateUpdateFilesRequest.json + UnclaimedDraftCreateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestDefaultExample.json - UnclaimedDraftCreateRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateRequest.json + UnclaimedDraftCreateRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldsPerDocument.json + UnclaimedDraftCreateRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroupsExample.json - UnclaimedDraftCreateRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldGroups.json + UnclaimedDraftCreateRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestDefaultExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequest.json + UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument: summary: 'Form Fields Per Document Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocument.json + UnclaimedDraftCreateEmbeddedRequestFormFieldGroups: summary: 'Form Fields Per Document and Groups Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample.json - UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldGroups.json + UnclaimedDraftCreateEmbeddedRequestFormFieldRules: summary: 'Form Fields Per Document and Rules Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample.json - UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedRequestFormFieldRules.json + UnclaimedDraftCreateEmbeddedWithTemplateRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample.json - UnclaimedDraftEditAndResendRequestDefaultExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateRequest.json + UnclaimedDraftEditAndResendRequest: summary: 'Default Example' value: - $ref: examples/json/UnclaimedDraftEditAndResendRequestDefaultExample.json - AccountCreateResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResendRequest.json + AccountCreateResponse: summary: 'Account Create' value: - $ref: examples/json/AccountCreateResponseExample.json - AccountCreateOAuthResponseExample: + $ref: examples/json/AccountCreateResponse.json + AccountCreateOAuthResponse: summary: 'Account Create with OAuth Authorization' value: - $ref: examples/json/AccountCreateOAuthResponseExample.json - AccountGetResponseExample: + $ref: examples/json/AccountCreateOAuthResponse.json + AccountGetResponse: summary: 'Account Get' value: - $ref: examples/json/AccountGetResponseExample.json - AccountVerifyFoundResponseExample: + $ref: examples/json/AccountGetResponse.json + AccountVerifyFoundResponse: summary: 'Account Found' value: - $ref: examples/json/AccountVerifyFoundResponseExample.json - AccountVerifyNotFoundResponseExample: + $ref: examples/json/AccountVerifyFoundResponse.json + AccountVerifyNotFoundResponse: summary: 'Account Not Found' value: - $ref: examples/json/AccountVerifyNotFoundResponseExample.json - ApiAppGetResponseExample: + $ref: examples/json/AccountVerifyNotFoundResponse.json + ApiAppGetResponse: summary: 'API App' value: - $ref: examples/json/ApiAppGetResponseExample.json - ApiAppListResponseExample: + $ref: examples/json/ApiAppGetResponse.json + ApiAppListResponse: summary: 'API App List' value: - $ref: examples/json/ApiAppListResponseExample.json - BulkSendJobGetResponseExample: + $ref: examples/json/ApiAppListResponse.json + BulkSendJobGetResponse: summary: 'Bulk Send Job' value: - $ref: examples/json/BulkSendJobGetResponseExample.json - BulkSendJobListResponseExample: + $ref: examples/json/BulkSendJobGetResponse.json + BulkSendJobListResponse: summary: 'Bulk Send Job List' value: - $ref: examples/json/BulkSendJobListResponseExample.json - EmbeddedEditUrlResponseExample: + $ref: examples/json/BulkSendJobListResponse.json + EmbeddedEditUrlResponse: summary: 'Embedded Edit URL' value: - $ref: examples/json/EmbeddedEditUrlResponseExample.json - EmbeddedSignUrlResponseExample: + $ref: examples/json/EmbeddedEditUrlResponse.json + EmbeddedSignUrlResponse: summary: 'Embedded Sign URL' value: - $ref: examples/json/EmbeddedSignUrlResponseExample.json - Error400ResponseExample: + $ref: examples/json/EmbeddedSignUrlResponse.json + Error400Response: summary: 'Error 400 bad_request' value: - $ref: examples/json/Error400ResponseExample.json - Error401ResponseExample: + $ref: examples/json/Error400Response.json + Error401Response: summary: 'Error 401 unauthorized' value: - $ref: examples/json/Error401ResponseExample.json - Error402ResponseExample: + $ref: examples/json/Error401Response.json + Error402Response: summary: 'Error 402 payment_required' value: - $ref: examples/json/Error402ResponseExample.json - Error403ResponseExample: + $ref: examples/json/Error402Response.json + Error403Response: summary: 'Error 403 forbidden' value: - $ref: examples/json/Error403ResponseExample.json - Error404ResponseExample: + $ref: examples/json/Error403Response.json + Error404Response: summary: 'Error 404 not_found' value: - $ref: examples/json/Error404ResponseExample.json - Error409ResponseExample: + $ref: examples/json/Error404Response.json + Error409Response: summary: 'Error 409 conflict' value: - $ref: examples/json/Error409ResponseExample.json - Error410ResponseExample: + $ref: examples/json/Error409Response.json + Error410Response: summary: 'Error 410 deleted' value: - $ref: examples/json/Error410ResponseExample.json - Error422ResponseExample: + $ref: examples/json/Error410Response.json + Error422Response: summary: 'Error 422 unprocessable_entity' value: - $ref: examples/json/Error422ResponseExample.json - Error429ResponseExample: + $ref: examples/json/Error422Response.json + Error429Response: summary: 'Error 429 exceeded_rate' value: - $ref: examples/json/Error429ResponseExample.json - Error4XXResponseExample: + $ref: examples/json/Error429Response.json + Error4XXResponse: summary: 'Error 4XX failed_operation' value: - $ref: examples/json/Error4XXResponseExample.json - FaxGetResponseExample: + $ref: examples/json/Error4XXResponse.json + FaxGetResponse: summary: 'Fax Response' value: - $ref: examples/json/FaxGetResponseExample.json - FaxLineResponseExample: + $ref: examples/json/FaxGetResponse.json + FaxLineResponse: summary: 'Sample Fax Line Response' value: - $ref: examples/json/FaxLineResponseExample.json - FaxLineAreaCodeGetResponseExample: + $ref: examples/json/FaxLineResponse.json + FaxLineAreaCodeGetResponse: summary: 'Sample Area Code Response' value: - $ref: examples/json/FaxLineAreaCodeGetResponseExample.json - FaxLineListResponseExample: + $ref: examples/json/FaxLineAreaCodeGetResponse.json + FaxLineListResponse: summary: 'Sample Fax Line List Response' value: - $ref: examples/json/FaxLineListResponseExample.json - FaxListResponseExample: - summary: 'Returns the properties and settings of multiple Faxes.' + $ref: examples/json/FaxLineListResponse.json + FaxListResponse: + summary: 'Returns the properties and settings of multiple Faxes' value: - $ref: examples/json/FaxListResponseExample.json - ReportCreateResponseExample: + $ref: examples/json/FaxListResponse.json + ReportCreateResponse: summary: Report value: - $ref: examples/json/ReportCreateResponseExample.json - SignatureRequestGetResponseExample: + $ref: examples/json/ReportCreateResponse.json + SignatureRequestGetResponse: summary: 'Get Signature Request' value: - $ref: examples/json/SignatureRequestGetResponseExample.json - SignatureRequestListResponseExample: + $ref: examples/json/SignatureRequestGetResponse.json + SignatureRequestListResponse: summary: 'List Signature Requests' value: - $ref: examples/json/SignatureRequestListResponseExample.json - AccountUpdateResponseExample: + $ref: examples/json/SignatureRequestListResponse.json + AccountUpdateResponse: summary: 'Account Update' value: - $ref: examples/json/AccountUpdateResponseExample.json - OAuthTokenGenerateResponseExample: + $ref: examples/json/AccountUpdateResponse.json + OAuthTokenGenerateResponse: summary: 'Retrieving the OAuth token' value: - $ref: examples/json/OAuthTokenGenerateResponseExample.json - OAuthTokenRefreshResponseExample: + $ref: examples/json/OAuthTokenGenerateResponse.json + OAuthTokenRefreshResponse: summary: 'Refresh an existing OAuth token' value: - $ref: examples/json/OAuthTokenRefreshResponseExample.json - ApiAppCreateResponseExample: + $ref: examples/json/OAuthTokenRefreshResponse.json + ApiAppCreateResponse: summary: 'API App' value: - $ref: examples/json/ApiAppCreateResponseExample.json - ApiAppUpdateResponseExample: + $ref: examples/json/ApiAppCreateResponse.json + ApiAppUpdateResponse: summary: 'API App Update' value: - $ref: examples/json/ApiAppUpdateResponseExample.json - SignatureRequestCreateEmbeddedResponseExample: + $ref: examples/json/ApiAppUpdateResponse.json + SignatureRequestCreateEmbeddedResponse: summary: 'Create Embedded Signature Request' value: - $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json - SignatureRequestCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedResponse.json + SignatureRequestCreateEmbeddedWithTemplateResponse: summary: 'Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json - SignatureRequestFilesResponseExample: + $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponse.json + SignatureRequestFilesResponse: summary: 'Signature Requests Files' value: - $ref: examples/json/SignatureRequestFilesResponseExample.json - SignatureRequestReleaseHoldResponseExample: + $ref: examples/json/SignatureRequestFilesResponse.json + SignatureRequestReleaseHoldResponse: summary: 'Send Signature Release Hold' value: - $ref: examples/json/SignatureRequestReleaseHoldResponseExample.json - SignatureRequestRemindResponseExample: + $ref: examples/json/SignatureRequestReleaseHoldResponse.json + SignatureRequestRemindResponse: summary: 'Send Signature Request Reminder' value: - $ref: examples/json/SignatureRequestRemindResponseExample.json - SignatureRequestSendResponseExample: + $ref: examples/json/SignatureRequestRemindResponse.json + SignatureRequestSendResponse: summary: 'Send Signature Request' value: - $ref: examples/json/SignatureRequestSendResponseExample.json - SignatureRequestSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestSendResponse.json + SignatureRequestSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json - SignatureRequestUpdateResponseExample: + $ref: examples/json/SignatureRequestSendWithTemplateResponse.json + SignatureRequestUpdateResponse: summary: 'Signature Request Update' value: - $ref: examples/json/SignatureRequestUpdateResponseExample.json - SignatureRequestBulkSendWithTemplateResponseExample: + $ref: examples/json/SignatureRequestUpdateResponse.json + SignatureRequestBulkSendWithTemplateResponse: summary: 'Send Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkSendWithTemplateResponseExample.json - SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/SignatureRequestBulkSendWithTemplateResponse.json + SignatureRequestBulkCreateEmbeddedWithTemplateResponse: summary: 'Bulk Send Create Embedded Signature Request With Template' value: - $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponseExample.json - TeamCreateResponseExample: + $ref: examples/json/SignatureRequestBulkCreateEmbeddedWithTemplateResponse.json + TeamCreateResponse: summary: 'Team Create' value: - $ref: examples/json/TeamCreateResponseExample.json - TeamMembersResponseExample: + $ref: examples/json/TeamCreateResponse.json + TeamMembersResponse: summary: 'Team Members List' value: - $ref: examples/json/TeamMembersResponseExample.json - TeamRemoveMemberResponseExample: + $ref: examples/json/TeamMembersResponse.json + TeamRemoveMemberResponse: summary: 'Team Remove Member' value: - $ref: examples/json/TeamRemoveMemberResponseExample.json - TeamUpdateResponseExample: + $ref: examples/json/TeamRemoveMemberResponse.json + TeamUpdateResponse: summary: 'Team Update' value: - $ref: examples/json/TeamUpdateResponseExample.json - TeamDoesNotExistResponseExample: + $ref: examples/json/TeamUpdateResponse.json + TeamDoesNotExistResponse: summary: 'Team Does Not Exist' value: - $ref: examples/json/TeamDoesNotExistResponseExample.json - TemplateAddUserResponseExample: + $ref: examples/json/TeamDoesNotExistResponse.json + TemplateAddUserResponse: summary: 'Add User to Template' value: - $ref: examples/json/TemplateAddUserResponseExample.json - TemplateFilesResponseExample: + $ref: examples/json/TemplateAddUserResponse.json + TemplateFilesResponse: summary: 'Template Files' value: - $ref: examples/json/TemplateFilesResponseExample.json - TemplateRemoveUserResponseExample: + $ref: examples/json/TemplateFilesResponse.json + TemplateRemoveUserResponse: summary: 'Remove User from Template' value: - $ref: examples/json/TemplateRemoveUserResponseExample.json - UnclaimedDraftCreateEmbeddedResponseExample: + $ref: examples/json/TemplateRemoveUserResponse.json + UnclaimedDraftCreateEmbeddedResponse: summary: 'Unclaimed Draft Create Embedded' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedResponseExample.json - UnclaimedDraftCreateEmbeddedWithTemplateResponseExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedResponse.json + UnclaimedDraftCreateEmbeddedWithTemplateResponse: summary: 'Unclaimed Draft Create Embedded With Template' value: - $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample.json - UnclaimedDraftEditAndResendExample: + $ref: examples/json/UnclaimedDraftCreateEmbeddedWithTemplateResponse.json + UnclaimedDraftEditAndResend: summary: 'Unclaimed Draft Edit and Resend' value: - $ref: examples/json/UnclaimedDraftEditAndResendExample.json - TeamGetResponseExample: + $ref: examples/json/UnclaimedDraftEditAndResend.json + TeamGetResponse: summary: 'Team Get' value: - $ref: examples/json/TeamGetResponseExample.json - TeamGetInfoResponseExample: + $ref: examples/json/TeamGetResponse.json + TeamGetInfoResponse: summary: 'Team Get Info' value: - $ref: examples/json/TeamGetInfoResponseExample.json - TeamInvitesResponseExample: + $ref: examples/json/TeamGetInfoResponse.json + TeamInvitesResponse: summary: 'Team Invites' value: - $ref: examples/json/TeamInvitesResponseExample.json - TeamAddMemberResponseExample: + $ref: examples/json/TeamInvitesResponse.json + TeamAddMemberResponse: summary: 'Team Add Member' value: - $ref: examples/json/TeamAddMemberResponseExample.json - TeamSubTeamsResponseExample: + $ref: examples/json/TeamAddMemberResponse.json + TeamSubTeamsResponse: summary: 'Team Sub Teams List' value: - $ref: examples/json/TeamSubTeamsResponseExample.json - TemplateCreateResponseExample: + $ref: examples/json/TeamSubTeamsResponse.json + TemplateCreateResponse: summary: 'Create Template' value: - $ref: examples/json/TemplateCreateResponseExample.json - TemplateCreateEmbeddedDraftResponseExample: + $ref: examples/json/TemplateCreateResponse.json + TemplateCreateEmbeddedDraftResponse: summary: 'Create Embedded Draft Template' value: - $ref: examples/json/TemplateCreateEmbeddedDraftResponseExample.json - TemplateGetResponseExample: + $ref: examples/json/TemplateCreateEmbeddedDraftResponse.json + TemplateGetResponse: summary: 'Get Template' value: - $ref: examples/json/TemplateGetResponseExample.json - TemplateListResponseExample: + $ref: examples/json/TemplateGetResponse.json + TemplateListResponse: summary: 'List Templates' value: - $ref: examples/json/TemplateListResponseExample.json - TemplateUpdateFilesResponseExample: + $ref: examples/json/TemplateListResponse.json + TemplateUpdateFilesResponse: summary: 'Update Template Files' value: - $ref: examples/json/TemplateUpdateFilesResponseExample.json - UnclaimedDraftCreateResponseExample: + $ref: examples/json/TemplateUpdateFilesResponse.json + UnclaimedDraftCreateResponse: summary: 'Unclaimed Draft Create' value: - $ref: examples/json/UnclaimedDraftCreateResponseExample.json - EventCallbackAccountSignatureRequestSentExample: + $ref: examples/json/UnclaimedDraftCreateResponse.json + EventCallbackAccountSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAccountSignatureRequestSentExample.json - EventCallbackAccountTemplateCreatedExample: + $ref: examples/json/EventCallbackAccountSignatureRequestSent.json + EventCallbackAccountTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAccountTemplateCreatedExample.json - EventCallbackAppAccountConfirmedExample: + $ref: examples/json/EventCallbackAccountTemplateCreated.json + EventCallbackAppAccountConfirmed: summary: 'Example: account_confirmed' value: - $ref: examples/json/EventCallbackAppAccountConfirmedExample.json - EventCallbackAppSignatureRequestSentExample: + $ref: examples/json/EventCallbackAppAccountConfirmed.json + EventCallbackAppSignatureRequestSent: summary: 'Example: signature_request_sent' value: - $ref: examples/json/EventCallbackAppSignatureRequestSentExample.json - EventCallbackAppTemplateCreatedExample: + $ref: examples/json/EventCallbackAppSignatureRequestSent.json + EventCallbackAppTemplateCreated: summary: 'Example: template_created' value: - $ref: examples/json/EventCallbackAppTemplateCreatedExample.json + $ref: examples/json/EventCallbackAppTemplateCreated.json requestBodies: EventCallbackAccountRequest: description: |- @@ -13566,9 +13733,9 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAccountSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAccountSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAccountTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAccountTemplateCreated' EventCallbackAppRequest: description: |- **API App Callback Payloads --** @@ -13579,11 +13746,11 @@ components: $ref: '#/components/schemas/EventCallbackRequest' examples: account_confirmed_example: - $ref: '#/components/examples/EventCallbackAppAccountConfirmedExample' + $ref: '#/components/examples/EventCallbackAppAccountConfirmed' signature_request_sent_example: - $ref: '#/components/examples/EventCallbackAppSignatureRequestSentExample' + $ref: '#/components/examples/EventCallbackAppSignatureRequestSent' template_created_example: - $ref: '#/components/examples/EventCallbackAppTemplateCreatedExample' + $ref: '#/components/examples/EventCallbackAppTemplateCreated' headers: X-RateLimit-Limit: description: 'The maximum number of requests per hour that you can make.' @@ -13620,6 +13787,7 @@ components: security: - api_key: [] + - oauth2: - account_access - signature_request_access @@ -13696,37 +13864,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: @@ -13749,37 +13912,32 @@ x-webhooks: lang: PHP label: PHP source: - $ref: examples/EventCallback.php + $ref: examples/EventCallbackExample.php - lang: 'C#' label: 'C#' source: - $ref: examples/EventCallback.cs - - - lang: JavaScript - label: JavaScript - source: - $ref: examples/EventCallback.js + $ref: examples/EventCallbackExample.cs - lang: TypeScript label: TypeScript source: - $ref: examples/EventCallback.ts + $ref: examples/EventCallbackExample.ts - lang: Java label: Java source: - $ref: examples/EventCallback.java + $ref: examples/EventCallbackExample.java - lang: Ruby label: Ruby source: - $ref: examples/EventCallback.rb + $ref: examples/EventCallbackExample.rb - lang: Python label: Python source: - $ref: examples/EventCallback.py + $ref: examples/EventCallbackExample.py tags: - 'Callbacks and Events' requestBody: diff --git a/sandbox/.gitignore b/sandbox/.gitignore index 36ef23211..bae462a8a 100644 --- a/sandbox/.gitignore +++ b/sandbox/.gitignore @@ -1,45 +1 @@ -dotnet/* -!dotnet/.gitignore -!dotnet/hellosign_sandbox.csproj -!dotnet/NuGet.Config -!dotnet/Program.cs -!dotnet/src -!dotnet/test_fixtures - -java-v1/* -!java-v1/pom.xml -!java-v1/src -java-v1/src/main/java/com/dropbox/sign_sandbox/* -!java-v1/src/main/java/com/dropbox/sign_sandbox/Main.java -!java-v1/test_fixtures - -java-v2/* -!java-v2/pom.xml -!java-v2/src -java-v2/src/main/java/com/dropbox/sign_sandbox/* -!java-v2/src/main/java/com/dropbox/sign_sandbox/Main.java -!java-v2/test_fixtures - -node/* -!node/Example.ts -!node/package.json -!node/tests -!node/test_fixtures - -php/* -!php/composer.json -!php/Example.php -!php/test -!php/test_fixtures - -python/* -!python/Example.py -!python/requirements.txt -!python/tests -!python/test_fixtures - -ruby/* -!ruby/Example.rb -!ruby/Gemfile -!ruby/spec -!ruby/test_fixtures +**/artifacts/ diff --git a/sandbox/dotnet/Dropbox.SignSandbox.sln b/sandbox/dotnet/Dropbox.SignSandbox.sln new file mode 100644 index 000000000..359701322 --- /dev/null +++ b/sandbox/dotnet/Dropbox.SignSandbox.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{7045D429-F203-4317-A29F-FB9FD34B7FF9}") = "Dropbox.SignSandbox", "src\Dropbox.SignSandbox\Dropbox.SignSandbox.csproj", "{F8C8232D-7020-4603-8E04-18D060AE530B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8C8232D-7020-4603-8E04-18D060AE530B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8C8232D-7020-4603-8E04-18D060AE530B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8C8232D-7020-4603-8E04-18D060AE530B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8C8232D-7020-4603-8E04-18D060AE530B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj deleted file mode 100644 index 4f8b41f9d..000000000 --- a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/Dropbox.SignSandbox.Test.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - Dropbox.SignSandbox.Test - Dropbox.SignSandbox.Test - net6.0 - false - Dropbox.SignSandbox.Test - - - - - - - - - - - - - - - - diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs b/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs deleted file mode 100644 index 2350a526b..000000000 --- a/sandbox/dotnet/src/Dropbox.SignSandbox.Test/SignatureRequestTests.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using Xunit; -using Dropbox.Sign; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Dropbox.SignSandbox.Test -{ - public class TestHelper - { - public static JObject GetJsonContents(string fileName) - { - using (var r = new StreamReader( $"./../../../../../{fileName}")) - { - dynamic json = JsonConvert.DeserializeObject(r.ReadToEnd()); - Assert.NotNull(json); - - return json; - } - } - - public static JObject GetConfig() - { - dynamic configCustom = GetJsonContents("src/Dropbox.SignSandbox.Test/.config.json"); - dynamic configDist = GetJsonContents("src/Dropbox.SignSandbox.Test/.config.dist.json"); - - var mergeSettings = new JsonMergeSettings - { - MergeArrayHandling = MergeArrayHandling.Union - }; - - configDist.Merge(configCustom, mergeSettings); - - return configDist; - } - } - - public class SignatureRequestTests - { - [Fact] - public void SendTest() - { - dynamic config_merged = TestHelper.GetConfig(); - - var config = new Sign.Client.Configuration(); - config.Username = config_merged["API_KEY"]; - config.BasePath = config_merged["BASE_URL"]; - - var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); - - var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); - - var sendRequest = Sign.Model.SignatureRequestSendRequest.Init(data.ToString()); - - sendRequest.Files = new List { - new FileStream( - "./../../../../../test_fixtures/pdf-sample.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var sendResponse = signatureRequestApi.SignatureRequestSend(sendRequest); - - Assert.Equal( - sendRequest.FormFieldsPerDocument[0].ApiId, - sendResponse.SignatureRequest.CustomFields[0].ApiId - ); - - Assert.Equal( - sendRequest.Signers[0].EmailAddress, - sendResponse.SignatureRequest.Signatures[0].SignerEmailAddress - ); - Assert.Equal( - sendRequest.Signers[1].EmailAddress, - sendResponse.SignatureRequest.Signatures[1].SignerEmailAddress - ); - Assert.Equal( - sendRequest.Signers[2].EmailAddress, - sendResponse.SignatureRequest.Signatures[2].SignerEmailAddress - ); - - var getResponse = signatureRequestApi.SignatureRequestGet(sendResponse.SignatureRequest.SignatureRequestId); - - Assert.Equal( - sendResponse.SignatureRequest.SignatureRequestId, - getResponse.SignatureRequest.SignatureRequestId - ); - } - - [Fact] - public void CreateEmbeddedTest() - { - dynamic config_merged = TestHelper.GetConfig(); - - var config = new Sign.Client.Configuration(); - config.Username = config_merged["API_KEY"]; - config.BasePath = config_merged["BASE_URL"]; - - var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); - - var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); - data["client_id"] = config_merged["CLIENT_ID"]; - - var sendRequest = Sign.Model.SignatureRequestCreateEmbeddedRequest.Init(data.ToString()); - - sendRequest.Files = new List { - new FileStream( - "./../../../../../test_fixtures/pdf-sample.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var sendResponse = signatureRequestApi.SignatureRequestCreateEmbedded(sendRequest); - - Assert.Equal( - sendRequest.Signers[0].EmailAddress, - sendResponse.SignatureRequest.Signatures[0].SignerEmailAddress - ); - Assert.Equal( - sendRequest.Signers[1].EmailAddress, - sendResponse.SignatureRequest.Signatures[1].SignerEmailAddress - ); - Assert.Equal( - sendRequest.Signers[2].EmailAddress, - sendResponse.SignatureRequest.Signatures[2].SignerEmailAddress - ); - - var embeddedApi = new Sign.Api.EmbeddedApi(config); - - var getResponse = embeddedApi.EmbeddedSignUrl(sendResponse.SignatureRequest.Signatures[0].SignatureId); - - Assert.NotEmpty(getResponse.Embedded.SignUrl); - } - - [Fact] - public void SendWithoutFillErrorTest() - { - dynamic config_merged = TestHelper.GetConfig(); - - var config = new Sign.Client.Configuration(); - config.Username = config_merged["API_KEY"]; - config.BasePath = config_merged["BASE_URL"]; - - var signatureRequestApi = new Sign.Api.SignatureRequestApi(config); - - var data = TestHelper.GetJsonContents("test_fixtures/SignatureRequestSendRequest.json"); - - var sendRequest = Sign.Model.SignatureRequestSendRequest.Init(data.ToString()); - - try - { - signatureRequestApi.SignatureRequestSend(sendRequest); - Assert.True(false); - } - catch (Sign.Client.ApiException e) - { - Assert.Equal("file", e.ErrorContent.Error.ErrorPath); - } - } - } -} \ No newline at end of file diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateExample.cs new file mode 100644 index 000000000..373d6a20f --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountCreateRequest = new AccountCreateRequest( + emailAddress: "newuser@dropboxsign.com" + ); + + try + { + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateOauthExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateOauthExample.cs new file mode 100644 index 000000000..1976cb18e --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountCreateOauthExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountCreateOauthExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountCreateRequest = new AccountCreateRequest( + emailAddress: "newuser@dropboxsign.com", + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465" + ); + + try + { + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountGetExample.cs new file mode 100644 index 000000000..83d94716e --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountGetExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new AccountApi(config).AccountGet(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountUpdateExample.cs new file mode 100644 index 000000000..f62bb1125 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountUpdateExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountUpdateRequest = new AccountUpdateRequest( + callbackUrl: "https://www.example.com/callback", + locale: "en-US" + ); + + try + { + var response = new AccountApi(config).AccountUpdate( + accountUpdateRequest: accountUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/AccountVerifyExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountVerifyExample.cs new file mode 100644 index 000000000..cba51330d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/AccountVerifyExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class AccountVerifyExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var accountVerifyRequest = new AccountVerifyRequest( + emailAddress: "some_user@dropboxsign.com" + ); + + try + { + var response = new AccountApi(config).AccountVerify( + accountVerifyRequest: accountVerifyRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling AccountApi#AccountVerify: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppCreateExample.cs new file mode 100644 index 000000000..277e40121 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppCreateExample.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var oauth = new SubOAuth( + callbackUrl: "https://example.com/oauth", + scopes: [ + SubOAuth.ScopesEnum.BasicAccountInfo, + SubOAuth.ScopesEnum.RequestSignature, + ] + ); + + var whiteLabelingOptions = new SubWhiteLabelingOptions( + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff" + ); + + var apiAppCreateRequest = new ApiAppCreateRequest( + name: "My Production App", + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions + ); + + try + { + var response = new ApiAppApi(config).ApiAppCreate( + apiAppCreateRequest: apiAppCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppDeleteExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppDeleteExample.cs new file mode 100644 index 000000000..87235a6a3 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppDeleteExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new ApiAppApi(config).ApiAppDelete( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppGetExample.cs new file mode 100644 index 000000000..8bbf80af4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new ApiAppApi(config).ApiAppGet( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppListExample.cs new file mode 100644 index 000000000..be9060253 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new ApiAppApi(config).ApiAppList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppUpdateExample.cs new file mode 100644 index 000000000..3eb03a1bf --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ApiAppUpdateExample.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ApiAppUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var oauth = new SubOAuth( + callbackUrl: "https://example.com/oauth", + scopes: [ + SubOAuth.ScopesEnum.BasicAccountInfo, + SubOAuth.ScopesEnum.RequestSignature, + ] + ); + + var whiteLabelingOptions = new SubWhiteLabelingOptions( + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff" + ); + + var apiAppUpdateRequest = new ApiAppUpdateRequest( + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions + ); + + try + { + var response = new ApiAppApi(config).ApiAppUpdate( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9", + apiAppUpdateRequest: apiAppUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ApiAppApi#ApiAppUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobGetExample.cs new file mode 100644 index 000000000..baa383c93 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobGetExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class BulkSendJobGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new BulkSendJobApi(config).BulkSendJobGet( + bulkSendJobId: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobListExample.cs new file mode 100644 index 000000000..d84e42e04 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/BulkSendJobListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class BulkSendJobListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new BulkSendJobApi(config).BulkSendJobList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj b/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj index 00fa04608..1ac1109f8 100644 --- a/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/Dropbox.SignSandbox.csproj @@ -1,8 +1,8 @@ - false - net6.0 + false + net9.0 Dropbox.SignSandbox Dropbox.SignSandbox Library @@ -10,9 +10,10 @@ false annotations false + latestmajor - + diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedEditUrlExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedEditUrlExample.cs new file mode 100644 index 000000000..f951e1751 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedEditUrlExample.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class EmbeddedEditUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var mergeFields = new List(); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest( + ccRoles: [ + "", + ], + mergeFields: mergeFields + ); + + try + { + var response = new EmbeddedApi(config).EmbeddedEditUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + embeddedEditUrlRequest: embeddedEditUrlRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedEditUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedSignUrlExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedSignUrlExample.cs new file mode 100644 index 000000000..a800f0b04 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/EmbeddedSignUrlExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class EmbeddedSignUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new EmbeddedApi(config).EmbeddedSignUrl( + signatureId: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedSignUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/Entry.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/Entry.cs new file mode 100644 index 000000000..b642a7ff1 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/Entry.cs @@ -0,0 +1,8 @@ +namespace Dropbox.SignSandbox; + +public class Entry +{ + public static void Main() + { + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/EventCallbackExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/EventCallbackExample.cs new file mode 100644 index 000000000..c8610a8fe --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/EventCallbackExample.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using Newtonsoft.Json; +using Dropbox.Sign.Model; +using Dropbox.Sign; + +namespace Dropbox.SignSandbox; + +public class EventCallbackExample +{ + public static void Run() + { + // use your API key + var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; + + // callbackData represents data we send to you + var callbackData = new Dictionary() + { + ["event"] = new Dictionary() + { + ["event_type"] = "account_confirmed", + ["event_time"] = "1669926463", + ["event_hash"] = "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + ["event_metadata"] = new Dictionary() + { + ["related_signature_id"] = null, + ["reported_for_account_id"] = "6421d70b9bd45059fa207d03ab8d1b96515b472c", + ["reported_for_app_id"] = null, + ["event_message"] = null, + } + } + }; + + var callbackEvent = EventCallbackRequest.Init(JsonConvert.SerializeObject(callbackData)); + + // verify that a callback came from HelloSign.com + if (EventCallbackHelper.IsValid(apiKey, callbackEvent)) + { + // one of "account_callback" or "api_app_callback" + var callbackType = EventCallbackHelper.GetCallbackType(callbackEvent); + + // do your magic below! + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxDeleteExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxDeleteExample.cs new file mode 100644 index 000000000..aa39f496d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxDeleteExample.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + new FaxApi(config).FaxDelete( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxFilesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxFilesExample.cs new file mode 100644 index 000000000..278b90f8b --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxFilesExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxFiles( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxGetExample.cs new file mode 100644 index 000000000..8a15843d1 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxGet( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAddUserExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAddUserExample.cs new file mode 100644 index 000000000..cb9c642f7 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAddUserExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineAddUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineAddUserRequest = new FaxLineAddUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var response = new FaxLineApi(config).FaxLineAddUser( + faxLineAddUserRequest: faxLineAddUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAddUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAreaCodeGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAreaCodeGetExample.cs new file mode 100644 index 000000000..403591924 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineAreaCodeGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineAreaCodeGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineAreaCodeGet( + country: "US" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAreaCodeGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineCreateExample.cs new file mode 100644 index 000000000..802ea4045 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineCreateRequest = new FaxLineCreateRequest( + areaCode: 209, + country: FaxLineCreateRequest.CountryEnum.US + ); + + try + { + var response = new FaxLineApi(config).FaxLineCreate( + faxLineCreateRequest: faxLineCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineDeleteExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineDeleteExample.cs new file mode 100644 index 000000000..42faed216 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineDeleteExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineDeleteRequest = new FaxLineDeleteRequest( + number: "[FAX_NUMBER]" + ); + + try + { + new FaxLineApi(config).FaxLineDelete( + faxLineDeleteRequest: faxLineDeleteRequest + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineGetExample.cs new file mode 100644 index 000000000..690a65360 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineGetExample.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineGet( + number: "123-123-1234" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineListExample.cs new file mode 100644 index 000000000..278eeea74 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxLineApi(config).FaxLineList( + accountId: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineRemoveUserExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineRemoveUserExample.cs new file mode 100644 index 000000000..809b89a4e --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxLineRemoveUserExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxLineRemoveUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest( + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com" + ); + + try + { + var response = new FaxLineApi(config).FaxLineRemoveUser( + faxLineRemoveUserRequest: faxLineRemoveUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxLineApi#FaxLineRemoveUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxListExample.cs new file mode 100644 index 000000000..64450619d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxListExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + var response = new FaxApi(config).FaxList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/FaxSendExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxSendExample.cs new file mode 100644 index 000000000..e6a2270be --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/FaxSendExample.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class FaxSendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var faxSendRequest = new FaxSendRequest( + recipient: "16690000001", + sender: "16690000000", + testMode: true, + coverPageTo: "Jill Fax", + coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", + title: "This is what the fax is about!", + files: new List + { + new FileStream( + path: "./example_fax.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new FaxApi(config).FaxSend( + faxSendRequest: faxSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenGenerateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenGenerateExample.cs new file mode 100644 index 000000000..7d8da2fca --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenGenerateExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class OauthTokenGenerateExample +{ + public static void Run() + { + var config = new Configuration(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest( + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code" + ); + + try + { + var response = new OAuthApi(config).OauthTokenGenerate( + oAuthTokenGenerateRequest: oAuthTokenGenerateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling OAuthApi#OauthTokenGenerate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenRefreshExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenRefreshExample.cs new file mode 100644 index 000000000..21c40d14c --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/OauthTokenRefreshExample.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class OauthTokenRefreshExample +{ + public static void Run() + { + var config = new Configuration(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest( + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" + ); + + try + { + var response = new OAuthApi(config).OauthTokenRefresh( + oAuthTokenRefreshRequest: oAuthTokenRefreshRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling OAuthApi#OauthTokenRefresh: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs deleted file mode 100644 index ad6fb38e6..000000000 --- a/sandbox/dotnet/src/Dropbox.SignSandbox/Program.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -using Dropbox.Sign.Api; -using Dropbox.Sign.Client; -using Dropbox.Sign.Model; - -namespace Dropbox.SignSandbox -{ - public class Example - { - public static void Main() - { - var config = new Configuration(); - // Configure HTTP basic authorization: api_key - config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new AccountApi(config); - - var data = new AccountCreateRequest( - emailAddress: "newuser@dropboxsign.com" - ); - - try - { - var result = apiInstance.AccountCreate(data); - Console.WriteLine(result); - } - catch (ApiException e) - { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); - Console.WriteLine("Status Code: " + e.ErrorCode); - Console.WriteLine(e.StackTrace); - } - } - } -} \ No newline at end of file diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/ReportCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/ReportCreateExample.cs new file mode 100644 index 000000000..769bd3a18 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/ReportCreateExample.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class ReportCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var reportCreateRequest = new ReportCreateRequest( + startDate: "09/01/2020", + endDate: "09/01/2020", + reportType: [ + ReportCreateRequest.ReportTypeEnum.UserActivity, + ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ] + ); + + try + { + var response = new ReportApi(config).ReportCreate( + reportCreateRequest: reportCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling ReportApi#ReportCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..9fd344a94 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); + + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" + ); + + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "ABC Corp" + ); + + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" + ); + + var signerList1Signers = new List + { + signerList1Signers1, + }; + + var signerList1 = new SubBulkSignerList( + customFields: signerList1CustomFields, + signers: signerList1Signers + ); + + var signerList2 = new SubBulkSignerList( + customFields: signerList2CustomFields, + signers: signerList2Signers + ); + + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + clientId: "1a659d9ad95bccd307ecad78d72192f8", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest: signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkSendWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkSendWithTemplateExample.cs new file mode 100644 index 000000000..3c95fdb32 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestBulkSendWithTemplateExample.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); + + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" + ); + + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "ABC Corp" + ); + + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" + ); + + var signerList1Signers = new List + { + signerList1Signers1, + }; + + var signerList1 = new SubBulkSignerList( + customFields: signerList1CustomFields, + signers: signerList1Signers + ); + + var signerList2 = new SubBulkSignerList( + customFields: signerList2CustomFields, + signers: signerList2Signers + ); + + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest( + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest: signatureRequestBulkSendWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkSendWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCancelExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCancelExample.cs new file mode 100644 index 000000000..4d18209eb --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCancelExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCancelExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new SignatureRequestApi(config).SignatureRequestCancel( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCancel: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedExample.cs new file mode 100644 index 000000000..7f9786caf --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedExample.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.cs new file mode 100644 index 000000000..40cbcbc51 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..d40f34240 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest: signatureRequestCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedExample.cs new file mode 100644 index 000000000..356603bf6 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedExample.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbedded( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedRequest: signatureRequestEditEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedGroupedSignersExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedGroupedSignersExample.cs new file mode 100644 index 000000000..3be9c8142 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedGroupedSignersExample.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbedded( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedRequest: signatureRequestEditEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..fff755e13 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditEmbeddedWithTemplateExample.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditEmbeddedWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedWithTemplateRequest: signatureRequestEditEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditExample.cs new file mode 100644 index 000000000..b3542b75f --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditExample.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestEditRequest = new SignatureRequestEditRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEdit( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditRequest: signatureRequestEditRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEdit: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditGroupedSignersExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditGroupedSignersExample.cs new file mode 100644 index 000000000..35a41afa4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditGroupedSignersExample.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestEditRequest = new SignatureRequestEditRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEdit( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditRequest: signatureRequestEditRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEdit: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditWithTemplateExample.cs new file mode 100644 index 000000000..172f24b6c --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestEditWithTemplateExample.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( + name: "Cost", + editor: "Client", + required: true, + value: "$20,000" + ); + + var customFields = new List + { + customFields1, + }; + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestEditWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditWithTemplateRequest: signatureRequestEditWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsDataUriExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsDataUriExample.cs new file mode 100644 index 000000000..60f837089 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsDataUriExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsDataUriExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFilesAsDataUri( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsDataUri: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsFileUrlExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsFileUrlExample.cs new file mode 100644 index 000000000..f3bfe667a --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesAsFileUrlExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsFileUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFilesAsFileUrl( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + forceDownload: 1 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsFileUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesExample.cs new file mode 100644 index 000000000..879127eda --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestFilesExample.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestFiles( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + fileType: "pdf" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestGetExample.cs new file mode 100644 index 000000000..388861f1f --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestGet( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestListExample.cs new file mode 100644 index 000000000..8092e5330 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestReleaseHoldExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestReleaseHoldExample.cs new file mode 100644 index 000000000..9b64cd74c --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestReleaseHoldExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestReleaseHoldExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new SignatureRequestApi(config).SignatureRequestReleaseHold( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestReleaseHold: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemindExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemindExample.cs new file mode 100644 index 000000000..bef1acbf1 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemindExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemindExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest( + emailAddress: "john@example.com" + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestRemind( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestRemindRequest: signatureRequestRemindRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemind: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemoveExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemoveExample.cs new file mode 100644 index 000000000..f0b9cf86e --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestRemoveExample.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemoveExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + + try + { + new SignatureRequestApi(config).SignatureRequestRemove( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemove: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendExample.cs new file mode 100644 index 000000000..2958c264c --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendExample.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestSendRequest = new SignatureRequestSendRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSend( + signatureRequestSendRequest: signatureRequestSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendGroupedSignersExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendGroupedSignersExample.cs new file mode 100644 index 000000000..8263d9170 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendGroupedSignersExample.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendGroupedSignersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var groupedSigners2Signers1 = new SubSignatureRequestSigner( + name: "Bob", + emailAddress: "bob@example.com" + ); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner( + name: "Charlie", + emailAddress: "charlie@example.com" + ); + + var groupedSigners2Signers = new List + { + groupedSigners2Signers1, + groupedSigners2Signers2, + }; + + var groupedSigners1Signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com" + ); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com" + ); + + var groupedSigners1Signers = new List + { + groupedSigners1Signers1, + groupedSigners1Signers2, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners( + group: "Group #1", + order: 0, + signers: groupedSigners1Signers + ); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners( + group: "Group #2", + order: 1, + signers: groupedSigners2Signers + ); + + var groupedSigners = new List + { + groupedSigners1, + groupedSigners2, + }; + + var signatureRequestSendRequest = new SignatureRequestSendRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSend( + signatureRequestSendRequest: signatureRequestSendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendWithTemplateExample.cs new file mode 100644 index 000000000..024b92ce8 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestSendWithTemplateExample.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( + name: "Cost", + editor: "Client", + required: true, + value: "$20,000" + ); + + var customFields = new List + { + customFields1, + }; + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest: signatureRequestSendWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSendWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestUpdateExample.cs new file mode 100644 index 000000000..7d9551620 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/SignatureRequestUpdateExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest( + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com" + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestUpdate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestUpdateRequest: signatureRequestUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberAccountIdExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberAccountIdExample.cs new file mode 100644 index 000000000..fe700fca7 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberAccountIdExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamAddMemberAccountIdExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamAddMemberRequest = new TeamAddMemberRequest( + accountId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + try + { + var response = new TeamApi(config).TeamAddMember( + teamAddMemberRequest: teamAddMemberRequest, + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamAddMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberExample.cs new file mode 100644 index 000000000..3529c6ee0 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamAddMemberExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamAddMemberExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamAddMemberRequest = new TeamAddMemberRequest( + emailAddress: "george@example.com" + ); + + try + { + var response = new TeamApi(config).TeamAddMember( + teamAddMemberRequest: teamAddMemberRequest, + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamAddMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamCreateExample.cs new file mode 100644 index 000000000..794c4627d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamCreateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamCreateRequest = new TeamCreateRequest( + name: "New Team Name" + ); + + try + { + var response = new TeamApi(config).TeamCreate( + teamCreateRequest: teamCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamDeleteExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamDeleteExample.cs new file mode 100644 index 000000000..b5c7a83b4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamDeleteExample.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new TeamApi(config).TeamDelete(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamGetExample.cs new file mode 100644 index 000000000..3a79cd2a4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamGetExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamGet(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInfoExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInfoExample.cs new file mode 100644 index 000000000..a761bce3c --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInfoExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamInfoExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamInfo( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamInfo: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInvitesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInvitesExample.cs new file mode 100644 index 000000000..90454cbac --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamInvitesExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamInvitesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamInvites(); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamInvites: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamMembersExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamMembersExample.cs new file mode 100644 index 000000000..72213f8a7 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamMembersExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamMembersExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamMembers( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamMembers: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberAccountIdExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberAccountIdExample.cs new file mode 100644 index 000000000..0c6ae21a3 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberAccountIdExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamRemoveMemberAccountIdExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( + accountId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + try + { + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberExample.cs new file mode 100644 index 000000000..23aeff1ff --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamRemoveMemberExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamRemoveMemberExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com" + ); + + try + { + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSubTeamsExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSubTeamsExample.cs new file mode 100644 index 000000000..1760310a5 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamSubTeamsExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamSubTeamsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TeamApi(config).TeamSubTeams( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamSubTeams: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TeamUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamUpdateExample.cs new file mode 100644 index 000000000..355811ee4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TeamUpdateExample.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TeamUpdateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var teamUpdateRequest = new TeamUpdateRequest( + name: "New Team Name" + ); + + try + { + var response = new TeamApi(config).TeamUpdate( + teamUpdateRequest: teamUpdateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TeamApi#TeamUpdate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateAddUserExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateAddUserExample.cs new file mode 100644 index 000000000..dc4107a2f --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateAddUserExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateAddUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateAddUserRequest = new TemplateAddUserRequest( + emailAddress: "george@dropboxsign.com" + ); + + try + { + var response = new TemplateApi(config).TemplateAddUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateAddUserRequest: templateAddUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateAddUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftExample.cs new file mode 100644 index 000000000..e26574c52 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftExample.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs new file mode 100644 index 000000000..2603e2c47 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs new file mode 100644 index 000000000..e4edd18b4 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..cb3fd770d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles + ); + + try + { + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateExample.cs new file mode 100644 index 000000000..09fad4bd6 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateExample.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldGroupsExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldGroupsExample.cs new file mode 100644 index 000000000..b8c56e791 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldGroupsExample.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldGroups: formFieldGroups, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldRulesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldRulesExample.cs new file mode 100644 index 000000000..9b3fcf144 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldRulesExample.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldRules: formFieldRules, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldsPerDocumentExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..503e80645 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateCreateFormFieldsPerDocumentExample.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateCreateFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 + ); + + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( + name: "Full Name", + type: SubMergeField.TypeEnum.Text + ); + + var mergeFields2 = new SubMergeField( + name: "Is Registered?", + type: SubMergeField.TypeEnum.Checkbox + ); + + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var templateCreateRequest = new TemplateCreateRequest( + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields + ); + + try + { + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateDeleteExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateDeleteExample.cs new file mode 100644 index 000000000..5a49ea03f --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateDeleteExample.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateDeleteExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new TemplateApi(config).TemplateDelete( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateDelete: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsDataUriExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsDataUriExample.cs new file mode 100644 index 000000000..5c946b84a --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsDataUriExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsDataUriExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFilesAsDataUri( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsDataUri: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsFileUrlExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsFileUrlExample.cs new file mode 100644 index 000000000..3b5bc98f1 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesAsFileUrlExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsFileUrlExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFilesAsFileUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + forceDownload: 1 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsFileUrl: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesExample.cs new file mode 100644 index 000000000..0cf55f3a6 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateFilesExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); + fileStream.Close(); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateGetExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateGetExample.cs new file mode 100644 index 000000000..067300032 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateGetExample.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateGetExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateGet( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateGet: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateListExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateListExample.cs new file mode 100644 index 000000000..4d0b900bf --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateListExample.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateListExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + var response = new TemplateApi(config).TemplateList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateList: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateRemoveUserExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateRemoveUserExample.cs new file mode 100644 index 000000000..66bcbfe53 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateRemoveUserExample.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateRemoveUserExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateRemoveUserRequest = new TemplateRemoveUserRequest( + emailAddress: "george@dropboxsign.com" + ); + + try + { + var response = new TemplateApi(config).TemplateRemoveUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateRemoveUserRequest: templateRemoveUserRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateRemoveUser: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateFilesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateFilesExample.cs new file mode 100644 index 000000000..1fe2ccf5e --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateFilesExample.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class TemplateUpdateFilesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest( + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new TemplateApi(config).TemplateUpdateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateUpdateFilesRequest: templateUpdateFilesRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling TemplateApi#TemplateUpdateFiles: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedExample.cs new file mode 100644 index 000000000..4637922b5 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedExample.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs new file mode 100644 index 000000000..58e77d162 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs new file mode 100644 index 000000000..84dd5270d --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..f9b29f003 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs new file mode 100644 index 000000000..2fea6ff83 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@dropboxsign.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signers1 = new SubUnclaimedDraftTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest: unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateExample.cs new file mode 100644 index 000000000..e5080a671 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateExample.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signers1 = new SubUnclaimedDraftSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers = new List + { + signers1, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signers: signers + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldGroupsExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldGroupsExample.cs new file mode 100644 index 000000000..b5ae35929 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldGroupsExample.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldGroupsExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldGroups1 = new SubFormFieldGroup( + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1" + ); + + var formFieldGroups = new List + { + formFieldGroups1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1 + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldRulesExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldRulesExample.cs new file mode 100644 index 000000000..b37690019 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldRulesExample.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldRulesExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger( + id: "uniqueIdHere_1", + varOperator: SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo" + ); + + var formFieldRules1Triggers = new List + { + formFieldRules1Triggers1, + }; + + var formFieldRules1Actions1 = new SubFormFieldRuleAction( + hidden: true, + type: SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2" + ); + + var formFieldRules1Actions = new List + { + formFieldRules1Actions1, + }; + + var formFieldRules1 = new SubFormFieldRule( + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions + ); + + var formFieldRules = new List + { + formFieldRules1, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs new file mode 100644 index 000000000..86eae8aea --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateFormFieldsPerDocumentExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( + type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftEditAndResendExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftEditAndResendExample.cs new file mode 100644 index 000000000..459364b01 --- /dev/null +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/UnclaimedDraftEditAndResendExample.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftEditAndResendExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false + ); + + try + { + var response = new UnclaimedDraftApi(config).UnclaimedDraftEditAndResend( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimedDraftEditAndResendRequest: unclaimedDraftEditAndResendRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftEditAndResend: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} diff --git a/sandbox/dotnet/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/dotnet/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/dotnet/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/dotnet/test_fixtures/SignatureRequestSendRequest.json b/sandbox/dotnet/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/dotnet/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/dotnet/test_fixtures/pdf-sample.pdf b/sandbox/dotnet/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/dotnet/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/java-v1/pom.xml b/sandbox/java-v1/pom.xml deleted file mode 100644 index 326905ec6..000000000 --- a/sandbox/java-v1/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - com.dropbox.sign_sandbox - DropboxSignSandbox - 1.0-SNAPSHOT - - - 9 - 9 - UTF-8 - - - - - com.dropbox.sign - dropbox-sign - ^1.0.0-beta - system - ${pom.basedir}/artifacts/dropbox-sign.jar - - - junit - junit - 4.13.1 - test - - - junit - junit - 4.13.1 - test - - - - diff --git a/sandbox/java-v1/src/main/java/com/dropbox/sign_sandbox/Main.java b/sandbox/java-v1/src/main/java/com/dropbox/sign_sandbox/Main.java deleted file mode 100644 index 1579ee556..000000000 --- a/sandbox/java-v1/src/main/java/com/dropbox/sign_sandbox/Main.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiClient; -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 Main { - public static void main(String[] args) { - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - ApiClient apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - AccountApi api = new AccountApi(apiClient); - - AccountCreateRequest data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = api.accountCreate(data); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling Dropbox Sign API"); - 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/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.config.dist.json b/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.gitignore b/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java b/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java deleted file mode 100644 index d0df6afe9..000000000 --- a/sandbox/java-v1/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.JSON; -import com.dropbox.sign.api.EmbeddedApi; -import com.dropbox.sign.api.SignatureRequestApi; -import com.dropbox.sign.model.*; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import org.junit.Assert; -import org.junit.Test; - -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class SignatureRequestTest { - public static JsonNode getConfig() throws Exception { - ObjectMapper objectMapper = JSON.getDefault().getMapper(); - - JsonNode configCustom = objectMapper.readTree(Files.newInputStream( - Paths.get("src/test/com/dropbox/sign_sandbox/.config.json") - )); - JsonNode configDist = objectMapper.readTree(Files.newInputStream( - Paths.get("src/test/com/dropbox/sign_sandbox/.config.dist.json") - )); - - ObjectReader updater = objectMapper.readerForUpdating(configDist); - - return updater.readValue(configCustom); - } - - public static JsonNode getJsonContents(String filename) throws Exception { - ObjectMapper objectMapper = JSON.getDefault().getMapper(); - return objectMapper.readTree(Files.newInputStream( - Paths.get("test_fixtures/" + filename) - )); - } - - @Test - public void testSend() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestSendRequest.json"); - - SignatureRequestSendRequest sendRequest = SignatureRequestSendRequest.init(data.toString()); - sendRequest.addFilesItem(new File("test_fixtures/pdf-sample.pdf")); - - SignatureRequestGetResponse sendResponse = signatureRequestApi.signatureRequestSend(sendRequest); - - Assert.assertEquals( - sendRequest.getFormFieldsPerDocument().get(0).getApiId(), - sendResponse.getSignatureRequest().getCustomFields().get(0).getApiId() - ); - - Assert.assertEquals( - sendRequest.getSigners().get(0).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(0).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(1).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(1).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(2).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(2).getSignerEmailAddress() - ); - - SignatureRequestGetResponse getResponse = signatureRequestApi.signatureRequestGet( - sendResponse.getSignatureRequest().getSignatureRequestId() - ); - - Assert.assertEquals( - sendResponse.getSignatureRequest().getSignatureRequestId(), - getResponse.getSignatureRequest().getSignatureRequestId() - ); - } - - @Test - public void testCreateEmbedded() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestCreateEmbeddedRequest.json"); - - SignatureRequestCreateEmbeddedRequest sendRequest = SignatureRequestCreateEmbeddedRequest.init(data.toString()); - sendRequest.addFilesItem(new File("test_fixtures/pdf-sample.pdf")); - sendRequest.clientId(config.findPath("CLIENT_ID").textValue()); - - SignatureRequestGetResponse sendResponse = signatureRequestApi.signatureRequestCreateEmbedded(sendRequest); - - Assert.assertEquals( - sendRequest.getSigners().get(0).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(0).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(1).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(1).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(2).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(2).getSignerEmailAddress() - ); - - EmbeddedApi embeddedApi = new EmbeddedApi(apiClient); - - EmbeddedSignUrlResponse getResponse = embeddedApi.embeddedSignUrl( - sendResponse.getSignatureRequest().getSignatures().get(0).getSignatureId() - ); - - Assert.assertNotNull(getResponse.getEmbedded().getSignUrl()); - } - - @Test - public void testSendWithoutFileError() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestSendRequest.json"); - SignatureRequestSendRequest sendRequest = SignatureRequestSendRequest.init(data.toString()); - - try { - signatureRequestApi.signatureRequestSend(sendRequest); - Assert.fail(); - } catch (ApiException e) { - Assert.assertEquals("file", e.getErrorResponse().getError().getErrorPath()); - } - } -} diff --git a/sandbox/java-v1/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/java-v1/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/java-v1/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/java-v1/test_fixtures/SignatureRequestSendRequest.json b/sandbox/java-v1/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/java-v1/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/java-v1/test_fixtures/pdf-sample.pdf b/sandbox/java-v1/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/java-v1/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/java-v2/pom.xml b/sandbox/java-v2/pom.xml deleted file mode 100644 index 67f2456ad..000000000 --- a/sandbox/java-v2/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - 4.0.0 - - com.dropbox.sign_sandbox - DropboxSignSandbox - 1.0-SNAPSHOT - - - 11 - 11 - UTF-8 - - - - - com.dropbox.sign - dropbox-sign - ^2.0.0-beta - system - ${pom.basedir}/artifacts/dropbox-sign.jar - - - junit - junit - 4.13.1 - test - - - - diff --git a/sandbox/java-v2/src/main/java/com/dropbox/sign_sandbox/Main.java b/sandbox/java-v2/src/main/java/com/dropbox/sign_sandbox/Main.java deleted file mode 100644 index 16673775c..000000000 --- a/sandbox/java-v2/src/main/java/com/dropbox/sign_sandbox/Main.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.dropbox.sign_sandbox; - -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 Main { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var oauth2 = (HttpBearerAuth) apiClient - .getAuthentication("oauth2"); - oauth2.setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var api = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = api.accountCreate(data); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling Dropbox Sign API"); - 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/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.config.dist.json b/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.gitignore b/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java b/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java deleted file mode 100644 index d0df6afe9..000000000 --- a/sandbox/java-v2/src/test/com/dropbox/sign_sandbox/SignatureRequestTest.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.JSON; -import com.dropbox.sign.api.EmbeddedApi; -import com.dropbox.sign.api.SignatureRequestApi; -import com.dropbox.sign.model.*; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import org.junit.Assert; -import org.junit.Test; - -import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; - -public class SignatureRequestTest { - public static JsonNode getConfig() throws Exception { - ObjectMapper objectMapper = JSON.getDefault().getMapper(); - - JsonNode configCustom = objectMapper.readTree(Files.newInputStream( - Paths.get("src/test/com/dropbox/sign_sandbox/.config.json") - )); - JsonNode configDist = objectMapper.readTree(Files.newInputStream( - Paths.get("src/test/com/dropbox/sign_sandbox/.config.dist.json") - )); - - ObjectReader updater = objectMapper.readerForUpdating(configDist); - - return updater.readValue(configCustom); - } - - public static JsonNode getJsonContents(String filename) throws Exception { - ObjectMapper objectMapper = JSON.getDefault().getMapper(); - return objectMapper.readTree(Files.newInputStream( - Paths.get("test_fixtures/" + filename) - )); - } - - @Test - public void testSend() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestSendRequest.json"); - - SignatureRequestSendRequest sendRequest = SignatureRequestSendRequest.init(data.toString()); - sendRequest.addFilesItem(new File("test_fixtures/pdf-sample.pdf")); - - SignatureRequestGetResponse sendResponse = signatureRequestApi.signatureRequestSend(sendRequest); - - Assert.assertEquals( - sendRequest.getFormFieldsPerDocument().get(0).getApiId(), - sendResponse.getSignatureRequest().getCustomFields().get(0).getApiId() - ); - - Assert.assertEquals( - sendRequest.getSigners().get(0).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(0).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(1).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(1).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(2).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(2).getSignerEmailAddress() - ); - - SignatureRequestGetResponse getResponse = signatureRequestApi.signatureRequestGet( - sendResponse.getSignatureRequest().getSignatureRequestId() - ); - - Assert.assertEquals( - sendResponse.getSignatureRequest().getSignatureRequestId(), - getResponse.getSignatureRequest().getSignatureRequestId() - ); - } - - @Test - public void testCreateEmbedded() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestCreateEmbeddedRequest.json"); - - SignatureRequestCreateEmbeddedRequest sendRequest = SignatureRequestCreateEmbeddedRequest.init(data.toString()); - sendRequest.addFilesItem(new File("test_fixtures/pdf-sample.pdf")); - sendRequest.clientId(config.findPath("CLIENT_ID").textValue()); - - SignatureRequestGetResponse sendResponse = signatureRequestApi.signatureRequestCreateEmbedded(sendRequest); - - Assert.assertEquals( - sendRequest.getSigners().get(0).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(0).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(1).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(1).getSignerEmailAddress() - ); - Assert.assertEquals( - sendRequest.getSigners().get(2).getEmailAddress(), - sendResponse.getSignatureRequest().getSignatures().get(2).getSignerEmailAddress() - ); - - EmbeddedApi embeddedApi = new EmbeddedApi(apiClient); - - EmbeddedSignUrlResponse getResponse = embeddedApi.embeddedSignUrl( - sendResponse.getSignatureRequest().getSignatures().get(0).getSignatureId() - ); - - Assert.assertNotNull(getResponse.getEmbedded().getSignUrl()); - } - - @Test - public void testSendWithoutFileError() throws Exception { - JsonNode config = getConfig(); - - ApiClient apiClient = Configuration.getDefaultApiClient() - .setApiKey(config.findPath("API_KEY").textValue()) - .setBasePath(config.findPath("BASE_URL").textValue()); - - SignatureRequestApi signatureRequestApi = new SignatureRequestApi(apiClient); - - JsonNode data = getJsonContents("SignatureRequestSendRequest.json"); - SignatureRequestSendRequest sendRequest = SignatureRequestSendRequest.init(data.toString()); - - try { - signatureRequestApi.signatureRequestSend(sendRequest); - Assert.fail(); - } catch (ApiException e) { - Assert.assertEquals("file", e.getErrorResponse().getError().getErrorPath()); - } - } -} diff --git a/sandbox/java-v2/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/java-v2/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/java-v2/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/java-v2/test_fixtures/SignatureRequestSendRequest.json b/sandbox/java-v2/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/java-v2/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/java-v2/test_fixtures/pdf-sample.pdf b/sandbox/java-v2/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/java-v2/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/java/.gitignore b/sandbox/java/.gitignore new file mode 100644 index 000000000..4e6b64722 --- /dev/null +++ b/sandbox/java/.gitignore @@ -0,0 +1,7 @@ +.gradle +.idea +build +gradle +gradlew +gradlew.bat +target diff --git a/sandbox/java/DropboxSignSandbox.iml b/sandbox/java/DropboxSignSandbox.iml new file mode 100644 index 000000000..1d69dfd4f --- /dev/null +++ b/sandbox/java/DropboxSignSandbox.iml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sandbox/java/build.gradle b/sandbox/java/build.gradle new file mode 100644 index 000000000..c9961ae6e --- /dev/null +++ b/sandbox/java/build.gradle @@ -0,0 +1,109 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' + +group = 'com.dropbox.sign_sandbox' +version = '1.0.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +apply plugin: 'java' +apply plugin: 'maven-publish' + +publishing { + publications { + maven(MavenPublication) { + artifactId = 'dropbox-sign' + from components.java + } + } +} + +task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath +} + +ext { + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation fileTree(dir: 'artifacts', include: ['dropbox-sign.jar']) + implementation 'io.swagger:swagger-annotations:1.6.8' + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateExample.java new file mode 100644 index 000000000..2743ffa13 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); + } 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateOauthExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateOauthExample.java new file mode 100644 index 000000000..e6ae95b94 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountCreateOauthExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateOauthExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + accountCreateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + accountCreateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); + } 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountGetExample.java new file mode 100644 index 000000000..b1f712ace --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountGetExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountGet( + null, // accountId + null // emailAddress + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountUpdateExample.java new file mode 100644 index 000000000..c1d2f1ca2 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountUpdateExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountUpdateRequest = new AccountUpdateRequest(); + accountUpdateRequest.callbackUrl("https://www.example.com/callback"); + accountUpdateRequest.locale("en-US"); + + try + { + var response = new AccountApi(config).accountUpdate( + accountUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountUpdate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountVerifyExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountVerifyExample.java new file mode 100644 index 000000000..5180f6772 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/AccountVerifyExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountVerifyExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountVerifyRequest = new AccountVerifyRequest(); + accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountVerify( + accountVerifyRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountVerify"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppCreateExample.java new file mode 100644 index 000000000..2d81a97b1 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppCreateExample.java @@ -0,0 +1,61 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppCreateRequest = new ApiAppCreateRequest(); + apiAppCreateRequest.name("My Production App"); + apiAppCreateRequest.domains(List.of ( + "example.com" + )); + apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppCreateRequest.oauth(oauth); + apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppCreate( + apiAppCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppDeleteExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppDeleteExample.java new file mode 100644 index 000000000..aa23b5f0c --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppDeleteExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new ApiAppApi(config).apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppDelete"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppGetExample.java new file mode 100644 index 000000000..6ad075b4b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppListExample.java new file mode 100644 index 000000000..073756800 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppListExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppUpdateExample.java new file mode 100644 index 000000000..ee6290b5e --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ApiAppUpdateExample.java @@ -0,0 +1,63 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppUpdateRequest = new ApiAppUpdateRequest(); + apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); + apiAppUpdateRequest.name("New Name"); + apiAppUpdateRequest.domains(List.of ( + "example.com" + )); + apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppUpdateRequest.oauth(oauth); + apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobGetExample.java new file mode 100644 index 000000000..da4680b15 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobGetExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobListExample.java new file mode 100644 index 000000000..9c9b835e5 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/BulkSendJobListExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedEditUrlExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedEditUrlExample.java new file mode 100644 index 000000000..a1097bd5c --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedEditUrlExample.java @@ -0,0 +1,50 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedEditUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var mergeFields = new ArrayList(List.of ()); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); + embeddedEditUrlRequest.ccRoles(List.of ( + "" + )); + embeddedEditUrlRequest.mergeFields(mergeFields); + + try + { + var response = new EmbeddedApi(config).embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedSignUrlExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedSignUrlExample.java new file mode 100644 index 000000000..45b7f5040 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EmbeddedSignUrlExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedSignUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new EmbeddedApi(config).embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EventCallbackExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EventCallbackExample.java new file mode 100644 index 000000000..37d245133 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/EventCallbackExample.java @@ -0,0 +1,39 @@ +import com.dropbox.sign.EventCallbackHelper; +import com.dropbox.sign.model.EventCallbackRequest; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.HashMap; + +public class EventCallbackExample { + public static void main(String[] args) throws Exception { + // use your API key + var apiKey = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782"; + + // callbackData represents data we send to you + var callbackData = new HashMap<>() {{ + put("event", new HashMap<>() {{ + put("event_type", "account_confirmed"); + put("event_time", "1669926463"); + put("event_hash", "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f"); + put("event_metadata", new HashMap<>() {{ + put("related_signature_id", null); + put("reported_for_account_id", "6421d70b9bd45059fa207d03ab8d1b96515b472c"); + put("reported_for_app_id", null); + put("event_message", null); + }}); + }}); + }}; + + var callbackEvent = EventCallbackRequest.init( + new ObjectMapper().writeValueAsString(callbackData) + ); + + // verify that a callback came from HelloSign.com + if (EventCallbackHelper.isValid(apiKey, callbackEvent)) { + // one of "account_callback" or "api_app_callback" + var callbackType = EventCallbackHelper.getCallbackType(callbackEvent); + + // do your magic below! + } + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxDeleteExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxDeleteExample.java new file mode 100644 index 000000000..f31f0ea99 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxDeleteExample.java @@ -0,0 +1,38 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new FaxApi(config).faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxDelete"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxFilesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxFilesExample.java new file mode 100644 index 000000000..a9e1f1728 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxFilesExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxFiles"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxGetExample.java new file mode 100644 index 000000000..1500980aa --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAddUserExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAddUserExample.java new file mode 100644 index 000000000..d18bd73f6 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAddUserExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineAddUserRequest = new FaxLineAddUserRequest(); + faxLineAddUserRequest.number("[FAX_NUMBER]"); + faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineAddUser( + faxLineAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAreaCodeGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAreaCodeGetExample.java new file mode 100644 index 000000000..57d64b40b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineAreaCodeGetExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAreaCodeGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineAreaCodeGet( + "US", // country + null, // state + null, // province + null // city + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineCreateExample.java new file mode 100644 index 000000000..1c765fc97 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineCreateRequest = new FaxLineCreateRequest(); + faxLineCreateRequest.areaCode(209); + faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); + + try + { + var response = new FaxLineApi(config).faxLineCreate( + faxLineCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineDeleteExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineDeleteExample.java new file mode 100644 index 000000000..8516f8f63 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineDeleteExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineDeleteRequest = new FaxLineDeleteRequest(); + faxLineDeleteRequest.number("[FAX_NUMBER]"); + + try + { + new FaxLineApi(config).faxLineDelete( + faxLineDeleteRequest + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineDelete"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineGetExample.java new file mode 100644 index 000000000..5784253bb --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineGetExample.java @@ -0,0 +1,40 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineGet( + "123-123-1234" // number + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineListExample.java new file mode 100644 index 000000000..0facd7cfe --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineListExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + null // showTeamLines + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineRemoveUserExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineRemoveUserExample.java new file mode 100644 index 000000000..f815f362b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxLineRemoveUserExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); + faxLineRemoveUserRequest.number("[FAX_NUMBER]"); + faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineRemoveUser( + faxLineRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxListExample.java new file mode 100644 index 000000000..c44f536b9 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxListExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxSendExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxSendExample.java new file mode 100644 index 000000000..9648b871a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/FaxSendExample.java @@ -0,0 +1,52 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxSendRequest = new FaxSendRequest(); + faxSendRequest.recipient("16690000001"); + faxSendRequest.sender("16690000000"); + faxSendRequest.testMode(true); + faxSendRequest.coverPageTo("Jill Fax"); + faxSendRequest.coverPageFrom("Faxer Faxerson"); + faxSendRequest.coverPageMessage("I'm sending you a fax!"); + faxSendRequest.title("This is what the fax is about!"); + faxSendRequest.files(List.of ( + new File("./example_fax.pdf") + )); + + try + { + var response = new FaxApi(config).faxSend( + faxSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxSend"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/Main.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/Main.java new file mode 100644 index 000000000..c8c8cea26 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/Main.java @@ -0,0 +1,6 @@ +package com.dropbox.sign_sandbox; + +public class Main { + public static void main(String[] args) { + } +} diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenGenerateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenGenerateExample.java new file mode 100644 index 000000000..24bbb65c6 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenGenerateExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenGenerateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); + oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); + oAuthTokenGenerateRequest.state("900e06e2"); + oAuthTokenGenerateRequest.grantType("authorization_code"); + + try + { + var response = new OAuthApi(config).oauthTokenGenerate( + oAuthTokenGenerateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenRefreshExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenRefreshExample.java new file mode 100644 index 000000000..f79562e02 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/OauthTokenRefreshExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenRefreshExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); + oAuthTokenRefreshRequest.grantType("refresh_token"); + oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + + try + { + var response = new OAuthApi(config).oauthTokenRefresh( + oAuthTokenRefreshRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ReportCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ReportCreateExample.java new file mode 100644 index 000000000..2f0013c1a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/ReportCreateExample.java @@ -0,0 +1,48 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ReportCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var reportCreateRequest = new ReportCreateRequest(); + reportCreateRequest.startDate("09/01/2020"); + reportCreateRequest.endDate("09/01/2020"); + reportCreateRequest.reportType(List.of ( + ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, + ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS + )); + + try + { + var response = new ReportApi(config).reportCreate( + reportCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ReportApi#reportCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..a5bec1fb9 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,108 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkSendWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkSendWithTemplateExample.java new file mode 100644 index 000000000..b539626e0 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestBulkSendWithTemplateExample.java @@ -0,0 +1,108 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); + signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkSendWithTemplateRequest.testMode(true); + signatureRequestBulkSendWithTemplateRequest.signerList(signerList); + signatureRequestBulkSendWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCancelExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCancelExample.java new file mode 100644 index 000000000..076a73d1d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCancelExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCancelExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new SignatureRequestApi(config).signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedExample.java new file mode 100644 index 000000000..5193cee20 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedExample.java @@ -0,0 +1,79 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.java new file mode 100644 index 000000000..b069e2001 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedGroupedSignersExample.java @@ -0,0 +1,105 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..309d422ee --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,68 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); + signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedExample.java new file mode 100644 index 000000000..c69cc85e4 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedExample.java @@ -0,0 +1,80 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedGroupedSignersExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedGroupedSignersExample.java new file mode 100644 index 000000000..d526e3d88 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedGroupedSignersExample.java @@ -0,0 +1,106 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..b0c034f3b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditEmbeddedWithTemplateExample.java @@ -0,0 +1,69 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); + signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditExample.java new file mode 100644 index 000000000..ee628deef --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditExample.java @@ -0,0 +1,89 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditGroupedSignersExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditGroupedSignersExample.java new file mode 100644 index 000000000..934764bdd --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditGroupedSignersExample.java @@ -0,0 +1,115 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditWithTemplateExample.java new file mode 100644 index 000000000..d755e4e03 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestEditWithTemplateExample.java @@ -0,0 +1,88 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); + signatureRequestEditWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditWithTemplateRequest.testMode(true); + signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditWithTemplateRequest.signers(signers); + signatureRequestEditWithTemplateRequest.ccs(ccs); + signatureRequestEditWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsDataUriExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsDataUriExample.java new file mode 100644 index 000000000..a7e5a36e8 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsDataUriExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsFileUrlExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsFileUrlExample.java new file mode 100644 index 000000000..2a024ee7d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesAsFileUrlExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesExample.java new file mode 100644 index 000000000..53e828103 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestFilesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf" // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestGetExample.java new file mode 100644 index 000000000..dc912723d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestListExample.java new file mode 100644 index 000000000..72048a036 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestListExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestReleaseHoldExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestReleaseHoldExample.java new file mode 100644 index 000000000..a7fd42c40 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestReleaseHoldExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestReleaseHoldExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemindExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemindExample.java new file mode 100644 index 000000000..ce292ba16 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemindExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemindExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); + signatureRequestRemindRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemoveExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemoveExample.java new file mode 100644 index 000000000..e9b030a26 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestRemoveExample.java @@ -0,0 +1,38 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemoveExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new SignatureRequestApi(config).signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendExample.java new file mode 100644 index 000000000..313b895b7 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendExample.java @@ -0,0 +1,88 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendGroupedSignersExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendGroupedSignersExample.java new file mode 100644 index 000000000..ba078573a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendGroupedSignersExample.java @@ -0,0 +1,114 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendGroupedSignersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var groupedSigners2Signers1 = new SubSignatureRequestSigner(); + groupedSigners2Signers1.name("Bob"); + groupedSigners2Signers1.emailAddress("bob@example.com"); + + var groupedSigners2Signers2 = new SubSignatureRequestSigner(); + groupedSigners2Signers2.name("Charlie"); + groupedSigners2Signers2.emailAddress("charlie@example.com"); + + var groupedSigners2Signers = new ArrayList(List.of ( + groupedSigners2Signers1, + groupedSigners2Signers2 + )); + + var groupedSigners1Signers1 = new SubSignatureRequestSigner(); + groupedSigners1Signers1.name("Jack"); + groupedSigners1Signers1.emailAddress("jack@example.com"); + + var groupedSigners1Signers2 = new SubSignatureRequestSigner(); + groupedSigners1Signers2.name("Jill"); + groupedSigners1Signers2.emailAddress("jill@example.com"); + + var groupedSigners1Signers = new ArrayList(List.of ( + groupedSigners1Signers1, + groupedSigners1Signers2 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var groupedSigners1 = new SubSignatureRequestGroupedSigners(); + groupedSigners1.group("Group #1"); + groupedSigners1.order(0); + groupedSigners1.signers(groupedSigners1Signers); + + var groupedSigners2 = new SubSignatureRequestGroupedSigners(); + groupedSigners2.group("Group #2"); + groupedSigners2.order(1); + groupedSigners2.signers(groupedSigners2Signers); + + var groupedSigners = new ArrayList(List.of ( + groupedSigners1, + groupedSigners2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.groupedSigners(groupedSigners); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendWithTemplateExample.java new file mode 100644 index 000000000..f44a67ed9 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestSendWithTemplateExample.java @@ -0,0 +1,87 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); + signatureRequestSendWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestSendWithTemplateRequest.testMode(true); + signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); + signatureRequestSendWithTemplateRequest.signers(signers); + signatureRequestSendWithTemplateRequest.ccs(ccs); + signatureRequestSendWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestUpdateExample.java new file mode 100644 index 000000000..3500c76c5 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/SignatureRequestUpdateExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); + signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); + signatureRequestUpdateRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberAccountIdExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberAccountIdExample.java new file mode 100644 index 000000000..1aea5849a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberAccountIdExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberAccountIdExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.accountId("f57db65d3f933b5316d398057a36176831451a35"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberExample.java new file mode 100644 index 000000000..6e3af4073 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamAddMemberExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamCreateExample.java new file mode 100644 index 000000000..ecfe2329d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamCreateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamDeleteExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamDeleteExample.java new file mode 100644 index 000000000..076a2e520 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamDeleteExample.java @@ -0,0 +1,37 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TeamApi(config).teamDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamDelete"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamGetExample.java new file mode 100644 index 000000000..8ab6d7468 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamGetExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamGet(); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInfoExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInfoExample.java new file mode 100644 index 000000000..6f2c882a0 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInfoExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInfoExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInfo"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInvitesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInvitesExample.java new file mode 100644 index 000000000..f6d2b55c1 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamInvitesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInvitesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInvites( + null // emailAddress + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInvites"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamMembersExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamMembersExample.java new file mode 100644 index 000000000..74999477f --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamMembersExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamMembersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamMembers"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberAccountIdExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberAccountIdExample.java new file mode 100644 index 000000000..d2d4dede2 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberAccountIdExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberAccountIdExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.accountId("f57db65d3f933b5316d398057a36176831451a35"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamRemoveMember"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberExample.java new file mode 100644 index 000000000..e68187a2f --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamRemoveMemberExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamRemoveMember"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSubTeamsExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSubTeamsExample.java new file mode 100644 index 000000000..4ab0bc0d7 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamSubTeamsExample.java @@ -0,0 +1,43 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamSubTeamsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSubTeams"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamUpdateExample.java new file mode 100644 index 000000000..e81903238 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TeamUpdateExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamUpdate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateAddUserExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateAddUserExample.java new file mode 100644 index 000000000..3649e46f4 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateAddUserExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateAddUserRequest = new TemplateAddUserRequest(); + templateAddUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateAddUser"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftExample.java new file mode 100644 index 000000000..bf7c9720d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftExample.java @@ -0,0 +1,86 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java new file mode 100644 index 000000000..1a7ff9bb4 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldGroupsExample.java @@ -0,0 +1,132 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldGroups(formFieldGroups); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.java new file mode 100644 index 000000000..05ec5ab5d --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldRulesExample.java @@ -0,0 +1,148 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldRules(formFieldRules); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..8ac9bae17 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateExample.java new file mode 100644 index 000000000..ebf652f91 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldGroupsExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldGroupsExample.java new file mode 100644 index 000000000..62f5094e7 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldGroupsExample.java @@ -0,0 +1,132 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.formFieldGroups(formFieldGroups); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldRulesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldRulesExample.java new file mode 100644 index 000000000..7a97f0b8b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldRulesExample.java @@ -0,0 +1,148 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.formFieldRules(formFieldRules); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldsPerDocumentExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..9873668b7 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateCreateFormFieldsPerDocumentExample.java @@ -0,0 +1,120 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateDeleteExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateDeleteExample.java new file mode 100644 index 000000000..6ca874681 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateDeleteExample.java @@ -0,0 +1,39 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TemplateApi(config).templateDelete( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateDelete"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsDataUriExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsDataUriExample.java new file mode 100644 index 000000000..02c9b69ca --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsDataUriExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsFileUrlExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsFileUrlExample.java new file mode 100644 index 000000000..2b316f92b --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesAsFileUrlExample.java @@ -0,0 +1,42 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesExample.java new file mode 100644 index 000000000..d003de835 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateFilesExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + null // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFiles"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateGetExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateGetExample.java new file mode 100644 index 000000000..2aabdc6bc --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateGetExample.java @@ -0,0 +1,41 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateGet( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateGet"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateListExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateListExample.java new file mode 100644 index 000000000..29e115b74 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateListExample.java @@ -0,0 +1,44 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateList"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateRemoveUserExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateRemoveUserExample.java new file mode 100644 index 000000000..7d29ffac9 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateRemoveUserExample.java @@ -0,0 +1,45 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateRemoveUserRequest = new TemplateRemoveUserRequest(); + templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateRemoveUser"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateFilesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateFilesExample.java new file mode 100644 index 000000000..8f36d7626 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateFilesExample.java @@ -0,0 +1,47 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateUpdateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); + templateUpdateFilesRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new TemplateApi(config).templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedExample.java new file mode 100644 index 000000000..e6bc38ff1 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedExample.java @@ -0,0 +1,49 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(true); + unclaimedDraftCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java new file mode 100644 index 000000000..b9918381a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.java @@ -0,0 +1,95 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldGroups(formFieldGroups); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java new file mode 100644 index 000000000..1564f7803 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.java @@ -0,0 +1,111 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldRules(formFieldRules); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..2ec3a17e9 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.java @@ -0,0 +1,83 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(false); + unclaimedDraftCreateEmbeddedRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.java new file mode 100644 index 000000000..1b888876a --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateEmbeddedWithTemplateExample.java @@ -0,0 +1,68 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@dropboxsign.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signers1 = new SubUnclaimedDraftTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); + unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); + unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); + unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateExample.java new file mode 100644 index 000000000..770bc0520 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateExample.java @@ -0,0 +1,58 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signers1 = new SubUnclaimedDraftSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(true); + unclaimedDraftCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + unclaimedDraftCreateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldGroupsExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldGroupsExample.java new file mode 100644 index 000000000..1daa8d594 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldGroupsExample.java @@ -0,0 +1,94 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldGroupsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldGroups1 = new SubFormFieldGroup(); + formFieldGroups1.groupId("RadioItemGroup1"); + formFieldGroups1.groupLabel("Radio Item Group 1"); + formFieldGroups1.requirement("require_0-1"); + + var formFieldGroups = new ArrayList(List.of ( + formFieldGroups1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("radio"); + formFieldsPerDocument1.required(false); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(18); + formFieldsPerDocument1.height(18); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.group("RadioItemGroup1"); + formFieldsPerDocument1.isChecked(true); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentRadio(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("radio"); + formFieldsPerDocument2.required(false); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(18); + formFieldsPerDocument2.height(18); + formFieldsPerDocument2.x(112); + formFieldsPerDocument2.y(370); + formFieldsPerDocument2.group("RadioItemGroup1"); + formFieldsPerDocument2.isChecked(false); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldGroups(formFieldGroups); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldRulesExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldRulesExample.java new file mode 100644 index 000000000..dc123db9f --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldRulesExample.java @@ -0,0 +1,110 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldRulesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldRules1Triggers1 = new SubFormFieldRuleTrigger(); + formFieldRules1Triggers1.id("uniqueIdHere_1"); + formFieldRules1Triggers1.operator(SubFormFieldRuleTrigger.OperatorEnum.IS); + formFieldRules1Triggers1.value("foo"); + + var formFieldRules1Triggers = new ArrayList(List.of ( + formFieldRules1Triggers1 + )); + + var formFieldRules1Actions1 = new SubFormFieldRuleAction(); + formFieldRules1Actions1.hidden(true); + formFieldRules1Actions1.type(SubFormFieldRuleAction.TypeEnum.CHANGE_FIELD_VISIBILITY); + formFieldRules1Actions1.fieldId("uniqueIdHere_2"); + + var formFieldRules1Actions = new ArrayList(List.of ( + formFieldRules1Actions1 + )); + + var formFieldRules1 = new SubFormFieldRule(); + formFieldRules1.id("rule_1"); + formFieldRules1.triggerOperator("AND"); + formFieldRules1.triggers(formFieldRules1Triggers); + formFieldRules1.actions(formFieldRules1Actions); + + var formFieldRules = new ArrayList(List.of ( + formFieldRules1 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("0"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldRules(formFieldRules); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.java new file mode 100644 index 000000000..5fb0e7514 --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftCreateFormFieldsPerDocumentExample.java @@ -0,0 +1,82 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateFormFieldsPerDocumentExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(false); + unclaimedDraftCreateRequest.fileUrls(List.of ( + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1" + )); + unclaimedDraftCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftEditAndResendExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftEditAndResendExample.java new file mode 100644 index 000000000..23ebe38ea --- /dev/null +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/UnclaimedDraftEditAndResendExample.java @@ -0,0 +1,46 @@ +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftEditAndResendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); + unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftEditAndResendRequest.testMode(false); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); + 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/sandbox/node/.gitignore b/sandbox/node/.gitignore new file mode 100644 index 000000000..bf28e3a64 --- /dev/null +++ b/sandbox/node/.gitignore @@ -0,0 +1,32 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +package-lock.json diff --git a/sandbox/node/Example.ts b/sandbox/node/Example.ts deleted file mode 100644 index af5e5b01d..000000000 --- a/sandbox/node/Example.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as DropboxSign from "@dropbox/sign"; - -const api = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -api.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// api.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = api.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); diff --git a/sandbox/node/package.json b/sandbox/node/package.json index 8506e51c3..11d5ee311 100644 --- a/sandbox/node/package.json +++ b/sandbox/node/package.json @@ -1,21 +1,15 @@ { "name": "@dropbox/sign-sandbox", "version": "1.0.0", - "description": "", - "main": "Example.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { "@dropbox/sign": "file:./artifacts/dropbox-sign-sdk.tgz", - "@types/jest": "^29.5.7", - "@types/node": "^20.8.10", - "jest": "^29.7.0", - "ts-jest": "^29.1.1", - "ts-node": "^10.9.1", - "typescript": "^4.0 || ^5.0" + "@types/node": "^22.12", + "ts-node": "^10.9", + "typescript": "^5.0" }, "type": "module", - "author": "", "license": "ISC" } diff --git a/sandbox/node/src/AccountCreateExample.ts b/sandbox/node/src/AccountCreateExample.ts new file mode 100644 index 000000000..bf8570a02 --- /dev/null +++ b/sandbox/node/src/AccountCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/AccountCreateOauthExample.ts b/sandbox/node/src/AccountCreateOauthExample.ts new file mode 100644 index 000000000..d77c2e560 --- /dev/null +++ b/sandbox/node/src/AccountCreateOauthExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountCreateRequest: models.AccountCreateRequest = { + emailAddress: "newuser@dropboxsign.com", + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", +}; + +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/AccountGetExample.ts b/sandbox/node/src/AccountGetExample.ts new file mode 100644 index 000000000..6bc7ae2de --- /dev/null +++ b/sandbox/node/src/AccountGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.accountGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/AccountUpdateExample.ts b/sandbox/node/src/AccountUpdateExample.ts new file mode 100644 index 000000000..3f86ffea0 --- /dev/null +++ b/sandbox/node/src/AccountUpdateExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountUpdateRequest: models.AccountUpdateRequest = { + callbackUrl: "https://www.example.com/callback", + locale: "en-US", +}; + +apiCaller.accountUpdate( + accountUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/AccountVerifyExample.ts b/sandbox/node/src/AccountVerifyExample.ts new file mode 100644 index 000000000..8b79bdf00 --- /dev/null +++ b/sandbox/node/src/AccountVerifyExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const accountVerifyRequest: models.AccountVerifyRequest = { + emailAddress: "some_user@dropboxsign.com", +}; + +apiCaller.accountVerify( + accountVerifyRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling AccountApi#accountVerify:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ApiAppCreateExample.ts b/sandbox/node/src/ApiAppCreateExample.ts new file mode 100644 index 000000000..82890bf18 --- /dev/null +++ b/sandbox/node/src/ApiAppCreateExample.ts @@ -0,0 +1,39 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppCreateRequest: models.ApiAppCreateRequest = { + name: "My Production App", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppCreate( + apiAppCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ApiAppDeleteExample.ts b/sandbox/node/src/ApiAppDeleteExample.ts new file mode 100644 index 000000000..1ffefb975 --- /dev/null +++ b/sandbox/node/src/ApiAppDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppDelete:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ApiAppGetExample.ts b/sandbox/node/src/ApiAppGetExample.ts new file mode 100644 index 000000000..4899769af --- /dev/null +++ b/sandbox/node/src/ApiAppGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ApiAppListExample.ts b/sandbox/node/src/ApiAppListExample.ts new file mode 100644 index 000000000..7304a9d1c --- /dev/null +++ b/sandbox/node/src/ApiAppListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.apiAppList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ApiAppUpdateExample.ts b/sandbox/node/src/ApiAppUpdateExample.ts new file mode 100644 index 000000000..0331942c0 --- /dev/null +++ b/sandbox/node/src/ApiAppUpdateExample.ts @@ -0,0 +1,41 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], +}; + +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { + primaryButtonColor: "#00b3e6", + primaryButtonTextColor: "#ffffff", +}; + +const apiAppUpdateRequest: models.ApiAppUpdateRequest = { + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: fs.createReadStream("CustomLogoFile.png"), + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, +}; + +apiCaller.apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/BulkSendJobGetExample.ts b/sandbox/node/src/BulkSendJobGetExample.ts new file mode 100644 index 000000000..9c3e43eb9 --- /dev/null +++ b/sandbox/node/src/BulkSendJobGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/BulkSendJobListExample.ts b/sandbox/node/src/BulkSendJobListExample.ts new file mode 100644 index 000000000..4f8b1b33b --- /dev/null +++ b/sandbox/node/src/BulkSendJobListExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling BulkSendJobApi#bulkSendJobList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/EmbeddedEditUrlExample.ts b/sandbox/node/src/EmbeddedEditUrlExample.ts new file mode 100644 index 000000000..cdfa90b80 --- /dev/null +++ b/sandbox/node/src/EmbeddedEditUrlExample.ts @@ -0,0 +1,27 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const mergeFields = [ +]; + +const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { + ccRoles: [ + "", + ], + mergeFields: mergeFields, +}; + +apiCaller.embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/EmbeddedSignUrlExample.ts b/sandbox/node/src/EmbeddedSignUrlExample.ts new file mode 100644 index 000000000..ec7da0536 --- /dev/null +++ b/sandbox/node/src/EmbeddedSignUrlExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); + console.log(error.body); +}); diff --git a/examples/EventCallback.ts b/sandbox/node/src/EventCallbackExample.ts similarity index 100% rename from examples/EventCallback.ts rename to sandbox/node/src/EventCallbackExample.ts diff --git a/sandbox/node/src/FaxDeleteExample.ts b/sandbox/node/src/FaxDeleteExample.ts new file mode 100644 index 000000000..3afd7a63b --- /dev/null +++ b/sandbox/node/src/FaxDeleteExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).catch(error => { + console.log("Exception when calling FaxApi#faxDelete:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxFilesExample.ts b/sandbox/node/src/FaxFilesExample.ts new file mode 100644 index 000000000..d4360710d --- /dev/null +++ b/sandbox/node/src/FaxFilesExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxFiles:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxGetExample.ts b/sandbox/node/src/FaxGetExample.ts new file mode 100644 index 000000000..56a87dbe7 --- /dev/null +++ b/sandbox/node/src/FaxGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineAddUserExample.ts b/sandbox/node/src/FaxLineAddUserExample.ts new file mode 100644 index 000000000..07d056914 --- /dev/null +++ b/sandbox/node/src/FaxLineAddUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineAddUserRequest: models.FaxLineAddUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineAddUser( + faxLineAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAddUser:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineAreaCodeGetExample.ts b/sandbox/node/src/FaxLineAreaCodeGetExample.ts new file mode 100644 index 000000000..0abb378b3 --- /dev/null +++ b/sandbox/node/src/FaxLineAreaCodeGetExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineAreaCodeGet( + "US", // country + undefined, // state + undefined, // province + undefined, // city +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineCreateExample.ts b/sandbox/node/src/FaxLineCreateExample.ts new file mode 100644 index 000000000..5f1f5e2fd --- /dev/null +++ b/sandbox/node/src/FaxLineCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineCreateRequest: models.FaxLineCreateRequest = { + areaCode: 209, + country: models.FaxLineCreateRequest.CountryEnum.Us, +}; + +apiCaller.faxLineCreate( + faxLineCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineDeleteExample.ts b/sandbox/node/src/FaxLineDeleteExample.ts new file mode 100644 index 000000000..834fe8a96 --- /dev/null +++ b/sandbox/node/src/FaxLineDeleteExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineDeleteRequest: models.FaxLineDeleteRequest = { + number: "[FAX_NUMBER]", +}; + +apiCaller.faxLineDelete( + faxLineDeleteRequest, +).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineDelete:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineGetExample.ts b/sandbox/node/src/FaxLineGetExample.ts new file mode 100644 index 000000000..e5ee2fd0f --- /dev/null +++ b/sandbox/node/src/FaxLineGetExample.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineGet( + "123-123-1234", // number +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineListExample.ts b/sandbox/node/src/FaxLineListExample.ts new file mode 100644 index 000000000..aa547afce --- /dev/null +++ b/sandbox/node/src/FaxLineListExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + undefined, // showTeamLines +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxLineRemoveUserExample.ts b/sandbox/node/src/FaxLineRemoveUserExample.ts new file mode 100644 index 000000000..6daea08ee --- /dev/null +++ b/sandbox/node/src/FaxLineRemoveUserExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxLineRemoveUserRequest: models.FaxLineRemoveUserRequest = { + number: "[FAX_NUMBER]", + emailAddress: "member@dropboxsign.com", +}; + +apiCaller.faxLineRemoveUser( + faxLineRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineRemoveUser:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxListExample.ts b/sandbox/node/src/FaxListExample.ts new file mode 100644 index 000000000..70b904d6f --- /dev/null +++ b/sandbox/node/src/FaxListExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxList( + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/FaxSendExample.ts b/sandbox/node/src/FaxSendExample.ts new file mode 100644 index 000000000..190caf070 --- /dev/null +++ b/sandbox/node/src/FaxSendExample.ts @@ -0,0 +1,28 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; + +const faxSendRequest: models.FaxSendRequest = { + recipient: "16690000001", + sender: "16690000000", + testMode: true, + coverPageTo: "Jill Fax", + coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", + title: "This is what the fax is about!", + files: [ + fs.createReadStream("./example_fax.pdf"), + ], +}; + +apiCaller.faxSend( + faxSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling FaxApi#faxSend:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/OauthTokenGenerateExample.ts b/sandbox/node/src/OauthTokenGenerateExample.ts new file mode 100644 index 000000000..80e6adf5e --- /dev/null +++ b/sandbox/node/src/OauthTokenGenerateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenGenerateRequest: models.OAuthTokenGenerateRequest = { + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code", +}; + +apiCaller.oauthTokenGenerate( + oAuthTokenGenerateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenGenerate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/OauthTokenRefreshExample.ts b/sandbox/node/src/OauthTokenRefreshExample.ts new file mode 100644 index 000000000..351d689e0 --- /dev/null +++ b/sandbox/node/src/OauthTokenRefreshExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = { + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", +}; + +apiCaller.oauthTokenRefresh( + oAuthTokenRefreshRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling OAuthApi#oauthTokenRefresh:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/ReportCreateExample.ts b/sandbox/node/src/ReportCreateExample.ts new file mode 100644 index 000000000..7195512ab --- /dev/null +++ b/sandbox/node/src/ReportCreateExample.ts @@ -0,0 +1,24 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.ReportApi(); +apiCaller.username = "YOUR_API_KEY"; + +const reportCreateRequest: models.ReportCreateRequest = { + startDate: "09/01/2020", + endDate: "09/01/2020", + reportType: [ + models.ReportCreateRequest.ReportTypeEnum.UserActivity, + models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ], +}; + +apiCaller.reportCreate( + reportCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling ReportApi#reportCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts b/sandbox/node/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..9c95521ee --- /dev/null +++ b/sandbox/node/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { + clientId: "1a659d9ad95bccd307ecad78d72192f8", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestBulkSendWithTemplateExample.ts b/sandbox/node/src/SignatureRequestBulkSendWithTemplateExample.ts new file mode 100644 index 000000000..a8c7d7bbd --- /dev/null +++ b/sandbox/node/src/SignatureRequestBulkSendWithTemplateExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "123 LLC", +}; + +const signerList2CustomFields = [ + signerList2CustomFields1, +]; + +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b", +}; + +const signerList2Signers = [ + signerList2Signers1, +]; + +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", +}; + +const signerList1CustomFields = [ + signerList1CustomFields1, +]; + +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td", +}; + +const signerList1Signers = [ + signerList1Signers1, +]; + +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, +}; + +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, +}; + +const signerList = [ + signerList1, + signerList2, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs, +}; + +apiCaller.signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestCancelExample.ts b/sandbox/node/src/SignatureRequestCancelExample.ts new file mode 100644 index 000000000..d6207b3bd --- /dev/null +++ b/sandbox/node/src/SignatureRequestCancelExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestCreateEmbeddedExample.ts b/sandbox/node/src/SignatureRequestCreateEmbeddedExample.ts new file mode 100644 index 000000000..a2c620a2e --- /dev/null +++ b/sandbox/node/src/SignatureRequestCreateEmbeddedExample.ts @@ -0,0 +1,58 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestCreateEmbeddedGroupedSignersExample.ts b/sandbox/node/src/SignatureRequestCreateEmbeddedGroupedSignersExample.ts new file mode 100644 index 000000000..a79b117ad --- /dev/null +++ b/sandbox/node/src/SignatureRequestCreateEmbeddedGroupedSignersExample.ts @@ -0,0 +1,88 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestCreateEmbeddedWithTemplateExample.ts b/sandbox/node/src/SignatureRequestCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..a2ee15e46 --- /dev/null +++ b/sandbox/node/src/SignatureRequestCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditEmbeddedExample.ts b/sandbox/node/src/SignatureRequestEditEmbeddedExample.ts new file mode 100644 index 000000000..f0f7580cc --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditEmbeddedExample.ts @@ -0,0 +1,59 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditEmbeddedGroupedSignersExample.ts b/sandbox/node/src/SignatureRequestEditEmbeddedGroupedSignersExample.ts new file mode 100644 index 000000000..3d828dbf8 --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditEmbeddedGroupedSignersExample.ts @@ -0,0 +1,89 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditEmbeddedWithTemplateExample.ts b/sandbox/node/src/SignatureRequestEditEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..0deff76bc --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditEmbeddedWithTemplateExample.ts @@ -0,0 +1,47 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestEditEmbeddedWithTemplateRequest: models.SignatureRequestEditEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditExample.ts b/sandbox/node/src/SignatureRequestEditExample.ts new file mode 100644 index 000000000..86e3fd1b6 --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditGroupedSignersExample.ts b/sandbox/node/src/SignatureRequestEditGroupedSignersExample.ts new file mode 100644 index 000000000..7b300f742 --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditGroupedSignersExample.ts @@ -0,0 +1,97 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestEditWithTemplateExample.ts b/sandbox/node/src/SignatureRequestEditWithTemplateExample.ts new file mode 100644 index 000000000..f8e8cd074 --- /dev/null +++ b/sandbox/node/src/SignatureRequestEditWithTemplateExample.ts @@ -0,0 +1,68 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestEditWithTemplateRequest: models.SignatureRequestEditWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestFilesAsDataUriExample.ts b/sandbox/node/src/SignatureRequestFilesAsDataUriExample.ts new file mode 100644 index 000000000..58630aeaa --- /dev/null +++ b/sandbox/node/src/SignatureRequestFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestFilesAsFileUrlExample.ts b/sandbox/node/src/SignatureRequestFilesAsFileUrlExample.ts new file mode 100644 index 000000000..5ca65d932 --- /dev/null +++ b/sandbox/node/src/SignatureRequestFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestFilesExample.ts b/sandbox/node/src/SignatureRequestFilesExample.ts new file mode 100644 index 000000000..88762904f --- /dev/null +++ b/sandbox/node/src/SignatureRequestFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf", // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFiles:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestGetExample.ts b/sandbox/node/src/SignatureRequestGetExample.ts new file mode 100644 index 000000000..05ea209b6 --- /dev/null +++ b/sandbox/node/src/SignatureRequestGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestListExample.ts b/sandbox/node/src/SignatureRequestListExample.ts new file mode 100644 index 000000000..20d63eddb --- /dev/null +++ b/sandbox/node/src/SignatureRequestListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestReleaseHoldExample.ts b/sandbox/node/src/SignatureRequestReleaseHoldExample.ts new file mode 100644 index 000000000..3dca1e10d --- /dev/null +++ b/sandbox/node/src/SignatureRequestReleaseHoldExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestReleaseHold:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestRemindExample.ts b/sandbox/node/src/SignatureRequestRemindExample.ts new file mode 100644 index 000000000..4801d7087 --- /dev/null +++ b/sandbox/node/src/SignatureRequestRemindExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestRemindRequest: models.SignatureRequestRemindRequest = { + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemind:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestRemoveExample.ts b/sandbox/node/src/SignatureRequestRemoveExample.ts new file mode 100644 index 000000000..7f76eb5a2 --- /dev/null +++ b/sandbox/node/src/SignatureRequestRemoveExample.ts @@ -0,0 +1,13 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemove:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestSendExample.ts b/sandbox/node/src/SignatureRequestSendExample.ts new file mode 100644 index 000000000..910a66743 --- /dev/null +++ b/sandbox/node/src/SignatureRequestSendExample.ts @@ -0,0 +1,66 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestSendGroupedSignersExample.ts b/sandbox/node/src/SignatureRequestSendGroupedSignersExample.ts new file mode 100644 index 000000000..110567251 --- /dev/null +++ b/sandbox/node/src/SignatureRequestSendGroupedSignersExample.ts @@ -0,0 +1,96 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const groupedSigners2Signers1: models.SubSignatureRequestSigner = { + name: "Bob", + emailAddress: "bob@example.com", +}; + +const groupedSigners2Signers2: models.SubSignatureRequestSigner = { + name: "Charlie", + emailAddress: "charlie@example.com", +}; + +const groupedSigners2Signers = [ + groupedSigners2Signers1, + groupedSigners2Signers2, +]; + +const groupedSigners1Signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", +}; + +const groupedSigners1Signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", +}; + +const groupedSigners1Signers = [ + groupedSigners1Signers1, + groupedSigners1Signers2, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const groupedSigners1: models.SubSignatureRequestGroupedSigners = { + group: "Group #1", + order: 0, + signers: groupedSigners1Signers, +}; + +const groupedSigners2: models.SubSignatureRequestGroupedSigners = { + group: "Group #2", + order: 1, + signers: groupedSigners2Signers, +}; + +const groupedSigners = [ + groupedSigners1, + groupedSigners2, +]; + +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + groupedSigners: groupedSigners, +}; + +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestSendWithTemplateExample.ts b/sandbox/node/src/SignatureRequestSendWithTemplateExample.ts new file mode 100644 index 000000000..88219107a --- /dev/null +++ b/sandbox/node/src/SignatureRequestSendWithTemplateExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; + +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; + +const customFields = [ + customFields1, +]; + +const signatureRequestSendWithTemplateRequest: models.SignatureRequestSendWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/SignatureRequestUpdateExample.ts b/sandbox/node/src/SignatureRequestUpdateExample.ts new file mode 100644 index 000000000..8464618cb --- /dev/null +++ b/sandbox/node/src/SignatureRequestUpdateExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com", +}; + +apiCaller.signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamAddMemberAccountIdExample.ts b/sandbox/node/src/TeamAddMemberAccountIdExample.ts new file mode 100644 index 000000000..1f2190b26 --- /dev/null +++ b/sandbox/node/src/TeamAddMemberAccountIdExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamAddMemberExample.ts b/sandbox/node/src/TeamAddMemberExample.ts new file mode 100644 index 000000000..b781f2967 --- /dev/null +++ b/sandbox/node/src/TeamAddMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamAddMemberRequest: models.TeamAddMemberRequest = { + emailAddress: "george@example.com", +}; + +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamAddMember:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamCreateExample.ts b/sandbox/node/src/TeamCreateExample.ts new file mode 100644 index 000000000..03431e028 --- /dev/null +++ b/sandbox/node/src/TeamCreateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", +}; + +apiCaller.teamCreate( + teamCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamDeleteExample.ts b/sandbox/node/src/TeamDeleteExample.ts new file mode 100644 index 000000000..c37216b0c --- /dev/null +++ b/sandbox/node/src/TeamDeleteExample.ts @@ -0,0 +1,12 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamGetExample.ts b/sandbox/node/src/TeamGetExample.ts new file mode 100644 index 000000000..65d8758fc --- /dev/null +++ b/sandbox/node/src/TeamGetExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamGet().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamInfoExample.ts b/sandbox/node/src/TeamInfoExample.ts new file mode 100644 index 000000000..d0050e94c --- /dev/null +++ b/sandbox/node/src/TeamInfoExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInfo:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamInvitesExample.ts b/sandbox/node/src/TeamInvitesExample.ts new file mode 100644 index 000000000..7debb4877 --- /dev/null +++ b/sandbox/node/src/TeamInvitesExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamInvites().then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamInvites:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamMembersExample.ts b/sandbox/node/src/TeamMembersExample.ts new file mode 100644 index 000000000..17479dbda --- /dev/null +++ b/sandbox/node/src/TeamMembersExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamMembers:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamRemoveMemberAccountIdExample.ts b/sandbox/node/src/TeamRemoveMemberAccountIdExample.ts new file mode 100644 index 000000000..cf5e42a72 --- /dev/null +++ b/sandbox/node/src/TeamRemoveMemberAccountIdExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + accountId: "f57db65d3f933b5316d398057a36176831451a35", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamRemoveMemberExample.ts b/sandbox/node/src/TeamRemoveMemberExample.ts new file mode 100644 index 000000000..3f12efc31 --- /dev/null +++ b/sandbox/node/src/TeamRemoveMemberExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { + emailAddress: "teammate@dropboxsign.com", + newOwnerEmailAddress: "new_teammate@dropboxsign.com", +}; + +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamRemoveMember:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamSubTeamsExample.ts b/sandbox/node/src/TeamSubTeamsExample.ts new file mode 100644 index 000000000..e6ef9c8da --- /dev/null +++ b/sandbox/node/src/TeamSubTeamsExample.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamSubTeams:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TeamUpdateExample.ts b/sandbox/node/src/TeamUpdateExample.ts new file mode 100644 index 000000000..748a4adbd --- /dev/null +++ b/sandbox/node/src/TeamUpdateExample.ts @@ -0,0 +1,20 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const teamUpdateRequest: models.TeamUpdateRequest = { + name: "New Team Name", +}; + +apiCaller.teamUpdate( + teamUpdateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TeamApi#teamUpdate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateAddUserExample.ts b/sandbox/node/src/TemplateAddUserExample.ts new file mode 100644 index 000000000..b8bf1a557 --- /dev/null +++ b/sandbox/node/src/TemplateAddUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateAddUserRequest: models.TemplateAddUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateAddUser:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateEmbeddedDraftExample.ts b/sandbox/node/src/TemplateCreateEmbeddedDraftExample.ts new file mode 100644 index 000000000..300b1f618 --- /dev/null +++ b/sandbox/node/src/TemplateCreateEmbeddedDraftExample.ts @@ -0,0 +1,67 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts new file mode 100644 index 000000000..0f21c2209 --- /dev/null +++ b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts new file mode 100644 index 000000000..d4036365e --- /dev/null +++ b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..e78591849 --- /dev/null +++ b/sandbox/node/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, + signerRoles: signerRoles, +}; + +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateExample.ts b/sandbox/node/src/TemplateCreateExample.ts new file mode 100644 index 000000000..6046df4b5 --- /dev/null +++ b/sandbox/node/src/TemplateCreateExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateFormFieldGroupsExample.ts b/sandbox/node/src/TemplateCreateFormFieldGroupsExample.ts new file mode 100644 index 000000000..845ddaa9b --- /dev/null +++ b/sandbox/node/src/TemplateCreateFormFieldGroupsExample.ts @@ -0,0 +1,116 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldGroups: formFieldGroups, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateFormFieldRulesExample.ts b/sandbox/node/src/TemplateCreateFormFieldRulesExample.ts new file mode 100644 index 000000000..c7ad42288 --- /dev/null +++ b/sandbox/node/src/TemplateCreateFormFieldRulesExample.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + formFieldRules: formFieldRules, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateCreateFormFieldsPerDocumentExample.ts b/sandbox/node/src/TemplateCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..59890f436 --- /dev/null +++ b/sandbox/node/src/TemplateCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,103 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; + +const signerRoles1: models.SubTemplateRole = { + name: "Client", + order: 0, +}; + +const signerRoles2: models.SubTemplateRole = { + name: "Witness", + order: 1, +}; + +const signerRoles = [ + signerRoles1, + signerRoles2, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const mergeFields1: models.SubMergeField = { + name: "Full Name", + type: models.SubMergeField.TypeEnum.Text, +}; + +const mergeFields2: models.SubMergeField = { + name: "Is Registered?", + type: models.SubMergeField.TypeEnum.Checkbox, +}; + +const mergeFields = [ + mergeFields1, + mergeFields2, +]; + +const templateCreateRequest: models.TemplateCreateRequest = { + clientId: "37dee8d8440c66d54cfa05d92c160882", + message: "For your approval", + subject: "Please sign this document", + testMode: true, + title: "Test Template", + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + ccRoles: [ + "Manager", + ], + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, +}; + +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateDeleteExample.ts b/sandbox/node/src/TemplateDeleteExample.ts new file mode 100644 index 000000000..3f0aae438 --- /dev/null +++ b/sandbox/node/src/TemplateDeleteExample.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateDelete( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).catch(error => { + console.log("Exception when calling TemplateApi#templateDelete:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateFilesAsDataUriExample.ts b/sandbox/node/src/TemplateFilesAsDataUriExample.ts new file mode 100644 index 000000000..40a8e2ac0 --- /dev/null +++ b/sandbox/node/src/TemplateFilesAsDataUriExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateFilesAsFileUrlExample.ts b/sandbox/node/src/TemplateFilesAsFileUrlExample.ts new file mode 100644 index 000000000..e80f1ad91 --- /dev/null +++ b/sandbox/node/src/TemplateFilesAsFileUrlExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1, // forceDownload +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateFilesExample.ts b/sandbox/node/src/TemplateFilesExample.ts new file mode 100644 index 000000000..923f16d56 --- /dev/null +++ b/sandbox/node/src/TemplateFilesExample.ts @@ -0,0 +1,17 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + undefined, // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateFiles:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateGetExample.ts b/sandbox/node/src/TemplateGetExample.ts new file mode 100644 index 000000000..b4fcdda6c --- /dev/null +++ b/sandbox/node/src/TemplateGetExample.ts @@ -0,0 +1,16 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateGet( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateGet:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateListExample.ts b/sandbox/node/src/TemplateListExample.ts new file mode 100644 index 000000000..e678a6c26 --- /dev/null +++ b/sandbox/node/src/TemplateListExample.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateList:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateRemoveUserExample.ts b/sandbox/node/src/TemplateRemoveUserExample.ts new file mode 100644 index 000000000..2d40a2f3f --- /dev/null +++ b/sandbox/node/src/TemplateRemoveUserExample.ts @@ -0,0 +1,21 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateRemoveUserRequest: models.TemplateRemoveUserRequest = { + emailAddress: "george@dropboxsign.com", +}; + +apiCaller.templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateRemoveUser:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/TemplateUpdateFilesExample.ts b/sandbox/node/src/TemplateUpdateFilesExample.ts new file mode 100644 index 000000000..fe21c563d --- /dev/null +++ b/sandbox/node/src/TemplateUpdateFilesExample.ts @@ -0,0 +1,23 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const templateUpdateFilesRequest: models.TemplateUpdateFilesRequest = { + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling TemplateApi#templateUpdateFiles:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateEmbeddedExample.ts b/sandbox/node/src/UnclaimedDraftCreateEmbeddedExample.ts new file mode 100644 index 000000000..7b99e7d60 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateEmbeddedExample.ts @@ -0,0 +1,25 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts new file mode 100644 index 000000000..f7953d6c4 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.ts @@ -0,0 +1,74 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts new file mode 100644 index 000000000..77d2ee9d8 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.ts @@ -0,0 +1,92 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..dcdee5d3b --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.ts @@ -0,0 +1,61 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts b/sandbox/node/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts new file mode 100644 index 000000000..a326c3679 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.ts @@ -0,0 +1,46 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@dropboxsign.com", +}; + +const ccs = [ + ccs1, +]; + +const signers1: models.SubUnclaimedDraftTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requesterEmailAddress: "jack@dropboxsign.com", + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers, +}; + +apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateExample.ts b/sandbox/node/src/UnclaimedDraftCreateExample.ts new file mode 100644 index 000000000..aa94b5d77 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateExample.ts @@ -0,0 +1,35 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signers1: models.SubUnclaimedDraftSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers = [ + signers1, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signers: signers, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateFormFieldGroupsExample.ts b/sandbox/node/src/UnclaimedDraftCreateFormFieldGroupsExample.ts new file mode 100644 index 000000000..f6e079f42 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateFormFieldGroupsExample.ts @@ -0,0 +1,73 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldGroups1: models.SubFormFieldGroup = { + groupId: "RadioItemGroup1", + groupLabel: "Radio Item Group 1", + requirement: "require_0-1", +}; + +const formFieldGroups = [ + formFieldGroups1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 328, + group: "RadioItemGroup1", + isChecked: true, + name: "", + page: 1, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentRadio = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "radio", + required: false, + signer: "0", + width: 18, + height: 18, + x: 112, + y: 370, + group: "RadioItemGroup1", + isChecked: false, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldGroups: formFieldGroups, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateFormFieldRulesExample.ts b/sandbox/node/src/UnclaimedDraftCreateFormFieldRulesExample.ts new file mode 100644 index 000000000..de9953660 --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateFormFieldRulesExample.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldRules1Triggers1: models.SubFormFieldRuleTrigger = { + id: "uniqueIdHere_1", + operator: models.SubFormFieldRuleTrigger.OperatorEnum.Is, + value: "foo", +}; + +const formFieldRules1Triggers = [ + formFieldRules1Triggers1, +]; + +const formFieldRules1Actions1: models.SubFormFieldRuleAction = { + hidden: true, + type: models.SubFormFieldRuleAction.TypeEnum.ChangeFieldVisibility, + fieldId: "uniqueIdHere_2", +}; + +const formFieldRules1Actions = [ + formFieldRules1Actions1, +]; + +const formFieldRules1: models.SubFormFieldRule = { + id: "rule_1", + triggerOperator: "AND", + triggers: formFieldRules1Triggers, + actions: formFieldRules1Actions, +}; + +const formFieldRules = [ + formFieldRules1, +]; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "0", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldRules: formFieldRules, + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts b/sandbox/node/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts new file mode 100644 index 000000000..d010996de --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.ts @@ -0,0 +1,60 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, +}; + +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, +}; + +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; + +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, + testMode: false, + fileUrls: [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + formFieldsPerDocument: formFieldsPerDocument, +}; + +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); + console.log(error.body); +}); diff --git a/sandbox/node/src/UnclaimedDraftEditAndResendExample.ts b/sandbox/node/src/UnclaimedDraftEditAndResendExample.ts new file mode 100644 index 000000000..04a04f15f --- /dev/null +++ b/sandbox/node/src/UnclaimedDraftEditAndResendExample.ts @@ -0,0 +1,22 @@ +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const unclaimedDraftEditAndResendRequest: models.UnclaimedDraftEditAndResendRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false, +}; + +apiCaller.unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest, +).then(response => { + console.log(response.body); +}).catch(error => { + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend:"); + console.log(error.body); +}); diff --git a/sandbox/node/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/node/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/node/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/node/test_fixtures/SignatureRequestSendRequest.json b/sandbox/node/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/node/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/node/test_fixtures/pdf-sample.pdf b/sandbox/node/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/node/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/node/tests/.config.dist.json b/sandbox/node/tests/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/node/tests/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/node/tests/.gitignore b/sandbox/node/tests/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/node/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/node/tests/signatureRequest.test.ts b/sandbox/node/tests/signatureRequest.test.ts deleted file mode 100644 index 73579a528..000000000 --- a/sandbox/node/tests/signatureRequest.test.ts +++ /dev/null @@ -1,140 +0,0 @@ -import "jest"; -import * as DropboxSign from "@dropbox/sign"; -import * as fs from "fs"; - -describe("signatureRequest", () => { - let config: { - BASE_URL: string, - API_KEY: string, - CLIENT_ID: string, - USE_XDEBUG: boolean, - }; - - let headers = {}; - - beforeEach(() => { - const config_custom = require("./.config.json"); - const config_dist = require("./.config.dist.json"); - config = { ...config_dist, ...config_custom }; - - if (config["USE_XDEBUG"]) { - headers = { - "Cookie": "XDEBUG_SESSION=xdebug", - }; - } - }); - - test("testSend", () => { - const signature_request_api = new DropboxSign.SignatureRequestApi(); - signature_request_api.username = config.API_KEY; - signature_request_api.basePath = config.BASE_URL; - signature_request_api.defaultHeaders = headers; - - const data: Partial = require( - "./../test_fixtures/SignatureRequestSendRequest.json", - ); - data["files"] = [fs.createReadStream(__dirname + "/../test_fixtures/pdf-sample.pdf")]; - - const send_request = DropboxSign.SignatureRequestSendRequest.init(data); - - return signature_request_api.signatureRequestSend( - send_request, - ).then(send_response => { - const signature_request = send_response.body.signatureRequest; - - expect(send_request.formFieldsPerDocument![0].apiId) - .toBe(signature_request.customFields![0].apiId); - - expect(send_request.signers![0].emailAddress) - .toBe(signature_request.signatures![0].signerEmailAddress); - expect(send_request.signers![1].emailAddress) - .toBe(signature_request.signatures![1].signerEmailAddress); - expect(send_request.signers![2].emailAddress) - .toBe(signature_request.signatures![2].signerEmailAddress); - - return signature_request_api.signatureRequestGet( - signature_request.signatureRequestId!, - ).then(get_response => { - expect(signature_request.signatureRequestId) - .toBe(get_response.body.signatureRequest.signatureRequestId); - }).catch(error => { - throw new Error(`Should not have thrown: ${error.body}`); - }); - }).catch(error => { - throw new Error(`Should not have thrown: ${error.body}`); - }); - }); - - test("testCreateEmbedded", () => { - const signature_request_api = new DropboxSign.SignatureRequestApi(); - signature_request_api.username = config.API_KEY; - signature_request_api.basePath = config.BASE_URL; - signature_request_api.defaultHeaders = headers; - - const data: Partial = require( - "./../test_fixtures/SignatureRequestCreateEmbeddedRequest.json" - ); - data["files"] = [fs.createReadStream(__dirname + "/../test_fixtures/pdf-sample.pdf")]; - data["clientId"] = config.CLIENT_ID; - - const send_request = DropboxSign.SignatureRequestCreateEmbeddedRequest.init(data); - - return signature_request_api.signatureRequestCreateEmbedded( - send_request, - ).then(send_response => { - const signature_request = send_response.body.signatureRequest; - - expect(send_request.signers![0].emailAddress) - .toBe(signature_request.signatures![0].signerEmailAddress); - expect(send_request.signers![1].emailAddress) - .toBe(signature_request.signatures![1].signerEmailAddress); - expect(send_request.signers![2].emailAddress) - .toBe(signature_request.signatures![2].signerEmailAddress); - - const embedded_api = new DropboxSign.EmbeddedApi(); - embedded_api.username = config.API_KEY; - embedded_api.basePath = config.BASE_URL; - embedded_api.defaultHeaders = headers; - - return embedded_api.embeddedSignUrl( - signature_request.signatures![0].signatureId!, - ).then(get_response => { - expect(get_response.body.embedded.signUrl).toBeTruthy(); - }).catch(error => { - throw new Error(`Should not have thrown: ${error.body}`); - }); - }).catch(error => { - throw new Error(`Should not have thrown: ${error.body}`); - }); - }); - - test.concurrent("testSendWithoutFileError", async () => { - const config_custom = require("./.config.json"); - const config_dist = require("./.config.dist.json"); - config = { ...config_dist, ...config_custom }; - let headers = {}; - - if (config["USE_XDEBUG"]) { - headers = { - "Cookie": "XDEBUG_SESSION=xdebug", - }; - } - - const signature_request_api = new DropboxSign.SignatureRequestApi(); - signature_request_api.username = config.API_KEY; - signature_request_api.basePath = config.BASE_URL; - signature_request_api.defaultHeaders = headers; - - const data: Partial = require( - "./../test_fixtures/SignatureRequestSendRequest.json", - ); - - const request = DropboxSign.SignatureRequestSendRequest.init(data); - - return signature_request_api.signatureRequestSend(request).then(response => { - expect(response).toBeFalsy(); - }).catch((error: DropboxSign.HttpError) => { - expect(error.body.error.errorPath).toEqual("file"); - }); - }); -}); diff --git a/sandbox/node/tsconfig.json b/sandbox/node/tsconfig.json new file mode 100644 index 000000000..d7a0cd511 --- /dev/null +++ b/sandbox/node/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": false, + "suppressImplicitAnyIndexErrors": true, + "target": "ES6", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "strict": true, + "moduleResolution": "node", + "removeComments": true, + "sourceMap": true, + "noLib": false, + "declaration": true, + "emitDeclarationOnly": true, + "lib": [ + "dom", + "es6", + "es5", + "dom.iterable", + "scripthost" + ], + "typeRoots": [ + "node_modules/@types" + ], + "resolveJsonModule": true + }, + "exclude": [ + "*.tgz", + "node_modules" + ] +} diff --git a/sandbox/php/.gitignore b/sandbox/php/.gitignore new file mode 100644 index 000000000..987e2a253 --- /dev/null +++ b/sandbox/php/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor diff --git a/sandbox/php/Example.php b/sandbox/php/Example.php deleted file mode 100644 index 39de49e79..000000000 --- a/sandbox/php/Example.php +++ /dev/null @@ -1,25 +0,0 @@ -setUsername("YOUR_API_KEY"); - -// or, configure Bearer (JWT) authorization: oauth2 -// $config->setAccessToken("YOUR_ACCESS_TOKEN"); - -$api = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); - -try { - $result = $api->accountCreate($data); - print_r($result); -} catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); -} diff --git a/sandbox/php/composer.json b/sandbox/php/composer.json index ab722a292..163ae9dac 100644 --- a/sandbox/php/composer.json +++ b/sandbox/php/composer.json @@ -2,7 +2,7 @@ "name": "dropbox/sign-sandbox", "autoload": { "psr-4": { - "Dropbox\\SignSandbox\\Tests\\": "test" + "Dropbox\\SignSandbox\\": "src" } }, "require": { diff --git a/sandbox/php/src/AccountCreateExample.php b/sandbox/php/src/AccountCreateExample.php new file mode 100644 index 000000000..736fb3cc6 --- /dev/null +++ b/sandbox/php/src/AccountCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/AccountCreateOauthExample.php b/sandbox/php/src/AccountCreateOauthExample.php new file mode 100644 index 000000000..0c4898be2 --- /dev/null +++ b/sandbox/php/src/AccountCreateOauthExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com") + ->setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/AccountGetExample.php b/sandbox/php/src/AccountGetExample.php new file mode 100644 index 000000000..96b594d7e --- /dev/null +++ b/sandbox/php/src/AccountGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/AccountUpdateExample.php b/sandbox/php/src/AccountUpdateExample.php new file mode 100644 index 000000000..64a1ad38d --- /dev/null +++ b/sandbox/php/src/AccountUpdateExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_update_request = (new Dropbox\Sign\Model\AccountUpdateRequest()) + ->setCallbackUrl("https://www.example.com/callback") + ->setLocale("en-US"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountUpdate( + account_update_request: $account_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/AccountVerifyExample.php b/sandbox/php/src/AccountVerifyExample.php new file mode 100644 index 000000000..acdee34e7 --- /dev/null +++ b/sandbox/php/src/AccountVerifyExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$account_verify_request = (new Dropbox\Sign\Model\AccountVerifyRequest()) + ->setEmailAddress("some_user@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountVerify( + account_verify_request: $account_verify_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling AccountApi#accountVerify: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ApiAppCreateExample.php b/sandbox/php/src/ApiAppCreateExample.php new file mode 100644 index 000000000..7ec68a6f5 --- /dev/null +++ b/sandbox/php/src/ApiAppCreateExample.php @@ -0,0 +1,42 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_create_request = (new Dropbox\Sign\Model\ApiAppCreateRequest()) + ->setName("My Production App") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppCreate( + api_app_create_request: $api_app_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ApiAppDeleteExample.php b/sandbox/php/src/ApiAppDeleteExample.php new file mode 100644 index 000000000..0734efaf9 --- /dev/null +++ b/sandbox/php/src/ApiAppDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppDelete( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppDelete: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ApiAppGetExample.php b/sandbox/php/src/ApiAppGetExample.php new file mode 100644 index 000000000..f4dcc571b --- /dev/null +++ b/sandbox/php/src/ApiAppGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppGet( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ApiAppListExample.php b/sandbox/php/src/ApiAppListExample.php new file mode 100644 index 000000000..6e9a8e5cb --- /dev/null +++ b/sandbox/php/src/ApiAppListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ApiAppUpdateExample.php b/sandbox/php/src/ApiAppUpdateExample.php new file mode 100644 index 000000000..30c22c4eb --- /dev/null +++ b/sandbox/php/src/ApiAppUpdateExample.php @@ -0,0 +1,44 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); + +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") + ->setPrimaryButtonTextColor("#ffffff"); + +$api_app_update_request = (new Dropbox\Sign\Model\ApiAppUpdateRequest()) + ->setCallbackUrl("https://example.com/dropboxsign") + ->setName("New Name") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); + +try { + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppUpdate( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request: $api_app_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ApiAppApi#apiAppUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/BulkSendJobGetExample.php b/sandbox/php/src/BulkSendJobGetExample.php new file mode 100644 index 000000000..8b74043d9 --- /dev/null +++ b/sandbox/php/src/BulkSendJobGetExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobGet( + bulk_send_job_id: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/BulkSendJobListExample.php b/sandbox/php/src/BulkSendJobListExample.php new file mode 100644 index 000000000..9a566d561 --- /dev/null +++ b/sandbox/php/src/BulkSendJobListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling BulkSendJobApi#bulkSendJobList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/EmbeddedEditUrlExample.php b/sandbox/php/src/EmbeddedEditUrlExample.php new file mode 100644 index 000000000..cae4929eb --- /dev/null +++ b/sandbox/php/src/EmbeddedEditUrlExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$merge_fields = [ +]; + +$embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) + ->setCcRoles([ + "", + ]) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request: $embedded_edit_url_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/EmbeddedSignUrlExample.php b/sandbox/php/src/EmbeddedSignUrlExample.php new file mode 100644 index 000000000..b055ac6ed --- /dev/null +++ b/sandbox/php/src/EmbeddedSignUrlExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( + signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/EventCallbackExample.php b/sandbox/php/src/EventCallbackExample.php new file mode 100644 index 000000000..4a21d5cbf --- /dev/null +++ b/sandbox/php/src/EventCallbackExample.php @@ -0,0 +1,35 @@ + [ + "event_type" => "account_confirmed", + "event_time" => "1669926463", + "event_hash" => "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + "event_metadata" => [ + "related_signature_id" => null, + "reported_for_account_id" => "6421d70b9bd45059fa207d03ab8d1b96515b472c", + "reported_for_app_id" => null, + "event_message" => null, + ], + ], +]; + +$callback_event = Dropbox\Sign\Model\EventCallbackRequest::init($callback_data); + +// verify that a callback came from HelloSign.com +if (Dropbox\Sign\EventCallbackHelper::isValid($api_key, $callback_event)) { + // one of "account_callback" or "api_app_callback" + $callback_type = Dropbox\Sign\EventCallbackHelper::getCallbackType($callback_event); + + // do your magic below! +} diff --git a/sandbox/php/src/FaxDeleteExample.php b/sandbox/php/src/FaxDeleteExample.php new file mode 100644 index 000000000..96ba3c0d7 --- /dev/null +++ b/sandbox/php/src/FaxDeleteExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\FaxApi(config: $config))->faxDelete( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxDelete: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxFilesExample.php b/sandbox/php/src/FaxFilesExample.php new file mode 100644 index 000000000..01322d769 --- /dev/null +++ b/sandbox/php/src/FaxFilesExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxFiles( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxFiles: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxGetExample.php b/sandbox/php/src/FaxGetExample.php new file mode 100644 index 000000000..50bb7c865 --- /dev/null +++ b/sandbox/php/src/FaxGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxGet( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineAddUserExample.php b/sandbox/php/src/FaxLineAddUserExample.php new file mode 100644 index 000000000..cca56e766 --- /dev/null +++ b/sandbox/php/src/FaxLineAddUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_add_user_request = (new Dropbox\Sign\Model\FaxLineAddUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAddUser( + fax_line_add_user_request: $fax_line_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAddUser: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineAreaCodeGetExample.php b/sandbox/php/src/FaxLineAreaCodeGetExample.php new file mode 100644 index 000000000..f8d4e717c --- /dev/null +++ b/sandbox/php/src/FaxLineAreaCodeGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( + country: "US", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineCreateExample.php b/sandbox/php/src/FaxLineCreateExample.php new file mode 100644 index 000000000..0a5ef5ec6 --- /dev/null +++ b/sandbox/php/src/FaxLineCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_create_request = (new Dropbox\Sign\Model\FaxLineCreateRequest()) + ->setAreaCode(209) + ->setCountry(Dropbox\Sign\Model\FaxLineCreateRequest::COUNTRY_US); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineCreate( + fax_line_create_request: $fax_line_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineDeleteExample.php b/sandbox/php/src/FaxLineDeleteExample.php new file mode 100644 index 000000000..080db2960 --- /dev/null +++ b/sandbox/php/src/FaxLineDeleteExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_delete_request = (new Dropbox\Sign\Model\FaxLineDeleteRequest()) + ->setNumber("[FAX_NUMBER]"); + +try { + (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineDelete( + fax_line_delete_request: $fax_line_delete_request, + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineDelete: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineGetExample.php b/sandbox/php/src/FaxLineGetExample.php new file mode 100644 index 000000000..70004942a --- /dev/null +++ b/sandbox/php/src/FaxLineGetExample.php @@ -0,0 +1,21 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineGet( + number: "123-123-1234", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineListExample.php b/sandbox/php/src/FaxLineListExample.php new file mode 100644 index 000000000..c759934e9 --- /dev/null +++ b/sandbox/php/src/FaxLineListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineList( + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxLineRemoveUserExample.php b/sandbox/php/src/FaxLineRemoveUserExample.php new file mode 100644 index 000000000..95d117971 --- /dev/null +++ b/sandbox/php/src/FaxLineRemoveUserExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); + +$fax_line_remove_user_request = (new Dropbox\Sign\Model\FaxLineRemoveUserRequest()) + ->setNumber("[FAX_NUMBER]") + ->setEmailAddress("member@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineRemoveUser( + fax_line_remove_user_request: $fax_line_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxLineApi#faxLineRemoveUser: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxListExample.php b/sandbox/php/src/FaxListExample.php new file mode 100644 index 000000000..c0d432351 --- /dev/null +++ b/sandbox/php/src/FaxListExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/FaxSendExample.php b/sandbox/php/src/FaxSendExample.php new file mode 100644 index 000000000..707e8ce25 --- /dev/null +++ b/sandbox/php/src/FaxSendExample.php @@ -0,0 +1,32 @@ +setUsername("YOUR_API_KEY"); + +$fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) + ->setRecipient("16690000001") + ->setSender("16690000000") + ->setTestMode(true) + ->setCoverPageTo("Jill Fax") + ->setCoverPageFrom("Faxer Faxerson") + ->setCoverPageMessage("I'm sending you a fax!") + ->setTitle("This is what the fax is about!") + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( + fax_send_request: $fax_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/OauthTokenGenerateExample.php b/sandbox/php/src/OauthTokenGenerateExample.php new file mode 100644 index 000000000..9b2df4a08 --- /dev/null +++ b/sandbox/php/src/OauthTokenGenerateExample.php @@ -0,0 +1,27 @@ +setClientId("cc91c61d00f8bb2ece1428035716b") + ->setClientSecret("1d14434088507ffa390e6f5528465") + ->setCode("1b0d28d90c86c141") + ->setState("900e06e2") + ->setGrantType("authorization_code"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenGenerate( + o_auth_token_generate_request: $o_auth_token_generate_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenGenerate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/OauthTokenRefreshExample.php b/sandbox/php/src/OauthTokenRefreshExample.php new file mode 100644 index 000000000..519db72d1 --- /dev/null +++ b/sandbox/php/src/OauthTokenRefreshExample.php @@ -0,0 +1,24 @@ +setGrantType("refresh_token") + ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + +try { + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh( + o_auth_token_refresh_request: $o_auth_token_refresh_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/ReportCreateExample.php b/sandbox/php/src/ReportCreateExample.php new file mode 100644 index 000000000..18d8d09ea --- /dev/null +++ b/sandbox/php/src/ReportCreateExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); + +$report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) + ->setStartDate("09/01/2020") + ->setEndDate("09/01/2020") + ->setReportType([ + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, + Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, + ]); + +try { + $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( + report_create_request: $report_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php b/sandbox/php/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..1727df311 --- /dev/null +++ b/sandbox/php/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest()) + ->setClientId("1a659d9ad95bccd307ecad78d72192f8") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkCreateEmbeddedWithTemplate( + signature_request_bulk_create_embedded_with_template_request: $signature_request_bulk_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestBulkSendWithTemplateExample.php b/sandbox/php/src/SignatureRequestBulkSendWithTemplateExample.php new file mode 100644 index 000000000..7574361ff --- /dev/null +++ b/sandbox/php/src/SignatureRequestBulkSendWithTemplateExample.php @@ -0,0 +1,89 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com") + ->setPin("d79a3td"); + +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; + +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); + +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); + +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest()) + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate( + signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestCancelExample.php b/sandbox/php/src/SignatureRequestCancelExample.php new file mode 100644 index 000000000..969a67683 --- /dev/null +++ b/sandbox/php/src/SignatureRequestCancelExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestCreateEmbeddedExample.php b/sandbox/php/src/SignatureRequestCreateEmbeddedExample.php new file mode 100644 index 000000000..61d74044e --- /dev/null +++ b/sandbox/php/src/SignatureRequestCreateEmbeddedExample.php @@ -0,0 +1,59 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestCreateEmbeddedGroupedSignersExample.php b/sandbox/php/src/SignatureRequestCreateEmbeddedGroupedSignersExample.php new file mode 100644 index 000000000..f7ea5d39a --- /dev/null +++ b/sandbox/php/src/SignatureRequestCreateEmbeddedGroupedSignersExample.php @@ -0,0 +1,86 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestCreateEmbeddedWithTemplateExample.php b/sandbox/php/src/SignatureRequestCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..3ff0454e8 --- /dev/null +++ b/sandbox/php/src/SignatureRequestCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate( + signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditEmbeddedExample.php b/sandbox/php/src/SignatureRequestEditEmbeddedExample.php new file mode 100644 index 000000000..868c62562 --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditEmbeddedExample.php @@ -0,0 +1,60 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditEmbeddedGroupedSignersExample.php b/sandbox/php/src/SignatureRequestEditEmbeddedGroupedSignersExample.php new file mode 100644 index 000000000..08ebeac0a --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditEmbeddedGroupedSignersExample.php @@ -0,0 +1,87 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditEmbeddedWithTemplateExample.php b/sandbox/php/src/SignatureRequestEditEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..640f35dfc --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditEmbeddedWithTemplateExample.php @@ -0,0 +1,50 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_edit_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbeddedWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request: $signature_request_edit_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditExample.php b/sandbox/php/src/SignatureRequestEditExample.php new file mode 100644 index 000000000..92d3747c5 --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditGroupedSignersExample.php b/sandbox/php/src/SignatureRequestEditGroupedSignersExample.php new file mode 100644 index 000000000..af25d631a --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditGroupedSignersExample.php @@ -0,0 +1,96 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestEditWithTemplateExample.php b/sandbox/php/src/SignatureRequestEditWithTemplateExample.php new file mode 100644 index 000000000..a6f2c9f10 --- /dev/null +++ b/sandbox/php/src/SignatureRequestEditWithTemplateExample.php @@ -0,0 +1,69 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_edit_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request: $signature_request_edit_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestFilesAsDataUriExample.php b/sandbox/php/src/SignatureRequestFilesAsDataUriExample.php new file mode 100644 index 000000000..0d8d71902 --- /dev/null +++ b/sandbox/php/src/SignatureRequestFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsDataUri( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestFilesAsFileUrlExample.php b/sandbox/php/src/SignatureRequestFilesAsFileUrlExample.php new file mode 100644 index 000000000..feb6ac055 --- /dev/null +++ b/sandbox/php/src/SignatureRequestFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsFileUrl( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestFilesExample.php b/sandbox/php/src/SignatureRequestFilesExample.php new file mode 100644 index 000000000..b11f5ae30 --- /dev/null +++ b/sandbox/php/src/SignatureRequestFilesExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFiles( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type: "pdf", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestFiles: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestGetExample.php b/sandbox/php/src/SignatureRequestGetExample.php new file mode 100644 index 000000000..dfb79eda9 --- /dev/null +++ b/sandbox/php/src/SignatureRequestGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestListExample.php b/sandbox/php/src/SignatureRequestListExample.php new file mode 100644 index 000000000..9cf737c26 --- /dev/null +++ b/sandbox/php/src/SignatureRequestListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestReleaseHoldExample.php b/sandbox/php/src/SignatureRequestReleaseHoldExample.php new file mode 100644 index 000000000..dcbbd1b31 --- /dev/null +++ b/sandbox/php/src/SignatureRequestReleaseHoldExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestReleaseHold( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestReleaseHold: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestRemindExample.php b/sandbox/php/src/SignatureRequestRemindExample.php new file mode 100644 index 000000000..10b5086a4 --- /dev/null +++ b/sandbox/php/src/SignatureRequestRemindExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_remind_request = (new Dropbox\Sign\Model\SignatureRequestRemindRequest()) + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemind( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request: $signature_request_remind_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemind: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestRemoveExample.php b/sandbox/php/src/SignatureRequestRemoveExample.php new file mode 100644 index 000000000..87ecc7e6f --- /dev/null +++ b/sandbox/php/src/SignatureRequestRemoveExample.php @@ -0,0 +1,19 @@ +setUsername("YOUR_API_KEY"); + +try { + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemove( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestRemove: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestSendExample.php b/sandbox/php/src/SignatureRequestSendExample.php new file mode 100644 index 000000000..f922a579e --- /dev/null +++ b/sandbox/php/src/SignatureRequestSendExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestSendGroupedSignersExample.php b/sandbox/php/src/SignatureRequestSendGroupedSignersExample.php new file mode 100644 index 000000000..bec0368b8 --- /dev/null +++ b/sandbox/php/src/SignatureRequestSendGroupedSignersExample.php @@ -0,0 +1,95 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$grouped_signers_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Bob") + ->setEmailAddress("bob@example.com"); + +$grouped_signers_2_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Charlie") + ->setEmailAddress("charlie@example.com"); + +$grouped_signers_2_signers = [ + $grouped_signers_2_signers_1, + $grouped_signers_2_signers_2, +]; + +$grouped_signers_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com"); + +$grouped_signers_1_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com"); + +$grouped_signers_1_signers = [ + $grouped_signers_1_signers_1, + $grouped_signers_1_signers_2, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$grouped_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #1") + ->setOrder(0) + ->setSigners($grouped_signers_1_signers); + +$grouped_signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestGroupedSigners()) + ->setGroup("Group #2") + ->setOrder(1) + ->setSigners($grouped_signers_2_signers); + +$grouped_signers = [ + $grouped_signers_1, + $grouped_signers_2, +]; + +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setGroupedSigners($grouped_signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestSendWithTemplateExample.php b/sandbox/php/src/SignatureRequestSendWithTemplateExample.php new file mode 100644 index 000000000..d68205392 --- /dev/null +++ b/sandbox/php/src/SignatureRequestSendWithTemplateExample.php @@ -0,0 +1,68 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSendWithTemplate( + signature_request_send_with_template_request: $signature_request_send_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/SignatureRequestUpdateExample.php b/sandbox/php/src/SignatureRequestUpdateExample.php new file mode 100644 index 000000000..818add598 --- /dev/null +++ b/sandbox/php/src/SignatureRequestUpdateExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signature_request_update_request = (new Dropbox\Sign\Model\SignatureRequestUpdateRequest()) + ->setSignatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f") + ->setEmailAddress("john@example.com"); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestUpdate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request: $signature_request_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamAddMemberAccountIdExample.php b/sandbox/php/src/TeamAddMemberAccountIdExample.php new file mode 100644 index 000000000..f864f4437 --- /dev/null +++ b/sandbox/php/src/TeamAddMemberAccountIdExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamAddMemberExample.php b/sandbox/php/src/TeamAddMemberExample.php new file mode 100644 index 000000000..441e34dbe --- /dev/null +++ b/sandbox/php/src/TeamAddMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setEmailAddress("george@example.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamCreateExample.php b/sandbox/php/src/TeamCreateExample.php new file mode 100644 index 000000000..aabcac028 --- /dev/null +++ b/sandbox/php/src/TeamCreateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamDeleteExample.php b/sandbox/php/src/TeamDeleteExample.php new file mode 100644 index 000000000..9c429b748 --- /dev/null +++ b/sandbox/php/src/TeamDeleteExample.php @@ -0,0 +1,18 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamGetExample.php b/sandbox/php/src/TeamGetExample.php new file mode 100644 index 000000000..79c6e054d --- /dev/null +++ b/sandbox/php/src/TeamGetExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamInfoExample.php b/sandbox/php/src/TeamInfoExample.php new file mode 100644 index 000000000..c908d5182 --- /dev/null +++ b/sandbox/php/src/TeamInfoExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamInvitesExample.php b/sandbox/php/src/TeamInvitesExample.php new file mode 100644 index 000000000..db9459376 --- /dev/null +++ b/sandbox/php/src/TeamInvitesExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamMembersExample.php b/sandbox/php/src/TeamMembersExample.php new file mode 100644 index 000000000..79c0343b1 --- /dev/null +++ b/sandbox/php/src/TeamMembersExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamRemoveMemberAccountIdExample.php b/sandbox/php/src/TeamRemoveMemberAccountIdExample.php new file mode 100644 index 000000000..90d902633 --- /dev/null +++ b/sandbox/php/src/TeamRemoveMemberAccountIdExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setAccountId("f57db65d3f933b5316d398057a36176831451a35"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamRemoveMemberExample.php b/sandbox/php/src/TeamRemoveMemberExample.php new file mode 100644 index 000000000..3212aa335 --- /dev/null +++ b/sandbox/php/src/TeamRemoveMemberExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") + ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamSubTeamsExample.php b/sandbox/php/src/TeamSubTeamsExample.php new file mode 100644 index 000000000..ae7a990e2 --- /dev/null +++ b/sandbox/php/src/TeamSubTeamsExample.php @@ -0,0 +1,24 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSubTeams( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamSubTeams: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TeamUpdateExample.php b/sandbox/php/src/TeamUpdateExample.php new file mode 100644 index 000000000..3338af6e6 --- /dev/null +++ b/sandbox/php/src/TeamUpdateExample.php @@ -0,0 +1,25 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); + +try { + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateAddUserExample.php b/sandbox/php/src/TemplateAddUserExample.php new file mode 100644 index 000000000..a76613a1d --- /dev/null +++ b/sandbox/php/src/TemplateAddUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_add_user_request = (new Dropbox\Sign\Model\TemplateAddUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateAddUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request: $template_add_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateAddUser: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateEmbeddedDraftExample.php b/sandbox/php/src/TemplateCreateEmbeddedDraftExample.php new file mode 100644 index 000000000..bf035f3cb --- /dev/null +++ b/sandbox/php/src/TemplateCreateEmbeddedDraftExample.php @@ -0,0 +1,66 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php new file mode 100644 index 000000000..120c310df --- /dev/null +++ b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.php b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.php new file mode 100644 index 000000000..3997bcde0 --- /dev/null +++ b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..6dc4c93c7 --- /dev/null +++ b/sandbox/php/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateExample.php b/sandbox/php/src/TemplateCreateExample.php new file mode 100644 index 000000000..93b6dedd0 --- /dev/null +++ b/sandbox/php/src/TemplateCreateExample.php @@ -0,0 +1,100 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateFormFieldGroupsExample.php b/sandbox/php/src/TemplateCreateFormFieldGroupsExample.php new file mode 100644 index 000000000..1c0e02063 --- /dev/null +++ b/sandbox/php/src/TemplateCreateFormFieldGroupsExample.php @@ -0,0 +1,113 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldGroups($form_field_groups) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateFormFieldRulesExample.php b/sandbox/php/src/TemplateCreateFormFieldRulesExample.php new file mode 100644 index 000000000..1b275240d --- /dev/null +++ b/sandbox/php/src/TemplateCreateFormFieldRulesExample.php @@ -0,0 +1,129 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setFormFieldRules($form_field_rules) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateCreateFormFieldsPerDocumentExample.php b/sandbox/php/src/TemplateCreateFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..a4f60e965 --- /dev/null +++ b/sandbox/php/src/TemplateCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,101 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); + +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") + ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); + +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setCcRoles([ + "Manager", + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateDeleteExample.php b/sandbox/php/src/TemplateDeleteExample.php new file mode 100644 index 000000000..63c7a6a72 --- /dev/null +++ b/sandbox/php/src/TemplateDeleteExample.php @@ -0,0 +1,20 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateDelete( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateDelete: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateFilesAsDataUriExample.php b/sandbox/php/src/TemplateFilesAsDataUriExample.php new file mode 100644 index 000000000..df19ef818 --- /dev/null +++ b/sandbox/php/src/TemplateFilesAsDataUriExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateFilesAsFileUrlExample.php b/sandbox/php/src/TemplateFilesAsFileUrlExample.php new file mode 100644 index 000000000..d4fb8f53c --- /dev/null +++ b/sandbox/php/src/TemplateFilesAsFileUrlExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsFileUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + force_download: 1, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFilesAsFileUrl: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateFilesExample.php b/sandbox/php/src/TemplateFilesExample.php new file mode 100644 index 000000000..2e2f46f74 --- /dev/null +++ b/sandbox/php/src/TemplateFilesExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateFiles: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateGetExample.php b/sandbox/php/src/TemplateGetExample.php new file mode 100644 index 000000000..3625ff5a4 --- /dev/null +++ b/sandbox/php/src/TemplateGetExample.php @@ -0,0 +1,22 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateListExample.php b/sandbox/php/src/TemplateListExample.php new file mode 100644 index 000000000..eafde32da --- /dev/null +++ b/sandbox/php/src/TemplateListExample.php @@ -0,0 +1,23 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateList( + page: 1, + page_size: 20, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateList: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateRemoveUserExample.php b/sandbox/php/src/TemplateRemoveUserExample.php new file mode 100644 index 000000000..ecd5770f4 --- /dev/null +++ b/sandbox/php/src/TemplateRemoveUserExample.php @@ -0,0 +1,26 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_remove_user_request = (new Dropbox\Sign\Model\TemplateRemoveUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateRemoveUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request: $template_remove_user_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateRemoveUser: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/TemplateUpdateFilesExample.php b/sandbox/php/src/TemplateUpdateFilesExample.php new file mode 100644 index 000000000..26470da0f --- /dev/null +++ b/sandbox/php/src/TemplateUpdateFilesExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$template_update_files_request = (new Dropbox\Sign\Model\TemplateUpdateFilesRequest()) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request: $template_update_files_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling TemplateApi#templateUpdateFiles: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateEmbeddedExample.php b/sandbox/php/src/UnclaimedDraftCreateEmbeddedExample.php new file mode 100644 index 000000000..4ad74cf2c --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateEmbeddedExample.php @@ -0,0 +1,29 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(true) + ->setFiles([ + ]); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php new file mode 100644 index 000000000..c56719913 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.php @@ -0,0 +1,76 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php new file mode 100644 index 000000000..49f7d493d --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.php @@ -0,0 +1,92 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..249c7eacb --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.php @@ -0,0 +1,64 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.php b/sandbox/php/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.php new file mode 100644 index 000000000..d51e60ee7 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.php @@ -0,0 +1,49 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@dropboxsign.com"); + +$ccs = [ + $ccs_1, +]; + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setRequesterEmailAddress("jack@dropboxsign.com") + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setTestMode(false) + ->setCcs($ccs) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( + unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateExample.php b/sandbox/php/src/UnclaimedDraftCreateExample.php new file mode 100644 index 000000000..8aa132af0 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateExample.php @@ -0,0 +1,38 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers = [ + $signers_1, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(true) + ->setFiles([ + ]) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateFormFieldGroupsExample.php b/sandbox/php/src/UnclaimedDraftCreateFormFieldGroupsExample.php new file mode 100644 index 000000000..92ec35b20 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateFormFieldGroupsExample.php @@ -0,0 +1,75 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_groups_1 = (new Dropbox\Sign\Model\SubFormFieldGroup()) + ->setGroupId("RadioItemGroup1") + ->setGroupLabel("Radio Item Group 1") + ->setRequirement("require_0-1"); + +$form_field_groups = [ + $form_field_groups_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(328) + ->setGroup("RadioItemGroup1") + ->setIsChecked(true) + ->setName("") + ->setPage(1); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentRadio()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("radio") + ->setRequired(false) + ->setSigner("0") + ->setWidth(18) + ->setHeight(18) + ->setX(112) + ->setY(370) + ->setGroup("RadioItemGroup1") + ->setIsChecked(false) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldGroups($form_field_groups) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateFormFieldRulesExample.php b/sandbox/php/src/UnclaimedDraftCreateFormFieldRulesExample.php new file mode 100644 index 000000000..69bdb8503 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateFormFieldRulesExample.php @@ -0,0 +1,91 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_field_rules_1_triggers_1 = (new Dropbox\Sign\Model\SubFormFieldRuleTrigger()) + ->setId("uniqueIdHere_1") + ->setOperator(Dropbox\Sign\Model\SubFormFieldRuleTrigger::OPERATOR_IS) + ->setValue("foo"); + +$form_field_rules_1_triggers = [ + $form_field_rules_1_triggers_1, +]; + +$form_field_rules_1_actions_1 = (new Dropbox\Sign\Model\SubFormFieldRuleAction()) + ->setHidden(true) + ->setType(Dropbox\Sign\Model\SubFormFieldRuleAction::TYPE_CHANGE_FIELD_VISIBILITY) + ->setFieldId("uniqueIdHere_2"); + +$form_field_rules_1_actions = [ + $form_field_rules_1_actions_1, +]; + +$form_field_rules_1 = (new Dropbox\Sign\Model\SubFormFieldRule()) + ->setId("rule_1") + ->setTriggerOperator("AND") + ->setTriggers($form_field_rules_1_triggers) + ->setActions($form_field_rules_1_actions); + +$form_field_rules = [ + $form_field_rules_1, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("0") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldRules($form_field_rules) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.php b/sandbox/php/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.php new file mode 100644 index 000000000..93e3b015a --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.php @@ -0,0 +1,63 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) + ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) + ->setTestMode(false) + ->setFileUrls([ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ]) + ->setFormFieldsPerDocument($form_fields_per_document); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; +} diff --git a/sandbox/php/src/UnclaimedDraftEditAndResendExample.php b/sandbox/php/src/UnclaimedDraftEditAndResendExample.php new file mode 100644 index 000000000..f82ea4946 --- /dev/null +++ b/sandbox/php/src/UnclaimedDraftEditAndResendExample.php @@ -0,0 +1,27 @@ +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$unclaimed_draft_edit_and_resend_request = (new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTestMode(false); + +try { + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftEditAndResend( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request: $unclaimed_draft_edit_and_resend_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend: {$e->getMessage()}"; +} diff --git a/sandbox/php/test/.config.dist.json b/sandbox/php/test/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/php/test/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/php/test/.gitignore b/sandbox/php/test/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/php/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/php/test/SignatureRequestTest.php b/sandbox/php/test/SignatureRequestTest.php deleted file mode 100644 index 052808b36..000000000 --- a/sandbox/php/test/SignatureRequestTest.php +++ /dev/null @@ -1,151 +0,0 @@ -client_id = $config['CLIENT_ID']; - - $this->config = new Sign\Configuration(); - $this->config->setUsername($config['API_KEY']); - $this->config->setHost($config['BASE_URL']); - - if ($config['USE_XDEBUG']) { - $cookies = CookieJar::fromArray( - ['XDEBUG_SESSION' => 'xdebug'], - parse_url($config['BASE_URL'], PHP_URL_HOST), - ); - - $this->config->setOptions(['cookies' => $cookies]); - } - } - - public function testSend(): void - { - $signature_request_api = new Sign\Api\SignatureRequestApi($this->config); - - $data = json_decode( - file_get_contents(self::FIXTURES_DIR . '/SignatureRequestSendRequest.json'), - true, - ); - $file = new SplFileObject(self::FIXTURES_DIR . '/pdf-sample.pdf'); - $data['files'] = [$file]; - - $send_request = Sign\Model\SignatureRequestSendRequest::init($data); - - $send_response = $signature_request_api->signatureRequestSend($send_request); - - $this->assertEquals( - $send_request->getFormFieldsPerDocument()[0]->getApiId(), - $send_response->getSignatureRequest()->getCustomFields()[0]->getApiId(), - ); - - $this->assertEquals( - $send_request->getSigners()[0]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[0]->getSignerEmailAddress(), - ); - $this->assertEquals( - $send_request->getSigners()[1]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[1]->getSignerEmailAddress(), - ); - $this->assertEquals( - $send_request->getSigners()[2]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[2]->getSignerEmailAddress(), - ); - - $get_response = $signature_request_api->signatureRequestGet( - $send_response->getSignatureRequest()->getSignatureRequestId(), - ); - - $this->assertSame( - $send_response->getSignatureRequest()->getSignatureRequestId(), - $get_response->getSignatureRequest()->getSignatureRequestId(), - ); - } - - public function testCreateEmbedded(): void - { - $signature_request_api = new Sign\Api\SignatureRequestApi($this->config); - - $data = json_decode( - file_get_contents(self::FIXTURES_DIR . '/SignatureRequestCreateEmbeddedRequest.json'), - true, - ); - $file = new SplFileObject(self::FIXTURES_DIR . '/pdf-sample.pdf'); - $data['files'] = [$file]; - $data['client_id'] = $this->client_id; - - $send_request = Sign\Model\SignatureRequestCreateEmbeddedRequest::init($data); - - $send_response = $signature_request_api->signatureRequestCreateEmbedded($send_request); - - $this->assertEquals( - $send_request->getSigners()[0]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[0]->getSignerEmailAddress(), - ); - $this->assertEquals( - $send_request->getSigners()[1]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[1]->getSignerEmailAddress(), - ); - $this->assertEquals( - $send_request->getSigners()[2]->getEmailAddress(), - $send_response->getSignatureRequest()->getSignatures()[2]->getSignerEmailAddress(), - ); - - $embedded_api = new Sign\Api\EmbeddedApi($this->config); - - $get_response = $embedded_api->embeddedSignUrl( - $send_response->getSignatureRequest()->getSignatures()[0]->getSignatureId(), - ); - - $this->assertNotEmpty($get_response->getEmbedded()->getSignUrl()); - } - - public function testSendWithoutFileError(): void - { - $signature_request_api = new Sign\Api\SignatureRequestApi($this->config); - - $data = json_decode( - file_get_contents(self::FIXTURES_DIR . '/SignatureRequestSendRequest.json'), - true, - ); - - $request = Sign\Model\SignatureRequestSendRequest::init($data); - - try { - $response = $signature_request_api->signatureRequestSend($request); - - $this->fail('Should have thrown: ' . print_r($response, true)); - } catch (Sign\ApiException $e) { - $error = $e->getResponseObject(); - - $this->assertEquals('file', $error->getError()->getErrorPath()); - } - } -} diff --git a/sandbox/php/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/php/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/php/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/php/test_fixtures/SignatureRequestSendRequest.json b/sandbox/php/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/php/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/php/test_fixtures/pdf-sample.pdf b/sandbox/php/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/php/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/python/.gitignore b/sandbox/python/.gitignore new file mode 100644 index 000000000..a415184a1 --- /dev/null +++ b/sandbox/python/.gitignore @@ -0,0 +1,2 @@ +venv +.venv diff --git a/sandbox/python/Example.py b/sandbox/python/Example.py deleted file mode 100644 index 6777ecd48..000000000 --- a/sandbox/python/Example.py +++ /dev/null @@ -1,25 +0,0 @@ -from pprint import pprint - -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models - -configuration = Configuration( - # Configure HTTP basic authorization: api_key - username="YOUR_API_KEY", - - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", -) - -with ApiClient(configuration) as api_client: - api = apis.AccountApi(api_client) - - data = models.AccountCreateRequest( - email_address="newuser@dropboxsign.com", - ) - - try: - response = api.account_create(data) - pprint(response) - except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/sandbox/python/src/AccountCreateExample.py b/sandbox/python/src/AccountCreateExample.py new file mode 100644 index 000000000..f911a898b --- /dev/null +++ b/sandbox/python/src/AccountCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_create_request = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + ) + + try: + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_create: %s\n" % e) diff --git a/sandbox/python/src/AccountCreateOauthExample.py b/sandbox/python/src/AccountCreateOauthExample.py new file mode 100644 index 000000000..8930f04d6 --- /dev/null +++ b/sandbox/python/src/AccountCreateOauthExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_create_request = models.AccountCreateRequest( + email_address="newuser@dropboxsign.com", + client_id="cc91c61d00f8bb2ece1428035716b", + client_secret="1d14434088507ffa390e6f5528465", + ) + + try: + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_create: %s\n" % e) diff --git a/sandbox/python/src/AccountGetExample.py b/sandbox/python/src/AccountGetExample.py new file mode 100644 index 000000000..d7e910dd6 --- /dev/null +++ b/sandbox/python/src/AccountGetExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.AccountApi(api_client).account_get() + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_get: %s\n" % e) diff --git a/sandbox/python/src/AccountUpdateExample.py b/sandbox/python/src/AccountUpdateExample.py new file mode 100644 index 000000000..5ef5466ea --- /dev/null +++ b/sandbox/python/src/AccountUpdateExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_update_request = models.AccountUpdateRequest( + callback_url="https://www.example.com/callback", + locale="en-US", + ) + + try: + response = api.AccountApi(api_client).account_update( + account_update_request=account_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_update: %s\n" % e) diff --git a/sandbox/python/src/AccountVerifyExample.py b/sandbox/python/src/AccountVerifyExample.py new file mode 100644 index 000000000..65bdb8018 --- /dev/null +++ b/sandbox/python/src/AccountVerifyExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + account_verify_request = models.AccountVerifyRequest( + email_address="some_user@dropboxsign.com", + ) + + try: + response = api.AccountApi(api_client).account_verify( + account_verify_request=account_verify_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling AccountApi#account_verify: %s\n" % e) diff --git a/sandbox/python/src/ApiAppCreateExample.py b/sandbox/python/src/ApiAppCreateExample.py new file mode 100644 index 000000000..345edd053 --- /dev/null +++ b/sandbox/python/src/ApiAppCreateExample.py @@ -0,0 +1,43 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=[ + "basic_account_info", + "request_signature", + ], + ) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + api_app_create_request = models.ApiAppCreateRequest( + name="My Production App", + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), + oauth=oauth, + white_labeling_options=white_labeling_options, + ) + + try: + response = api.ApiAppApi(api_client).api_app_create( + api_app_create_request=api_app_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_create: %s\n" % e) diff --git a/sandbox/python/src/ApiAppDeleteExample.py b/sandbox/python/src/ApiAppDeleteExample.py new file mode 100644 index 000000000..bcfe5d65b --- /dev/null +++ b/sandbox/python/src/ApiAppDeleteExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.ApiAppApi(api_client).api_app_delete( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_delete: %s\n" % e) diff --git a/sandbox/python/src/ApiAppGetExample.py b/sandbox/python/src/ApiAppGetExample.py new file mode 100644 index 000000000..0eee76c6a --- /dev/null +++ b/sandbox/python/src/ApiAppGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.ApiAppApi(api_client).api_app_get( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_get: %s\n" % e) diff --git a/sandbox/python/src/ApiAppListExample.py b/sandbox/python/src/ApiAppListExample.py new file mode 100644 index 000000000..c0bca67da --- /dev/null +++ b/sandbox/python/src/ApiAppListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.ApiAppApi(api_client).api_app_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_list: %s\n" % e) diff --git a/sandbox/python/src/ApiAppUpdateExample.py b/sandbox/python/src/ApiAppUpdateExample.py new file mode 100644 index 000000000..00212198f --- /dev/null +++ b/sandbox/python/src/ApiAppUpdateExample.py @@ -0,0 +1,45 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=[ + "basic_account_info", + "request_signature", + ], + ) + + white_labeling_options = models.SubWhiteLabelingOptions( + primary_button_color="#00b3e6", + primary_button_text_color="#ffffff", + ) + + api_app_update_request = models.ApiAppUpdateRequest( + callback_url="https://example.com/dropboxsign", + name="New Name", + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), + oauth=oauth, + white_labeling_options=white_labeling_options, + ) + + try: + response = api.ApiAppApi(api_client).api_app_update( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request=api_app_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ApiAppApi#api_app_update: %s\n" % e) diff --git a/sandbox/python/src/BulkSendJobGetExample.py b/sandbox/python/src/BulkSendJobGetExample.py new file mode 100644 index 000000000..58b865737 --- /dev/null +++ b/sandbox/python/src/BulkSendJobGetExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.BulkSendJobApi(api_client).bulk_send_job_get( + bulk_send_job_id="6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling BulkSendJobApi#bulk_send_job_get: %s\n" % e) diff --git a/sandbox/python/src/BulkSendJobListExample.py b/sandbox/python/src/BulkSendJobListExample.py new file mode 100644 index 000000000..cb688f24d --- /dev/null +++ b/sandbox/python/src/BulkSendJobListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.BulkSendJobApi(api_client).bulk_send_job_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling BulkSendJobApi#bulk_send_job_list: %s\n" % e) diff --git a/sandbox/python/src/EmbeddedEditUrlExample.py b/sandbox/python/src/EmbeddedEditUrlExample.py new file mode 100644 index 000000000..0c8577780 --- /dev/null +++ b/sandbox/python/src/EmbeddedEditUrlExample.py @@ -0,0 +1,31 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + merge_fields = [ + ] + + embedded_edit_url_request = models.EmbeddedEditUrlRequest( + cc_roles=[ + "", + ], + merge_fields=merge_fields, + ) + + try: + response = api.EmbeddedApi(api_client).embedded_edit_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request=embedded_edit_url_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling EmbeddedApi#embedded_edit_url: %s\n" % e) diff --git a/sandbox/python/src/EmbeddedSignUrlExample.py b/sandbox/python/src/EmbeddedSignUrlExample.py new file mode 100644 index 000000000..903945d90 --- /dev/null +++ b/sandbox/python/src/EmbeddedSignUrlExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.EmbeddedApi(api_client).embedded_sign_url( + signature_id="50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling EmbeddedApi#embedded_sign_url: %s\n" % e) diff --git a/sandbox/python/src/EventCallbackExample.py b/sandbox/python/src/EventCallbackExample.py new file mode 100644 index 000000000..38394d4d1 --- /dev/null +++ b/sandbox/python/src/EventCallbackExample.py @@ -0,0 +1,31 @@ +import json + +from dropbox_sign import ApiClient, EventCallbackHelper +from dropbox_sign.models import EventCallbackRequest + +# use your API key +api_key = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782" + +# callback_data represents data we send to you +callback_data = { + "event": { + "event_type": "account_confirmed", + "event_time": "1669926463", + "event_hash": "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + "event_metadata": { + "related_signature_id": None, + "reported_for_account_id": "6421d70b9bd45059fa207d03ab8d1b96515b472c", + "reported_for_app_id": None, + "event_message": None, + }, + }, +} + +callback_event = EventCallbackRequest.init(callback_data) + +# verify that a callback came from HelloSign.com +if EventCallbackHelper.is_valid(api_key, callback_event): + # one of "account_callback" or "api_app_callback" + callback_type = EventCallbackHelper.get_callback_type(callback_event) + + # do your magic below! diff --git a/sandbox/python/src/FaxDeleteExample.py b/sandbox/python/src/FaxDeleteExample.py new file mode 100644 index 000000000..76774d75b --- /dev/null +++ b/sandbox/python/src/FaxDeleteExample.py @@ -0,0 +1,17 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + api.FaxApi(api_client).fax_delete( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling FaxApi#fax_delete: %s\n" % e) diff --git a/sandbox/python/src/FaxFilesExample.py b/sandbox/python/src/FaxFilesExample.py new file mode 100644 index 000000000..4bc18d604 --- /dev/null +++ b/sandbox/python/src/FaxFilesExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_files( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling FaxApi#fax_files: %s\n" % e) diff --git a/sandbox/python/src/FaxGetExample.py b/sandbox/python/src/FaxGetExample.py new file mode 100644 index 000000000..e1288e656 --- /dev/null +++ b/sandbox/python/src/FaxGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_get( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_get: %s\n" % e) diff --git a/sandbox/python/src/FaxLineAddUserExample.py b/sandbox/python/src/FaxLineAddUserExample.py new file mode 100644 index 000000000..255ac248b --- /dev/null +++ b/sandbox/python/src/FaxLineAddUserExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_add_user_request = models.FaxLineAddUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_add_user( + fax_line_add_user_request=fax_line_add_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_add_user: %s\n" % e) diff --git a/sandbox/python/src/FaxLineAreaCodeGetExample.py b/sandbox/python/src/FaxLineAreaCodeGetExample.py new file mode 100644 index 000000000..52310c75a --- /dev/null +++ b/sandbox/python/src/FaxLineAreaCodeGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_area_code_get( + country="US", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_area_code_get: %s\n" % e) diff --git a/sandbox/python/src/FaxLineCreateExample.py b/sandbox/python/src/FaxLineCreateExample.py new file mode 100644 index 000000000..3f7be1223 --- /dev/null +++ b/sandbox/python/src/FaxLineCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_create_request = models.FaxLineCreateRequest( + area_code=209, + country="US", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_create( + fax_line_create_request=fax_line_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_create: %s\n" % e) diff --git a/sandbox/python/src/FaxLineDeleteExample.py b/sandbox/python/src/FaxLineDeleteExample.py new file mode 100644 index 000000000..e5e7c23ea --- /dev/null +++ b/sandbox/python/src/FaxLineDeleteExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_delete_request = models.FaxLineDeleteRequest( + number="[FAX_NUMBER]", + ) + + try: + api.FaxLineApi(api_client).fax_line_delete( + fax_line_delete_request=fax_line_delete_request, + ) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_delete: %s\n" % e) diff --git a/sandbox/python/src/FaxLineGetExample.py b/sandbox/python/src/FaxLineGetExample.py new file mode 100644 index 000000000..56d2a204d --- /dev/null +++ b/sandbox/python/src/FaxLineGetExample.py @@ -0,0 +1,19 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_get( + number="123-123-1234", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_get: %s\n" % e) diff --git a/sandbox/python/src/FaxLineListExample.py b/sandbox/python/src/FaxLineListExample.py new file mode 100644 index 000000000..5e3822e75 --- /dev/null +++ b/sandbox/python/src/FaxLineListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxLineApi(api_client).fax_line_list( + account_id="ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_list: %s\n" % e) diff --git a/sandbox/python/src/FaxLineRemoveUserExample.py b/sandbox/python/src/FaxLineRemoveUserExample.py new file mode 100644 index 000000000..366957bac --- /dev/null +++ b/sandbox/python/src/FaxLineRemoveUserExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_line_remove_user_request = models.FaxLineRemoveUserRequest( + number="[FAX_NUMBER]", + email_address="member@dropboxsign.com", + ) + + try: + response = api.FaxLineApi(api_client).fax_line_remove_user( + fax_line_remove_user_request=fax_line_remove_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxLineApi#fax_line_remove_user: %s\n" % e) diff --git a/sandbox/python/src/FaxListExample.py b/sandbox/python/src/FaxListExample.py new file mode 100644 index 000000000..44f840a7f --- /dev/null +++ b/sandbox/python/src/FaxListExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + response = api.FaxApi(api_client).fax_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_list: %s\n" % e) diff --git a/sandbox/python/src/FaxSendExample.py b/sandbox/python/src/FaxSendExample.py new file mode 100644 index 000000000..77fbf8bbf --- /dev/null +++ b/sandbox/python/src/FaxSendExample.py @@ -0,0 +1,32 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + fax_send_request = models.FaxSendRequest( + recipient="16690000001", + sender="16690000000", + test_mode=True, + cover_page_to="Jill Fax", + cover_page_from="Faxer Faxerson", + cover_page_message="I'm sending you a fax!", + title="This is what the fax is about!", + files=[ + open("./example_fax.pdf", "rb").read(), + ], + ) + + try: + response = api.FaxApi(api_client).fax_send( + fax_send_request=fax_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling FaxApi#fax_send: %s\n" % e) diff --git a/sandbox/python/src/OauthTokenGenerateExample.py b/sandbox/python/src/OauthTokenGenerateExample.py new file mode 100644 index 000000000..69cec3ffd --- /dev/null +++ b/sandbox/python/src/OauthTokenGenerateExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( +) + +with ApiClient(configuration) as api_client: + o_auth_token_generate_request = models.OAuthTokenGenerateRequest( + client_id="cc91c61d00f8bb2ece1428035716b", + client_secret="1d14434088507ffa390e6f5528465", + code="1b0d28d90c86c141", + state="900e06e2", + grant_type="authorization_code", + ) + + try: + response = api.OAuthApi(api_client).oauth_token_generate( + o_auth_token_generate_request=o_auth_token_generate_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling OAuthApi#oauth_token_generate: %s\n" % e) diff --git a/sandbox/python/src/OauthTokenRefreshExample.py b/sandbox/python/src/OauthTokenRefreshExample.py new file mode 100644 index 000000000..7bd30fbf8 --- /dev/null +++ b/sandbox/python/src/OauthTokenRefreshExample.py @@ -0,0 +1,23 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( +) + +with ApiClient(configuration) as api_client: + o_auth_token_refresh_request = models.OAuthTokenRefreshRequest( + grant_type="refresh_token", + refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", + ) + + try: + response = api.OAuthApi(api_client).oauth_token_refresh( + o_auth_token_refresh_request=o_auth_token_refresh_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling OAuthApi#oauth_token_refresh: %s\n" % e) diff --git a/sandbox/python/src/ReportCreateExample.py b/sandbox/python/src/ReportCreateExample.py new file mode 100644 index 000000000..cfcc85d84 --- /dev/null +++ b/sandbox/python/src/ReportCreateExample.py @@ -0,0 +1,28 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + report_create_request = models.ReportCreateRequest( + start_date="09/01/2020", + end_date="09/01/2020", + report_type=[ + "user_activity", + "document_status", + ], + ) + + try: + response = api.ReportApi(api_client).report_create( + report_create_request=report_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling ReportApi#report_create: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py b/sandbox/python/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..b2cb98a38 --- /dev/null +++ b/sandbox/python/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] + + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] + + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + + signer_list_1 = models.SubBulkSignerList( + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, + ) + + signer_list_2 = models.SubBulkSignerList( + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, + ) + + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + signature_request_bulk_create_embedded_with_template_request = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + client_id="1a659d9ad95bccd307ecad78d72192f8", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestBulkSendWithTemplateExample.py b/sandbox/python/src/SignatureRequestBulkSendWithTemplateExample.py new file mode 100644 index 000000000..4a8fb41c5 --- /dev/null +++ b/sandbox/python/src/SignatureRequestBulkSendWithTemplateExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] + + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", + ) + + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="ABC Corp", + ) + + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] + + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + + signer_list_1 = models.SubBulkSignerList( + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, + ) + + signer_list_2 = models.SubBulkSignerList( + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, + ) + + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + signature_request_bulk_send_with_template_request = models.SignatureRequestBulkSendWithTemplateRequest( + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestCancelExample.py b/sandbox/python/src/SignatureRequestCancelExample.py new file mode 100644 index 000000000..6a0e62bc1 --- /dev/null +++ b/sandbox/python/src/SignatureRequestCancelExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.SignatureRequestApi(api_client).signature_request_cancel( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_cancel: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestCreateEmbeddedExample.py b/sandbox/python/src/SignatureRequestCreateEmbeddedExample.py new file mode 100644 index 000000000..2e1b93c1d --- /dev/null +++ b/sandbox/python/src/SignatureRequestCreateEmbeddedExample.py @@ -0,0 +1,62 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded( + signature_request_create_embedded_request=signature_request_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestCreateEmbeddedGroupedSignersExample.py b/sandbox/python/src/SignatureRequestCreateEmbeddedGroupedSignersExample.py new file mode 100644 index 000000000..8bc255e6f --- /dev/null +++ b/sandbox/python/src/SignatureRequestCreateEmbeddedGroupedSignersExample.py @@ -0,0 +1,92 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded( + signature_request_create_embedded_request=signature_request_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestCreateEmbeddedWithTemplateExample.py b/sandbox/python/src/SignatureRequestCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..6a5835760 --- /dev/null +++ b/sandbox/python/src/SignatureRequestCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,50 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_create_embedded_with_template_request = models.SignatureRequestCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditEmbeddedExample.py b/sandbox/python/src/SignatureRequestEditEmbeddedExample.py new file mode 100644 index 000000000..e3e5f1a87 --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditEmbeddedExample.py @@ -0,0 +1,63 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_embedded_request = models.SignatureRequestEditEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditEmbeddedGroupedSignersExample.py b/sandbox/python/src/SignatureRequestEditEmbeddedGroupedSignersExample.py new file mode 100644 index 000000000..9c26905c3 --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditEmbeddedGroupedSignersExample.py @@ -0,0 +1,93 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_edit_embedded_request = models.SignatureRequestEditEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditEmbeddedWithTemplateExample.py b/sandbox/python/src/SignatureRequestEditEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..92f0378ef --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditEmbeddedWithTemplateExample.py @@ -0,0 +1,51 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_edit_embedded_with_template_request = models.SignatureRequestEditEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditExample.py b/sandbox/python/src/SignatureRequestEditExample.py new file mode 100644 index 000000000..4c6fc1e74 --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditExample.py @@ -0,0 +1,73 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_request = models.SignatureRequestEditRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request=signature_request_edit_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditGroupedSignersExample.py b/sandbox/python/src/SignatureRequestEditGroupedSignersExample.py new file mode 100644 index 000000000..41f5a54dc --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditGroupedSignersExample.py @@ -0,0 +1,103 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_edit_request = models.SignatureRequestEditRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request=signature_request_edit_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestEditWithTemplateExample.py b/sandbox/python/src/SignatureRequestEditWithTemplateExample.py new file mode 100644 index 000000000..4e8653475 --- /dev/null +++ b/sandbox/python/src/SignatureRequestEditWithTemplateExample.py @@ -0,0 +1,72 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( + name="Cost", + editor="Client", + required=True, + value="$20,000", + ) + + custom_fields = [ + custom_fields_1, + ] + + signature_request_edit_with_template_request = models.SignatureRequestEditWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_edit_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request=signature_request_edit_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_edit_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestFilesAsDataUriExample.py b/sandbox/python/src/SignatureRequestFilesAsDataUriExample.py new file mode 100644 index 000000000..09a50923d --- /dev/null +++ b/sandbox/python/src/SignatureRequestFilesAsDataUriExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files_as_data_uri( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestFilesAsFileUrlExample.py b/sandbox/python/src/SignatureRequestFilesAsFileUrlExample.py new file mode 100644 index 000000000..9cd19e6db --- /dev/null +++ b/sandbox/python/src/SignatureRequestFilesAsFileUrlExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files_as_file_url( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download=1, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files_as_file_url: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestFilesExample.py b/sandbox/python/src/SignatureRequestFilesExample.py new file mode 100644 index 000000000..12694cc53 --- /dev/null +++ b/sandbox/python/src/SignatureRequestFilesExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_files( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type="pdf", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_files: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestGetExample.py b/sandbox/python/src/SignatureRequestGetExample.py new file mode 100644 index 000000000..47359ef9c --- /dev/null +++ b/sandbox/python/src/SignatureRequestGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_get( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_get: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestListExample.py b/sandbox/python/src/SignatureRequestListExample.py new file mode 100644 index 000000000..3255d2cc6 --- /dev/null +++ b/sandbox/python/src/SignatureRequestListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_list: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestReleaseHoldExample.py b/sandbox/python/src/SignatureRequestReleaseHoldExample.py new file mode 100644 index 000000000..e584b4fd2 --- /dev/null +++ b/sandbox/python/src/SignatureRequestReleaseHoldExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.SignatureRequestApi(api_client).signature_request_release_hold( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_release_hold: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestRemindExample.py b/sandbox/python/src/SignatureRequestRemindExample.py new file mode 100644 index 000000000..048db3092 --- /dev/null +++ b/sandbox/python/src/SignatureRequestRemindExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signature_request_remind_request = models.SignatureRequestRemindRequest( + email_address="john@example.com", + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_remind( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request=signature_request_remind_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_remind: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestRemoveExample.py b/sandbox/python/src/SignatureRequestRemoveExample.py new file mode 100644 index 000000000..3a380080b --- /dev/null +++ b/sandbox/python/src/SignatureRequestRemoveExample.py @@ -0,0 +1,17 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", +) + +with ApiClient(configuration) as api_client: + try: + api.SignatureRequestApi(api_client).signature_request_remove( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_remove: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestSendExample.py b/sandbox/python/src/SignatureRequestSendExample.py new file mode 100644 index 000000000..21b1bfc26 --- /dev/null +++ b/sandbox/python/src/SignatureRequestSendExample.py @@ -0,0 +1,72 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_send_request = models.SignatureRequestSendRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send( + signature_request_send_request=signature_request_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestSendGroupedSignersExample.py b/sandbox/python/src/SignatureRequestSendGroupedSignersExample.py new file mode 100644 index 000000000..3a7e649c6 --- /dev/null +++ b/sandbox/python/src/SignatureRequestSendGroupedSignersExample.py @@ -0,0 +1,102 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + grouped_signers_2_signers_1 = models.SubSignatureRequestSigner( + name="Bob", + email_address="bob@example.com", + ) + + grouped_signers_2_signers_2 = models.SubSignatureRequestSigner( + name="Charlie", + email_address="charlie@example.com", + ) + + grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, + ] + + grouped_signers_1_signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + ) + + grouped_signers_1_signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + ) + + grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + grouped_signers_1 = models.SubSignatureRequestGroupedSigners( + group="Group #1", + order=0, + signers=grouped_signers_1_signers, + ) + + grouped_signers_2 = models.SubSignatureRequestGroupedSigners( + group="Group #2", + order=1, + signers=grouped_signers_2_signers, + ) + + grouped_signers = [ + grouped_signers_1, + grouped_signers_2, + ] + + signature_request_send_request = models.SignatureRequestSendRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + metadata=json.loads(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + field_options=field_options, + signing_options=signing_options, + grouped_signers=grouped_signers, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send( + signature_request_send_request=signature_request_send_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestSendWithTemplateExample.py b/sandbox/python/src/SignatureRequestSendWithTemplateExample.py new file mode 100644 index 000000000..468a6b101 --- /dev/null +++ b/sandbox/python/src/SignatureRequestSendWithTemplateExample.py @@ -0,0 +1,71 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( + name="Cost", + editor="Client", + required=True, + value="$20,000", + ) + + custom_fields = [ + custom_fields_1, + ] + + signature_request_send_with_template_request = models.SignatureRequestSendWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_send_with_template( + signature_request_send_with_template_request=signature_request_send_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_send_with_template: %s\n" % e) diff --git a/sandbox/python/src/SignatureRequestUpdateExample.py b/sandbox/python/src/SignatureRequestUpdateExample.py new file mode 100644 index 000000000..0d9bc45fb --- /dev/null +++ b/sandbox/python/src/SignatureRequestUpdateExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signature_request_update_request = models.SignatureRequestUpdateRequest( + signature_id="2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + email_address="john@example.com", + ) + + try: + response = api.SignatureRequestApi(api_client).signature_request_update( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request=signature_request_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling SignatureRequestApi#signature_request_update: %s\n" % e) diff --git a/sandbox/python/src/TeamAddMemberAccountIdExample.py b/sandbox/python/src/TeamAddMemberAccountIdExample.py new file mode 100644 index 000000000..402e0f2c5 --- /dev/null +++ b/sandbox/python/src/TeamAddMemberAccountIdExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_add_member_request = models.TeamAddMemberRequest( + account_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + try: + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_add_member: %s\n" % e) diff --git a/sandbox/python/src/TeamAddMemberExample.py b/sandbox/python/src/TeamAddMemberExample.py new file mode 100644 index 000000000..caef04ea5 --- /dev/null +++ b/sandbox/python/src/TeamAddMemberExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_add_member_request = models.TeamAddMemberRequest( + email_address="george@example.com", + ) + + try: + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_add_member: %s\n" % e) diff --git a/sandbox/python/src/TeamCreateExample.py b/sandbox/python/src/TeamCreateExample.py new file mode 100644 index 000000000..88772104e --- /dev/null +++ b/sandbox/python/src/TeamCreateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_create_request = models.TeamCreateRequest( + name="New Team Name", + ) + + try: + response = api.TeamApi(api_client).team_create( + team_create_request=team_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_create: %s\n" % e) diff --git a/sandbox/python/src/TeamDeleteExample.py b/sandbox/python/src/TeamDeleteExample.py new file mode 100644 index 000000000..2da2f0be7 --- /dev/null +++ b/sandbox/python/src/TeamDeleteExample.py @@ -0,0 +1,16 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.TeamApi(api_client).team_delete() + except ApiException as e: + print("Exception when calling TeamApi#team_delete: %s\n" % e) diff --git a/sandbox/python/src/TeamGetExample.py b/sandbox/python/src/TeamGetExample.py new file mode 100644 index 000000000..dc0b0532e --- /dev/null +++ b/sandbox/python/src/TeamGetExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_get() + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_get: %s\n" % e) diff --git a/sandbox/python/src/TeamInfoExample.py b/sandbox/python/src/TeamInfoExample.py new file mode 100644 index 000000000..994688dc2 --- /dev/null +++ b/sandbox/python/src/TeamInfoExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_info( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_info: %s\n" % e) diff --git a/sandbox/python/src/TeamInvitesExample.py b/sandbox/python/src/TeamInvitesExample.py new file mode 100644 index 000000000..c9764ae11 --- /dev/null +++ b/sandbox/python/src/TeamInvitesExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_invites() + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_invites: %s\n" % e) diff --git a/sandbox/python/src/TeamMembersExample.py b/sandbox/python/src/TeamMembersExample.py new file mode 100644 index 000000000..92c3ebaf5 --- /dev/null +++ b/sandbox/python/src/TeamMembersExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_members( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_members: %s\n" % e) diff --git a/sandbox/python/src/TeamRemoveMemberAccountIdExample.py b/sandbox/python/src/TeamRemoveMemberAccountIdExample.py new file mode 100644 index 000000000..132ab54cb --- /dev/null +++ b/sandbox/python/src/TeamRemoveMemberAccountIdExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_remove_member_request = models.TeamRemoveMemberRequest( + account_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + try: + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) diff --git a/sandbox/python/src/TeamRemoveMemberExample.py b/sandbox/python/src/TeamRemoveMemberExample.py new file mode 100644 index 000000000..7847d7289 --- /dev/null +++ b/sandbox/python/src/TeamRemoveMemberExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_remove_member_request = models.TeamRemoveMemberRequest( + email_address="teammate@dropboxsign.com", + new_owner_email_address="new_teammate@dropboxsign.com", + ) + + try: + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) diff --git a/sandbox/python/src/TeamSubTeamsExample.py b/sandbox/python/src/TeamSubTeamsExample.py new file mode 100644 index 000000000..93afde113 --- /dev/null +++ b/sandbox/python/src/TeamSubTeamsExample.py @@ -0,0 +1,22 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TeamApi(api_client).team_sub_teams( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_sub_teams: %s\n" % e) diff --git a/sandbox/python/src/TeamUpdateExample.py b/sandbox/python/src/TeamUpdateExample.py new file mode 100644 index 000000000..e28eb2907 --- /dev/null +++ b/sandbox/python/src/TeamUpdateExample.py @@ -0,0 +1,24 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + team_update_request = models.TeamUpdateRequest( + name="New Team Name", + ) + + try: + response = api.TeamApi(api_client).team_update( + team_update_request=team_update_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TeamApi#team_update: %s\n" % e) diff --git a/sandbox/python/src/TemplateAddUserExample.py b/sandbox/python/src/TemplateAddUserExample.py new file mode 100644 index 000000000..5259a01d4 --- /dev/null +++ b/sandbox/python/src/TemplateAddUserExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_add_user_request = models.TemplateAddUserRequest( + email_address="george@dropboxsign.com", + ) + + try: + response = api.TemplateApi(api_client).template_add_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request=template_add_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_add_user: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateEmbeddedDraftExample.py b/sandbox/python/src/TemplateCreateEmbeddedDraftExample.py new file mode 100644 index 000000000..2e96c0a48 --- /dev/null +++ b/sandbox/python/src/TemplateCreateEmbeddedDraftExample.py @@ -0,0 +1,71 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py new file mode 100644 index 000000000..84232eacf --- /dev/null +++ b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.py @@ -0,0 +1,120 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.py b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.py new file mode 100644 index 000000000..e20394052 --- /dev/null +++ b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.py @@ -0,0 +1,138 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..b99b91ac7 --- /dev/null +++ b/sandbox/python/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + signer_roles=signer_roles, + ) + + try: + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create_embedded_draft: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateExample.py b/sandbox/python/src/TemplateCreateExample.py new file mode 100644 index 000000000..a6ed3611e --- /dev/null +++ b/sandbox/python/src/TemplateCreateExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateFormFieldGroupsExample.py b/sandbox/python/src/TemplateCreateFormFieldGroupsExample.py new file mode 100644 index 000000000..6a755d022 --- /dev/null +++ b/sandbox/python/src/TemplateCreateFormFieldGroupsExample.py @@ -0,0 +1,120 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + form_field_groups=form_field_groups, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateFormFieldRulesExample.py b/sandbox/python/src/TemplateCreateFormFieldRulesExample.py new file mode 100644 index 000000000..a7f2d94ff --- /dev/null +++ b/sandbox/python/src/TemplateCreateFormFieldRulesExample.py @@ -0,0 +1,138 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + form_field_rules=form_field_rules, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/sandbox/python/src/TemplateCreateFormFieldsPerDocumentExample.py b/sandbox/python/src/TemplateCreateFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..6e2185aa9 --- /dev/null +++ b/sandbox/python/src/TemplateCreateFormFieldsPerDocumentExample.py @@ -0,0 +1,107 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, + ) + + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( + name="Full Name", + type="text", + ) + + merge_fields_2 = models.SubMergeField( + name="Is Registered?", + type="checkbox", + ) + + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + template_create_request = models.TemplateCreateRequest( + client_id="37dee8d8440c66d54cfa05d92c160882", + message="For your approval", + subject="Please sign this document", + test_mode=True, + title="Test Template", + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + cc_roles=[ + "Manager", + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, + ) + + try: + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_create: %s\n" % e) diff --git a/sandbox/python/src/TemplateDeleteExample.py b/sandbox/python/src/TemplateDeleteExample.py new file mode 100644 index 000000000..3bf63f5ad --- /dev/null +++ b/sandbox/python/src/TemplateDeleteExample.py @@ -0,0 +1,18 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.TemplateApi(api_client).template_delete( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + except ApiException as e: + print("Exception when calling TemplateApi#template_delete: %s\n" % e) diff --git a/sandbox/python/src/TemplateFilesAsDataUriExample.py b/sandbox/python/src/TemplateFilesAsDataUriExample.py new file mode 100644 index 000000000..ce91dc6ec --- /dev/null +++ b/sandbox/python/src/TemplateFilesAsDataUriExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files_as_data_uri( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_files_as_data_uri: %s\n" % e) diff --git a/sandbox/python/src/TemplateFilesAsFileUrlExample.py b/sandbox/python/src/TemplateFilesAsFileUrlExample.py new file mode 100644 index 000000000..052891df2 --- /dev/null +++ b/sandbox/python/src/TemplateFilesAsFileUrlExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files_as_file_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + force_download=1, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_files_as_file_url: %s\n" % e) diff --git a/sandbox/python/src/TemplateFilesExample.py b/sandbox/python/src/TemplateFilesExample.py new file mode 100644 index 000000000..d1f056a90 --- /dev/null +++ b/sandbox/python/src/TemplateFilesExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + open("./file_response", "wb").write(response.read()) + except ApiException as e: + print("Exception when calling TemplateApi#template_files: %s\n" % e) diff --git a/sandbox/python/src/TemplateGetExample.py b/sandbox/python/src/TemplateGetExample.py new file mode 100644 index 000000000..2226f74d0 --- /dev/null +++ b/sandbox/python/src/TemplateGetExample.py @@ -0,0 +1,20 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_get( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_get: %s\n" % e) diff --git a/sandbox/python/src/TemplateListExample.py b/sandbox/python/src/TemplateListExample.py new file mode 100644 index 000000000..429531ec6 --- /dev/null +++ b/sandbox/python/src/TemplateListExample.py @@ -0,0 +1,21 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + response = api.TemplateApi(api_client).template_list( + page=1, + page_size=20, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_list: %s\n" % e) diff --git a/sandbox/python/src/TemplateRemoveUserExample.py b/sandbox/python/src/TemplateRemoveUserExample.py new file mode 100644 index 000000000..c44814c40 --- /dev/null +++ b/sandbox/python/src/TemplateRemoveUserExample.py @@ -0,0 +1,25 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_remove_user_request = models.TemplateRemoveUserRequest( + email_address="george@dropboxsign.com", + ) + + try: + response = api.TemplateApi(api_client).template_remove_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request=template_remove_user_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_remove_user: %s\n" % e) diff --git a/sandbox/python/src/TemplateUpdateFilesExample.py b/sandbox/python/src/TemplateUpdateFilesExample.py new file mode 100644 index 000000000..71ab006be --- /dev/null +++ b/sandbox/python/src/TemplateUpdateFilesExample.py @@ -0,0 +1,27 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + template_update_files_request = models.TemplateUpdateFilesRequest( + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + ) + + try: + response = api.TemplateApi(api_client).template_update_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request=template_update_files_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling TemplateApi#template_update_files: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateEmbeddedExample.py b/sandbox/python/src/UnclaimedDraftCreateEmbeddedExample.py new file mode 100644 index 000000000..dade05ec4 --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateEmbeddedExample.py @@ -0,0 +1,29 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py new file mode 100644 index 000000000..b825eeac8 --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.py @@ -0,0 +1,78 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py new file mode 100644 index 000000000..931cc0bdd --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.py @@ -0,0 +1,96 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..6828613cd --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.py @@ -0,0 +1,65 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_embedded_request = models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.py b/sandbox/python/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.py new file mode 100644 index 000000000..fbb76e6bf --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.py @@ -0,0 +1,50 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@dropboxsign.com", + ) + + ccs = [ + ccs_1, + ] + + signers_1 = models.SubUnclaimedDraftTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + unclaimed_draft_create_embedded_with_template_request = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + test_mode=False, + ccs=ccs, + signers=signers, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateExample.py b/sandbox/python/src/UnclaimedDraftCreateExample.py new file mode 100644 index 000000000..f7715b7ea --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateExample.py @@ -0,0 +1,39 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signers_1 = models.SubUnclaimedDraftSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers = [ + signers_1, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signers=signers, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateFormFieldGroupsExample.py b/sandbox/python/src/UnclaimedDraftCreateFormFieldGroupsExample.py new file mode 100644 index 000000000..4af69152a --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateFormFieldGroupsExample.py @@ -0,0 +1,77 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_groups_1 = models.SubFormFieldGroup( + group_id="RadioItemGroup1", + group_label="Radio Item Group 1", + requirement="require_0-1", + ) + + form_field_groups = [ + form_field_groups_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_1", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=328, + group="RadioItemGroup1", + is_checked=True, + name="", + page=1, + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentRadio( + document_index=0, + api_id="uniqueIdHere_2", + type="radio", + required=False, + signer="0", + width=18, + height=18, + x=112, + y=370, + group="RadioItemGroup1", + is_checked=False, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_groups=form_field_groups, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateFormFieldRulesExample.py b/sandbox/python/src/UnclaimedDraftCreateFormFieldRulesExample.py new file mode 100644 index 000000000..a0bba3023 --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateFormFieldRulesExample.py @@ -0,0 +1,95 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_field_rules_1_triggers_1 = models.SubFormFieldRuleTrigger( + id="uniqueIdHere_1", + operator="is", + value="foo", + ) + + form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, + ] + + form_field_rules_1_actions_1 = models.SubFormFieldRuleAction( + hidden=True, + type="change-field-visibility", + field_id="uniqueIdHere_2", + ) + + form_field_rules_1_actions = [ + form_field_rules_1_actions_1, + ] + + form_field_rules_1 = models.SubFormFieldRule( + id="rule_1", + trigger_operator="AND", + triggers=form_field_rules_1_triggers, + actions=form_field_rules_1_actions, + ) + + form_field_rules = [ + form_field_rules_1, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="0", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_field_rules=form_field_rules, + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.py b/sandbox/python/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.py new file mode 100644 index 000000000..d15b6c577 --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.py @@ -0,0 +1,64 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( + type="request_signature", + test_mode=False, + file_urls=[ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", + ], + form_fields_per_document=form_fields_per_document, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e) diff --git a/sandbox/python/src/UnclaimedDraftEditAndResendExample.py b/sandbox/python/src/UnclaimedDraftEditAndResendExample.py new file mode 100644 index 000000000..440aaaa9e --- /dev/null +++ b/sandbox/python/src/UnclaimedDraftEditAndResendExample.py @@ -0,0 +1,26 @@ +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + unclaimed_draft_edit_and_resend_request = models.UnclaimedDraftEditAndResendRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + test_mode=False, + ) + + try: + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_edit_and_resend( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, + ) + + pprint(response) + except ApiException as e: + print("Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: %s\n" % e) diff --git a/sandbox/python/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/python/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/python/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/python/test_fixtures/SignatureRequestSendRequest.json b/sandbox/python/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/python/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/python/test_fixtures/pdf-sample.pdf b/sandbox/python/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/python/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sandbox/python/tests/.config.dist.json b/sandbox/python/tests/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/python/tests/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/python/tests/.gitignore b/sandbox/python/tests/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/python/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/python/tests/test_signature_request.py b/sandbox/python/tests/test_signature_request.py deleted file mode 100644 index 93bdf203c..000000000 --- a/sandbox/python/tests/test_signature_request.py +++ /dev/null @@ -1,124 +0,0 @@ -import json -import os -import unittest - -from dropbox_sign import ApiClient, Configuration, apis, models, ApiException - - -class TestSignatureRequest(unittest.TestCase): - def setUp(self): - self.base_path = os.path.dirname(os.path.abspath(__file__)) + "/.." - self.config_merged = self.get_config() - - self.configuration = Configuration( - username=self.config_merged["API_KEY"], - host=self.config_merged["BASE_URL"], - ) - - def get_config(self): - file = open(f'{self.base_path}/tests/.config.dist.json', 'r') - config_dist = json.load(file) - file.close() - - file = open(f'{self.base_path}/tests/.config.json', 'r') - config_custom = json.load(file) - file.close() - - config_dist.update(config_custom) - - return config_dist - - def test_send(self): - api_client = ApiClient(self.configuration) - signature_request_api = apis.SignatureRequestApi(api_client) - - file = open(f'{self.base_path}/test_fixtures/SignatureRequestSendRequest.json', 'r') - data = json.load(file) - file.close() - - send_request = models.SignatureRequestSendRequest.init(data) - send_request.files = [open(f'{self.base_path}/test_fixtures/pdf-sample.pdf', 'rb')] - - send_response = signature_request_api.signature_request_send(send_request) - - self.assertEqual( - send_request.form_fields_per_document[0].api_id, - send_response.signature_request.custom_fields[0].api_id, - ) - - self.assertEqual( - send_request.signers[0].email_address, - send_response.signature_request.signatures[0].signer_email_address, - ) - self.assertEqual( - send_request.signers[1].email_address, - send_response.signature_request.signatures[1].signer_email_address, - ) - self.assertEqual( - send_request.signers[2].email_address, - send_response.signature_request.signatures[2].signer_email_address, - ) - - get_response = signature_request_api.signature_request_get( - send_response.signature_request.signature_request_id, - ) - - self.assertEqual( - send_response.signature_request.signature_request_id, - get_response.signature_request.signature_request_id, - ) - - def test_create_embedded(self): - api_client = ApiClient(self.configuration) - signature_request_api = apis.SignatureRequestApi(api_client) - - file = open(f'{self.base_path}/test_fixtures/SignatureRequestCreateEmbeddedRequest.json', 'r') - data = json.load(file) - data["client_id"] = self.config_merged["CLIENT_ID"] - file.close() - - send_request = models.SignatureRequestCreateEmbeddedRequest.init(data) - send_request.files = [open(f'{self.base_path}/test_fixtures/pdf-sample.pdf', 'rb')] - - send_response = signature_request_api.signature_request_create_embedded(send_request) - - self.assertEqual( - send_request.signers[0].email_address, - send_response.signature_request.signatures[0].signer_email_address, - ) - self.assertEqual( - send_request.signers[1].email_address, - send_response.signature_request.signatures[1].signer_email_address, - ) - self.assertEqual( - send_request.signers[2].email_address, - send_response.signature_request.signatures[2].signer_email_address, - ) - - embedded_api = apis.EmbeddedApi(api_client) - - get_response = embedded_api.embedded_sign_url( - send_response.signature_request.signatures[0].signature_id - ) - - self.assertNotEquals("", get_response.embedded.sign_url) - - def test_send_without_file_error(self): - api_client = ApiClient(self.configuration) - signature_request_api = apis.SignatureRequestApi(api_client) - - file = open(f'{self.base_path}/test_fixtures/SignatureRequestSendRequest.json', 'r') - data = json.load(file) - file.close() - - send_request = models.SignatureRequestSendRequest.init(data) - - try: - signature_request_api.signature_request_send(send_request) - self.assertFalse(True) - except ApiException as e: - self.assertEqual("file", e.data.error.error_path) - - -if __name__ == '__main__': - unittest.main() diff --git a/sandbox/ruby/.gitignore b/sandbox/ruby/.gitignore new file mode 100644 index 000000000..b844b143d --- /dev/null +++ b/sandbox/ruby/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/sandbox/ruby/spec/.config.dist.json b/sandbox/ruby/spec/.config.dist.json deleted file mode 100644 index 601c6a5f9..000000000 --- a/sandbox/ruby/spec/.config.dist.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BASE_URL": "https://api.hellosign.com/v3", - "API_KEY": "", - "CLIENT_ID": "", - "USE_XDEBUG": 0 -} diff --git a/sandbox/ruby/spec/.gitignore b/sandbox/ruby/spec/.gitignore deleted file mode 100644 index a9b8cc8b8..000000000 --- a/sandbox/ruby/spec/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.config.json diff --git a/sandbox/ruby/spec/signature_request_spec.rb b/sandbox/ruby/spec/signature_request_spec.rb deleted file mode 100644 index d598cf164..000000000 --- a/sandbox/ruby/spec/signature_request_spec.rb +++ /dev/null @@ -1,133 +0,0 @@ -require "spec_helper" -require "dropbox-sign" - -# This test suite is intended solely as a stopgap while we setup automated -# internal tests from github actions. -# -# For now it requires running manually -describe "SignatureRequestSpec" do - config_custom = JSON.parse(File.read(__dir__ + "/.config.json"), :symbolize_names => false) - config_dist = JSON.parse(File.read(__dir__ + "/.config.dist.json"), :symbolize_names => false) - config_merged = config_dist.merge(config_custom) - opts = {} - - if config_merged["USE_XDEBUG"] - opts[:header_params] = {"Cookie" => "XDEBUG_SESSION=xdebug"} - end - - Dropbox::Sign.configure do |config| - config.username = config_merged["API_KEY"] - config.host = config_merged["BASE_URL"] - end - - it "testSend" do - signature_request_api = Dropbox::Sign::SignatureRequestApi.new - - data = JSON.parse( - File.read(__dir__ + "/../test_fixtures/SignatureRequestSendRequest.json"), - :symbolize_names => true, - ) - - send_request = Dropbox::Sign::SignatureRequestSendRequest.init(data) - send_request.files = [File.new(__dir__ + "/../test_fixtures/pdf-sample.pdf", "r")] - - begin - send_response = signature_request_api.signature_request_send(send_request, opts) - rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" - exit - end - - signature_request = send_response.signature_request - - expect(signature_request.custom_fields[0].api_id) - .to eq(send_request.form_fields_per_document[0].api_id) - - expect(signature_request.signatures[0].signer_email_address) - .to eq(send_request.signers[0].email_address) - expect(signature_request.signatures[1].signer_email_address) - .to eq(send_request.signers[1].email_address) - expect(signature_request.signatures[2].signer_email_address) - .to eq(send_request.signers[2].email_address) - - begin - get_response = signature_request_api.signature_request_get( - signature_request.signature_request_id, - opts, - ) - rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" - exit - end - - expect(signature_request.signature_request_id) - .to eq(get_response.signature_request.signature_request_id) - end - - it "testCreateEmbedded" do - signature_request_api = Dropbox::Sign::SignatureRequestApi.new - - data = JSON.parse( - File.read(__dir__ + "/../test_fixtures/SignatureRequestCreateEmbeddedRequest.json"), - :symbolize_names => true, - ) - - send_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.init(data) - send_request.files = [File.new(__dir__ + "/../test_fixtures/pdf-sample.pdf", "r")] - send_request.client_id = config_merged["CLIENT_ID"] - - begin - send_response = signature_request_api.signature_request_create_embedded( - send_request, - opts, - ) - rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" - exit - end - - signature_request = send_response.signature_request - - expect(signature_request.signatures[0].signer_email_address) - .to eq(send_request.signers[0].email_address) - expect(signature_request.signatures[1].signer_email_address) - .to eq(send_request.signers[1].email_address) - expect(signature_request.signatures[2].signer_email_address) - .to eq(send_request.signers[2].email_address) - - embedded_api = Dropbox::Sign::EmbeddedApi.new - - begin - get_response = embedded_api.embedded_sign_url( - signature_request.signatures[0].signature_id, - opts, - ) - - expect(get_response.embedded.sign_url).to be_truthy - rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" - exit - end - end - - it "testSendWithoutFileError" do - signature_request_api = Dropbox::Sign::SignatureRequestApi.new - - data = JSON.parse( - File.read(__dir__ + "/../test_fixtures/SignatureRequestSendRequest.json"), - :symbolize_names => true, - ) - - send_request = Dropbox::Sign::SignatureRequestSendRequest.init(data) - - begin - send_response = signature_request_api.signature_request_send(send_request, opts) - - puts "Should have thrown: #{send_response}" - exit - rescue Dropbox::Sign::ApiError => e - expect(e.response_body.error.error_path) - .to eq("file") - end - end -end diff --git a/sandbox/ruby/spec/spec_helper.rb b/sandbox/ruby/spec/spec_helper.rb deleted file mode 100644 index a365de3db..000000000 --- a/sandbox/ruby/spec/spec_helper.rb +++ /dev/null @@ -1,111 +0,0 @@ -=begin -#Dropbox Sign API - -#Dropbox Sign v3 API - -The version of the OpenAPI document: 3.0.0 -Contact: apisupport@hellosign.com -Generated by: https://openapi-generator.tech -Generator version: 7.8.0 - -=end - -# load the gem -require 'dropbox-sign' - -# The following was generated by the `rspec --init` command. Conventionally, all -# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause -# this file to always be loaded, without a need to explicitly require it in any -# files. -# -# Given that it is always loaded, you are encouraged to keep this file as -# light-weight as possible. Requiring heavyweight dependencies from this file -# will add to the boot time of your test suite on EVERY test run, even for an -# individual file that may not need all of that loaded. Instead, consider making -# a separate helper file that requires the additional dependencies and performs -# the additional setup, and require it from the spec files that actually need -# it. -# -# The `.rspec` file also contains a few flags that are not defaults but that -# users commonly want. -# -# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration -RSpec.configure do |config| - # rspec-expectations config goes here. You can use an alternate - # assertion/expectation library such as wrong or the stdlib/minitest - # assertions if you prefer. - config.expect_with :rspec do |expectations| - # This option will default to `true` in RSpec 4. It makes the `description` - # and `failure_message` of custom matchers include text for helper methods - # defined using `chain`, e.g.: - # be_bigger_than(2).and_smaller_than(4).description - # # => "be bigger than 2 and smaller than 4" - # ...rather than: - # # => "be bigger than 2" - expectations.include_chain_clauses_in_custom_matcher_descriptions = true - end - - # rspec-mocks config goes here. You can use an alternate test double - # library (such as bogus or mocha) by changing the `mock_with` option here. - config.mock_with :rspec do |mocks| - # Prevents you from mocking or stubbing a method that does not exist on - # a real object. This is generally recommended, and will default to - # `true` in RSpec 4. - mocks.verify_partial_doubles = true - end - -# The settings below are suggested to provide a good initial experience -# with RSpec, but feel free to customize to your heart's content. -=begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true - - # Allows RSpec to persist some state between runs in order to support - # the `--only-failures` and `--next-failure` CLI options. We recommend - # you configure your source control system to ignore this file. - config.example_status_persistence_file_path = "spec/examples.txt" - - # Limits the available syntax to the non-monkey patched syntax that is - # recommended. For more details, see: - # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ - # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode - config.disable_monkey_patching! - - # This setting enables warnings. It's recommended, but in some cases may - # be too noisy due to issues in dependencies. - config.warnings = true - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - if config.files_to_run.one? - # Use the documentation formatter for detailed output, - # unless a formatter has already been configured - # (e.g. via a command-line flag). - config.default_formatter = 'doc' - end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed -=end -end diff --git a/sandbox/ruby/src/AccountCreateExample.rb b/sandbox/ruby/src/AccountCreateExample.rb new file mode 100644 index 000000000..6ce6db264 --- /dev/null +++ b/sandbox/ruby/src/AccountCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" + +begin + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_create: #{e}" +end diff --git a/sandbox/ruby/src/AccountCreateOauthExample.rb b/sandbox/ruby/src/AccountCreateOauthExample.rb new file mode 100644 index 000000000..26ebdc768 --- /dev/null +++ b/sandbox/ruby/src/AccountCreateOauthExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" +account_create_request.client_id = "cc91c61d00f8bb2ece1428035716b" +account_create_request.client_secret = "1d14434088507ffa390e6f5528465" + +begin + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_create: #{e}" +end diff --git a/sandbox/ruby/src/AccountGetExample.rb b/sandbox/ruby/src/AccountGetExample.rb new file mode 100644 index 000000000..3b8fb5d9e --- /dev/null +++ b/sandbox/ruby/src/AccountGetExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::AccountApi.new.account_get + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_get: #{e}" +end diff --git a/sandbox/ruby/src/AccountUpdateExample.rb b/sandbox/ruby/src/AccountUpdateExample.rb new file mode 100644 index 000000000..f8d7f1b2d --- /dev/null +++ b/sandbox/ruby/src/AccountUpdateExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_update_request = Dropbox::Sign::AccountUpdateRequest.new +account_update_request.callback_url = "https://www.example.com/callback" +account_update_request.locale = "en-US" + +begin + response = Dropbox::Sign::AccountApi.new.account_update( + account_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_update: #{e}" +end diff --git a/sandbox/ruby/src/AccountVerifyExample.rb b/sandbox/ruby/src/AccountVerifyExample.rb new file mode 100644 index 000000000..8e57affce --- /dev/null +++ b/sandbox/ruby/src/AccountVerifyExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +account_verify_request = Dropbox::Sign::AccountVerifyRequest.new +account_verify_request.email_address = "some_user@dropboxsign.com" + +begin + response = Dropbox::Sign::AccountApi.new.account_verify( + account_verify_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling AccountApi#account_verify: #{e}" +end diff --git a/sandbox/ruby/src/ApiAppCreateExample.rb b/sandbox/ruby/src/ApiAppCreateExample.rb new file mode 100644 index 000000000..d2b959780 --- /dev/null +++ b/sandbox/ruby/src/ApiAppCreateExample.rb @@ -0,0 +1,37 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +oauth = Dropbox::Sign::SubOAuth.new +oauth.callback_url = "https://example.com/oauth" +oauth.scopes = [ + "basic_account_info", + "request_signature", +] + +white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new +white_labeling_options.primary_button_color = "#00b3e6" +white_labeling_options.primary_button_text_color = "#ffffff" + +api_app_create_request = Dropbox::Sign::ApiAppCreateRequest.new +api_app_create_request.name = "My Production App" +api_app_create_request.domains = [ + "example.com", +] +api_app_create_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_create_request.oauth = oauth +api_app_create_request.white_labeling_options = white_labeling_options + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_create( + api_app_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_create: #{e}" +end diff --git a/sandbox/ruby/src/ApiAppDeleteExample.rb b/sandbox/ruby/src/ApiAppDeleteExample.rb new file mode 100644 index 000000000..def7fb657 --- /dev/null +++ b/sandbox/ruby/src/ApiAppDeleteExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::ApiAppApi.new.api_app_delete( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_delete: #{e}" +end diff --git a/sandbox/ruby/src/ApiAppGetExample.rb b/sandbox/ruby/src/ApiAppGetExample.rb new file mode 100644 index 000000000..f40c92b55 --- /dev/null +++ b/sandbox/ruby/src/ApiAppGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_get( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_get: #{e}" +end diff --git a/sandbox/ruby/src/ApiAppListExample.rb b/sandbox/ruby/src/ApiAppListExample.rb new file mode 100644 index 000000000..3e776c659 --- /dev/null +++ b/sandbox/ruby/src/ApiAppListExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_list: #{e}" +end diff --git a/sandbox/ruby/src/ApiAppUpdateExample.rb b/sandbox/ruby/src/ApiAppUpdateExample.rb new file mode 100644 index 000000000..e973b3520 --- /dev/null +++ b/sandbox/ruby/src/ApiAppUpdateExample.rb @@ -0,0 +1,39 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +oauth = Dropbox::Sign::SubOAuth.new +oauth.callback_url = "https://example.com/oauth" +oauth.scopes = [ + "basic_account_info", + "request_signature", +] + +white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new +white_labeling_options.primary_button_color = "#00b3e6" +white_labeling_options.primary_button_text_color = "#ffffff" + +api_app_update_request = Dropbox::Sign::ApiAppUpdateRequest.new +api_app_update_request.callback_url = "https://example.com/dropboxsign" +api_app_update_request.name = "New Name" +api_app_update_request.domains = [ + "example.com", +] +api_app_update_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_update_request.oauth = oauth +api_app_update_request.white_labeling_options = white_labeling_options + +begin + response = Dropbox::Sign::ApiAppApi.new.api_app_update( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + api_app_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ApiAppApi#api_app_update: #{e}" +end diff --git a/sandbox/ruby/src/BulkSendJobGetExample.rb b/sandbox/ruby/src/BulkSendJobGetExample.rb new file mode 100644 index 000000000..bf4b58570 --- /dev/null +++ b/sandbox/ruby/src/BulkSendJobGetExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_get( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", # bulk_send_job_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling BulkSendJobApi#bulk_send_job_get: #{e}" +end diff --git a/sandbox/ruby/src/BulkSendJobListExample.rb b/sandbox/ruby/src/BulkSendJobListExample.rb new file mode 100644 index 000000000..60e8c1b50 --- /dev/null +++ b/sandbox/ruby/src/BulkSendJobListExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling BulkSendJobApi#bulk_send_job_list: #{e}" +end diff --git a/sandbox/ruby/src/EmbeddedEditUrlExample.rb b/sandbox/ruby/src/EmbeddedEditUrlExample.rb new file mode 100644 index 000000000..8c110f69d --- /dev/null +++ b/sandbox/ruby/src/EmbeddedEditUrlExample.rb @@ -0,0 +1,27 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +merge_fields = [ +] + +embedded_edit_url_request = Dropbox::Sign::EmbeddedEditUrlRequest.new +embedded_edit_url_request.cc_roles = [ + "", +] +embedded_edit_url_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::EmbeddedApi.new.embedded_edit_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + embedded_edit_url_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling EmbeddedApi#embedded_edit_url: #{e}" +end diff --git a/sandbox/ruby/src/EmbeddedSignUrlExample.rb b/sandbox/ruby/src/EmbeddedSignUrlExample.rb new file mode 100644 index 000000000..dd08e5a6f --- /dev/null +++ b/sandbox/ruby/src/EmbeddedSignUrlExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::EmbeddedApi.new.embedded_sign_url( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", # signature_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling EmbeddedApi#embedded_sign_url: #{e}" +end diff --git a/sandbox/ruby/src/EventCallbackExample.rb b/sandbox/ruby/src/EventCallbackExample.rb new file mode 100644 index 000000000..c3b6ca98a --- /dev/null +++ b/sandbox/ruby/src/EventCallbackExample.rb @@ -0,0 +1,29 @@ +require "dropbox-sign" + +# use your API key +api_key = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782" + +# callback_data represents data we send to you +callback_data = { + event: { + event_type: "account_confirmed", + event_time: "1669926463", + event_hash: "ff8b03439122f9160500c3fb855bdee5a9ccba5fff27d3b258745d8f3074832f", + event_metadata: { + related_signature_id: nil, + reported_for_account_id: "6421d70b9bd45059fa207d03ab8d1b96515b472c", + reported_for_app_id: nil, + event_message: nil, + }, + }, +} + +callback_event = Dropbox::Sign::EventCallbackRequest.init(callback_data) + +# verify that a callback came from HelloSign.com +if Dropbox::Sign::EventCallbackHelper.is_valid(api_key, callback_event) + # one of "account_callback" or "api_app_callback" + callback_type = Dropbox::Sign::EventCallbackHelper.get_callback_type(callback_event) + + # do your magic below! +end diff --git a/sandbox/ruby/src/FaxDeleteExample.rb b/sandbox/ruby/src/FaxDeleteExample.rb new file mode 100644 index 000000000..6caa9d681 --- /dev/null +++ b/sandbox/ruby/src/FaxDeleteExample.rb @@ -0,0 +1,14 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + Dropbox::Sign::FaxApi.new.fax_delete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_delete: #{e}" +end diff --git a/sandbox/ruby/src/FaxFilesExample.rb b/sandbox/ruby/src/FaxFilesExample.rb new file mode 100644 index 000000000..b44d604c4 --- /dev/null +++ b/sandbox/ruby/src/FaxFilesExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_files: #{e}" +end diff --git a/sandbox/ruby/src/FaxGetExample.rb b/sandbox/ruby/src/FaxGetExample.rb new file mode 100644 index 000000000..692ae1c99 --- /dev/null +++ b/sandbox/ruby/src/FaxGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_get: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineAddUserExample.rb b/sandbox/ruby/src/FaxLineAddUserExample.rb new file mode 100644 index 000000000..4d7f568bb --- /dev/null +++ b/sandbox/ruby/src/FaxLineAddUserExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_add_user_request = Dropbox::Sign::FaxLineAddUserRequest.new +fax_line_add_user_request.number = "[FAX_NUMBER]" +fax_line_add_user_request.email_address = "member@dropboxsign.com" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_add_user( + fax_line_add_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_add_user: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineAreaCodeGetExample.rb b/sandbox/ruby/src/FaxLineAreaCodeGetExample.rb new file mode 100644 index 000000000..75c3a3c3e --- /dev/null +++ b/sandbox/ruby/src/FaxLineAreaCodeGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_area_code_get( + "US", # country + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_area_code_get: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineCreateExample.rb b/sandbox/ruby/src/FaxLineCreateExample.rb new file mode 100644 index 000000000..5342e5c31 --- /dev/null +++ b/sandbox/ruby/src/FaxLineCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_create_request = Dropbox::Sign::FaxLineCreateRequest.new +fax_line_create_request.area_code = 209 +fax_line_create_request.country = "US" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_create( + fax_line_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_create: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineDeleteExample.rb b/sandbox/ruby/src/FaxLineDeleteExample.rb new file mode 100644 index 000000000..c54da52b1 --- /dev/null +++ b/sandbox/ruby/src/FaxLineDeleteExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_delete_request = Dropbox::Sign::FaxLineDeleteRequest.new +fax_line_delete_request.number = "[FAX_NUMBER]" + +begin + Dropbox::Sign::FaxLineApi.new.fax_line_delete( + fax_line_delete_request, + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_delete: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineGetExample.rb b/sandbox/ruby/src/FaxLineGetExample.rb new file mode 100644 index 000000000..d4a749bd8 --- /dev/null +++ b/sandbox/ruby/src/FaxLineGetExample.rb @@ -0,0 +1,16 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_get( + "123-123-1234", # number + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_get: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineListExample.rb b/sandbox/ruby/src/FaxLineListExample.rb new file mode 100644 index 000000000..0da5a39e4 --- /dev/null +++ b/sandbox/ruby/src/FaxLineListExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_list( + { + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + show_team_lines: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_list: #{e}" +end diff --git a/sandbox/ruby/src/FaxLineRemoveUserExample.rb b/sandbox/ruby/src/FaxLineRemoveUserExample.rb new file mode 100644 index 000000000..4f67f7e11 --- /dev/null +++ b/sandbox/ruby/src/FaxLineRemoveUserExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_line_remove_user_request = Dropbox::Sign::FaxLineRemoveUserRequest.new +fax_line_remove_user_request.number = "[FAX_NUMBER]" +fax_line_remove_user_request.email_address = "member@dropboxsign.com" + +begin + response = Dropbox::Sign::FaxLineApi.new.fax_line_remove_user( + fax_line_remove_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxLineApi#fax_line_remove_user: #{e}" +end diff --git a/sandbox/ruby/src/FaxListExample.rb b/sandbox/ruby/src/FaxListExample.rb new file mode 100644 index 000000000..519e04dad --- /dev/null +++ b/sandbox/ruby/src/FaxListExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + response = Dropbox::Sign::FaxApi.new.fax_list( + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_list: #{e}" +end diff --git a/sandbox/ruby/src/FaxSendExample.rb b/sandbox/ruby/src/FaxSendExample.rb new file mode 100644 index 000000000..4faeaa725 --- /dev/null +++ b/sandbox/ruby/src/FaxSendExample.rb @@ -0,0 +1,28 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +fax_send_request = Dropbox::Sign::FaxSendRequest.new +fax_send_request.recipient = "16690000001" +fax_send_request.sender = "16690000000" +fax_send_request.test_mode = true +fax_send_request.cover_page_to = "Jill Fax" +fax_send_request.cover_page_from = "Faxer Faxerson" +fax_send_request.cover_page_message = "I'm sending you a fax!" +fax_send_request.title = "This is what the fax is about!" +fax_send_request.files = [ + File.new("./example_fax.pdf", "r"), +] + +begin + response = Dropbox::Sign::FaxApi.new.fax_send( + fax_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling FaxApi#fax_send: #{e}" +end diff --git a/sandbox/ruby/src/OauthTokenGenerateExample.rb b/sandbox/ruby/src/OauthTokenGenerateExample.rb new file mode 100644 index 000000000..47553822e --- /dev/null +++ b/sandbox/ruby/src/OauthTokenGenerateExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| +end + +o_auth_token_generate_request = Dropbox::Sign::OAuthTokenGenerateRequest.new +o_auth_token_generate_request.client_id = "cc91c61d00f8bb2ece1428035716b" +o_auth_token_generate_request.client_secret = "1d14434088507ffa390e6f5528465" +o_auth_token_generate_request.code = "1b0d28d90c86c141" +o_auth_token_generate_request.state = "900e06e2" +o_auth_token_generate_request.grant_type = "authorization_code" + +begin + response = Dropbox::Sign::OAuthApi.new.oauth_token_generate( + o_auth_token_generate_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling OAuthApi#oauth_token_generate: #{e}" +end diff --git a/sandbox/ruby/src/OauthTokenRefreshExample.rb b/sandbox/ruby/src/OauthTokenRefreshExample.rb new file mode 100644 index 000000000..5068b44da --- /dev/null +++ b/sandbox/ruby/src/OauthTokenRefreshExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| +end + +o_auth_token_refresh_request = Dropbox::Sign::OAuthTokenRefreshRequest.new +o_auth_token_refresh_request.grant_type = "refresh_token" +o_auth_token_refresh_request.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" + +begin + response = Dropbox::Sign::OAuthApi.new.oauth_token_refresh( + o_auth_token_refresh_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling OAuthApi#oauth_token_refresh: #{e}" +end diff --git a/sandbox/ruby/src/ReportCreateExample.rb b/sandbox/ruby/src/ReportCreateExample.rb new file mode 100644 index 000000000..d5169ca61 --- /dev/null +++ b/sandbox/ruby/src/ReportCreateExample.rb @@ -0,0 +1,24 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +report_create_request = Dropbox::Sign::ReportCreateRequest.new +report_create_request.start_date = "09/01/2020" +report_create_request.end_date = "09/01/2020" +report_create_request.report_type = [ + "user_activity", + "document_status", +] + +begin + response = Dropbox::Sign::ReportApi.new.report_create( + report_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling ReportApi#report_create: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..e01b04f47 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestBulkCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,84 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" + +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] + +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" + +signer_list_2_signers = [ + signer_list_2_signers_1, +] + +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" + +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] + +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers + +signer_list_2 = Dropbox::Sign::SubBulkSignerList.new +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers + +signer_list = [ + signer_list_1, + signer_list_2, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest.new +signature_request_bulk_create_embedded_with_template_request.client_id = "1a659d9ad95bccd307ecad78d72192f8" +signature_request_bulk_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_bulk_create_embedded_with_template_request.test_mode = true +signature_request_bulk_create_embedded_with_template_request.signer_list = signer_list +signature_request_bulk_create_embedded_with_template_request.ccs = ccs + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestBulkSendWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestBulkSendWithTemplateExample.rb new file mode 100644 index 000000000..27f2d66d5 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestBulkSendWithTemplateExample.rb @@ -0,0 +1,84 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" + +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] + +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" + +signer_list_2_signers = [ + signer_list_2_signers_1, +] + +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" + +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] + +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers + +signer_list_2 = Dropbox::Sign::SubBulkSignerList.new +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers + +signer_list = [ + signer_list_1, + signer_list_2, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_send_with_template_request = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new +signature_request_bulk_send_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_send_with_template_request.subject = "Purchase Order" +signature_request_bulk_send_with_template_request.test_mode = true +signature_request_bulk_send_with_template_request.signer_list = signer_list +signature_request_bulk_send_with_template_request.ccs = ccs + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestCancelExample.rb b/sandbox/ruby/src/SignatureRequestCancelExample.rb new file mode 100644 index 000000000..9f3ff955e --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestCancelExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::SignatureRequestApi.new.signature_request_cancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_cancel: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestCreateEmbeddedExample.rb b/sandbox/ruby/src/SignatureRequestCreateEmbeddedExample.rb new file mode 100644 index 000000000..55db08ca7 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestCreateEmbeddedExample.rb @@ -0,0 +1,55 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new +signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_create_embedded_request.subject = "The NDA we talked about" +signature_request_create_embedded_request.test_mode = true +signature_request_create_embedded_request.title = "NDA with Acme Co." +signature_request_create_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_create_embedded_request.signing_options = signing_options +signature_request_create_embedded_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( + signature_request_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestCreateEmbeddedGroupedSignersExample.rb b/sandbox/ruby/src/SignatureRequestCreateEmbeddedGroupedSignersExample.rb new file mode 100644 index 000000000..9910ee894 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestCreateEmbeddedGroupedSignersExample.rb @@ -0,0 +1,81 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new +signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_create_embedded_request.subject = "The NDA we talked about" +signature_request_create_embedded_request.test_mode = true +signature_request_create_embedded_request.title = "NDA with Acme Co." +signature_request_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_create_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_create_embedded_request.signing_options = signing_options +signature_request_create_embedded_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( + signature_request_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestCreateEmbeddedWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..2de72cf8a --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,44 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new +signature_request_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_create_embedded_with_template_request.test_mode = true +signature_request_create_embedded_with_template_request.signing_options = signing_options +signature_request_create_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditEmbeddedExample.rb b/sandbox/ruby/src/SignatureRequestEditEmbeddedExample.rb new file mode 100644 index 000000000..0e192377c --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditEmbeddedExample.rb @@ -0,0 +1,56 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_embedded_request = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new +signature_request_edit_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_embedded_request.subject = "The NDA we talked about" +signature_request_edit_embedded_request.test_mode = true +signature_request_edit_embedded_request.title = "NDA with Acme Co." +signature_request_edit_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_embedded_request.signing_options = signing_options +signature_request_edit_embedded_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditEmbeddedGroupedSignersExample.rb b/sandbox/ruby/src/SignatureRequestEditEmbeddedGroupedSignersExample.rb new file mode 100644 index 000000000..0fc7bc7a3 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditEmbeddedGroupedSignersExample.rb @@ -0,0 +1,82 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_edit_embedded_request = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new +signature_request_edit_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_embedded_request.subject = "The NDA we talked about" +signature_request_edit_embedded_request.test_mode = true +signature_request_edit_embedded_request.title = "NDA with Acme Co." +signature_request_edit_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_edit_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_embedded_request.signing_options = signing_options +signature_request_edit_embedded_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditEmbeddedWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestEditEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..f504f1944 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditEmbeddedWithTemplateExample.rb @@ -0,0 +1,45 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_edit_embedded_with_template_request = Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest.new +signature_request_edit_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_edit_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_embedded_with_template_request.subject = "Purchase Order" +signature_request_edit_embedded_with_template_request.test_mode = true +signature_request_edit_embedded_with_template_request.signing_options = signing_options +signature_request_edit_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditExample.rb b/sandbox/ruby/src/SignatureRequestEditExample.rb new file mode 100644 index 000000000..e55d7beee --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditExample.rb @@ -0,0 +1,66 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_request = Dropbox::Sign::SignatureRequestEditRequest.new +signature_request_edit_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_request.subject = "The NDA we talked about" +signature_request_edit_request.test_mode = true +signature_request_edit_request.title = "NDA with Acme Co." +signature_request_edit_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_edit_request.field_options = field_options +signature_request_edit_request.signing_options = signing_options +signature_request_edit_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditGroupedSignersExample.rb b/sandbox/ruby/src/SignatureRequestEditGroupedSignersExample.rb new file mode 100644 index 000000000..2b19ffabb --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditGroupedSignersExample.rb @@ -0,0 +1,92 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_edit_request = Dropbox::Sign::SignatureRequestEditRequest.new +signature_request_edit_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_request.subject = "The NDA we talked about" +signature_request_edit_request.test_mode = true +signature_request_edit_request.title = "NDA with Acme Co." +signature_request_edit_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_edit_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_edit_request.field_options = field_options +signature_request_edit_request.signing_options = signing_options +signature_request_edit_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestEditWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestEditWithTemplateExample.rb new file mode 100644 index 000000000..f3c2d8ed6 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestEditWithTemplateExample.rb @@ -0,0 +1,64 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_edit_with_template_request = Dropbox::Sign::SignatureRequestEditWithTemplateRequest.new +signature_request_edit_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_edit_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_with_template_request.subject = "Purchase Order" +signature_request_edit_with_template_request.test_mode = true +signature_request_edit_with_template_request.signing_options = signing_options +signature_request_edit_with_template_request.signers = signers +signature_request_edit_with_template_request.ccs = ccs +signature_request_edit_with_template_request.custom_fields = custom_fields + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestFilesAsDataUriExample.rb b/sandbox/ruby/src/SignatureRequestFilesAsDataUriExample.rb new file mode 100644 index 000000000..9f9390e41 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestFilesAsDataUriExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_data_uri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestFilesAsFileUrlExample.rb b/sandbox/ruby/src/SignatureRequestFilesAsFileUrlExample.rb new file mode 100644 index 000000000..14abf28bf --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestFilesAsFileUrlExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_file_url( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + force_download: 1, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files_as_file_url: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestFilesExample.rb b/sandbox/ruby/src/SignatureRequestFilesExample.rb new file mode 100644 index 000000000..1d891d696 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestFilesExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + file_type: "pdf", + }, + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_files: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestGetExample.rb b/sandbox/ruby/src/SignatureRequestGetExample.rb new file mode 100644 index 000000000..6399f34f6 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_get: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestListExample.rb b/sandbox/ruby/src/SignatureRequestListExample.rb new file mode 100644 index 000000000..2fcc01276 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestListExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_list: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestReleaseHoldExample.rb b/sandbox/ruby/src/SignatureRequestReleaseHoldExample.rb new file mode 100644 index 000000000..422ab2d05 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestReleaseHoldExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_release_hold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_release_hold: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestRemindExample.rb b/sandbox/ruby/src/SignatureRequestRemindExample.rb new file mode 100644 index 000000000..722928d9e --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestRemindExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signature_request_remind_request = Dropbox::Sign::SignatureRequestRemindRequest.new +signature_request_remind_request.email_address = "john@example.com" + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_remind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_remind_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_remind: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestRemoveExample.rb b/sandbox/ruby/src/SignatureRequestRemoveExample.rb new file mode 100644 index 000000000..7940519df --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestRemoveExample.rb @@ -0,0 +1,14 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" +end + +begin + Dropbox::Sign::SignatureRequestApi.new.signature_request_remove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_remove: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestSendExample.rb b/sandbox/ruby/src/SignatureRequestSendExample.rb new file mode 100644 index 000000000..28905902d --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestSendExample.rb @@ -0,0 +1,65 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new +signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_send_request.subject = "The NDA we talked about" +signature_request_send_request.test_mode = true +signature_request_send_request.title = "NDA with Acme Co." +signature_request_send_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_send_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_send_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_send_request.field_options = field_options +signature_request_send_request.signing_options = signing_options +signature_request_send_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( + signature_request_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestSendGroupedSignersExample.rb b/sandbox/ruby/src/SignatureRequestSendGroupedSignersExample.rb new file mode 100644 index 000000000..dec38e89c --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestSendGroupedSignersExample.rb @@ -0,0 +1,91 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +grouped_signers_2_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_1.name = "Bob" +grouped_signers_2_signers_1.email_address = "bob@example.com" + +grouped_signers_2_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_2_signers_2.name = "Charlie" +grouped_signers_2_signers_2.email_address = "charlie@example.com" + +grouped_signers_2_signers = [ + grouped_signers_2_signers_1, + grouped_signers_2_signers_2, +] + +grouped_signers_1_signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_1.name = "Jack" +grouped_signers_1_signers_1.email_address = "jack@example.com" + +grouped_signers_1_signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +grouped_signers_1_signers_2.name = "Jill" +grouped_signers_1_signers_2.email_address = "jill@example.com" + +grouped_signers_1_signers = [ + grouped_signers_1_signers_1, + grouped_signers_1_signers_2, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +grouped_signers_1 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_1.group = "Group #1" +grouped_signers_1.order = 0 +grouped_signers_1.signers = grouped_signers_1_signers + +grouped_signers_2 = Dropbox::Sign::SubSignatureRequestGroupedSigners.new +grouped_signers_2.group = "Group #2" +grouped_signers_2.order = 1 +grouped_signers_2.signers = grouped_signers_2_signers + +grouped_signers = [ + grouped_signers_1, + grouped_signers_2, +] + +signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new +signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_send_request.subject = "The NDA we talked about" +signature_request_send_request.test_mode = true +signature_request_send_request.title = "NDA with Acme Co." +signature_request_send_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +signature_request_send_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_send_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_send_request.field_options = field_options +signature_request_send_request.signing_options = signing_options +signature_request_send_request.grouped_signers = grouped_signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( + signature_request_send_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestSendWithTemplateExample.rb b/sandbox/ruby/src/SignatureRequestSendWithTemplateExample.rb new file mode 100644 index 000000000..4ee78fded --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestSendWithTemplateExample.rb @@ -0,0 +1,63 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_send_with_template_request = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new +signature_request_send_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_send_with_template_request.subject = "Purchase Order" +signature_request_send_with_template_request.test_mode = true +signature_request_send_with_template_request.signing_options = signing_options +signature_request_send_with_template_request.signers = signers +signature_request_send_with_template_request.ccs = ccs +signature_request_send_with_template_request.custom_fields = custom_fields + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send_with_template( + signature_request_send_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_send_with_template: #{e}" +end diff --git a/sandbox/ruby/src/SignatureRequestUpdateExample.rb b/sandbox/ruby/src/SignatureRequestUpdateExample.rb new file mode 100644 index 000000000..3cac8ae67 --- /dev/null +++ b/sandbox/ruby/src/SignatureRequestUpdateExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signature_request_update_request = Dropbox::Sign::SignatureRequestUpdateRequest.new +signature_request_update_request.signature_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" +signature_request_update_request.email_address = "john@example.com" + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_update( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_update: #{e}" +end diff --git a/sandbox/ruby/src/TeamAddMemberAccountIdExample.rb b/sandbox/ruby/src/TeamAddMemberAccountIdExample.rb new file mode 100644 index 000000000..e19955860 --- /dev/null +++ b/sandbox/ruby/src/TeamAddMemberAccountIdExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new +team_add_member_request.account_id = "f57db65d3f933b5316d398057a36176831451a35" + +begin + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_add_member: #{e}" +end diff --git a/sandbox/ruby/src/TeamAddMemberExample.rb b/sandbox/ruby/src/TeamAddMemberExample.rb new file mode 100644 index 000000000..b312e9894 --- /dev/null +++ b/sandbox/ruby/src/TeamAddMemberExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new +team_add_member_request.email_address = "george@example.com" + +begin + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_add_member: #{e}" +end diff --git a/sandbox/ruby/src/TeamCreateExample.rb b/sandbox/ruby/src/TeamCreateExample.rb new file mode 100644 index 000000000..6bac61268 --- /dev/null +++ b/sandbox/ruby/src/TeamCreateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_create_request = Dropbox::Sign::TeamCreateRequest.new +team_create_request.name = "New Team Name" + +begin + response = Dropbox::Sign::TeamApi.new.team_create( + team_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_create: #{e}" +end diff --git a/sandbox/ruby/src/TeamDeleteExample.rb b/sandbox/ruby/src/TeamDeleteExample.rb new file mode 100644 index 000000000..729b6f794 --- /dev/null +++ b/sandbox/ruby/src/TeamDeleteExample.rb @@ -0,0 +1,13 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::TeamApi.new.team_delete +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_delete: #{e}" +end diff --git a/sandbox/ruby/src/TeamGetExample.rb b/sandbox/ruby/src/TeamGetExample.rb new file mode 100644 index 000000000..903822830 --- /dev/null +++ b/sandbox/ruby/src/TeamGetExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_get + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_get: #{e}" +end diff --git a/sandbox/ruby/src/TeamInfoExample.rb b/sandbox/ruby/src/TeamInfoExample.rb new file mode 100644 index 000000000..dfe5874d5 --- /dev/null +++ b/sandbox/ruby/src/TeamInfoExample.rb @@ -0,0 +1,19 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_info( + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_info: #{e}" +end diff --git a/sandbox/ruby/src/TeamInvitesExample.rb b/sandbox/ruby/src/TeamInvitesExample.rb new file mode 100644 index 000000000..9fee219c0 --- /dev/null +++ b/sandbox/ruby/src/TeamInvitesExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_invites + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_invites: #{e}" +end diff --git a/sandbox/ruby/src/TeamMembersExample.rb b/sandbox/ruby/src/TeamMembersExample.rb new file mode 100644 index 000000000..f35f9d174 --- /dev/null +++ b/sandbox/ruby/src/TeamMembersExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_members( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_members: #{e}" +end diff --git a/sandbox/ruby/src/TeamRemoveMemberAccountIdExample.rb b/sandbox/ruby/src/TeamRemoveMemberAccountIdExample.rb new file mode 100644 index 000000000..16913dd79 --- /dev/null +++ b/sandbox/ruby/src/TeamRemoveMemberAccountIdExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new +team_remove_member_request.account_id = "f57db65d3f933b5316d398057a36176831451a35" + +begin + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_remove_member: #{e}" +end diff --git a/sandbox/ruby/src/TeamRemoveMemberExample.rb b/sandbox/ruby/src/TeamRemoveMemberExample.rb new file mode 100644 index 000000000..27c87cb0e --- /dev/null +++ b/sandbox/ruby/src/TeamRemoveMemberExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new +team_remove_member_request.email_address = "teammate@dropboxsign.com" +team_remove_member_request.new_owner_email_address = "new_teammate@dropboxsign.com" + +begin + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_remove_member: #{e}" +end diff --git a/sandbox/ruby/src/TeamSubTeamsExample.rb b/sandbox/ruby/src/TeamSubTeamsExample.rb new file mode 100644 index 000000000..12c87f2b7 --- /dev/null +++ b/sandbox/ruby/src/TeamSubTeamsExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TeamApi.new.team_sub_teams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_sub_teams: #{e}" +end diff --git a/sandbox/ruby/src/TeamUpdateExample.rb b/sandbox/ruby/src/TeamUpdateExample.rb new file mode 100644 index 000000000..7f925ffff --- /dev/null +++ b/sandbox/ruby/src/TeamUpdateExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +team_update_request = Dropbox::Sign::TeamUpdateRequest.new +team_update_request.name = "New Team Name" + +begin + response = Dropbox::Sign::TeamApi.new.team_update( + team_update_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TeamApi#team_update: #{e}" +end diff --git a/sandbox/ruby/src/TemplateAddUserExample.rb b/sandbox/ruby/src/TemplateAddUserExample.rb new file mode 100644 index 000000000..a34a81fbf --- /dev/null +++ b/sandbox/ruby/src/TemplateAddUserExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_add_user_request = Dropbox::Sign::TemplateAddUserRequest.new +template_add_user_request.email_address = "george@dropboxsign.com" + +begin + response = Dropbox::Sign::TemplateApi.new.template_add_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_add_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_add_user: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateEmbeddedDraftExample.rb b/sandbox/ruby/src/TemplateCreateEmbeddedDraftExample.rb new file mode 100644 index 000000000..8d40c03a2 --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateEmbeddedDraftExample.rb @@ -0,0 +1,62 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb new file mode 100644 index 000000000..3cf7abbf2 --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldGroupsExample.rb @@ -0,0 +1,108 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_field_groups = form_field_groups +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb new file mode 100644 index 000000000..38263c1cb --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldRulesExample.rb @@ -0,0 +1,124 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_field_rules = form_field_rules +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..525ee3773 --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateEmbeddedDraftFormFieldsPerDocumentExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.form_fields_per_document = form_fields_per_document +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles + +begin + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateExample.rb b/sandbox/ruby/src/TemplateCreateExample.rb new file mode 100644 index 000000000..f4d623397 --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateFormFieldGroupsExample.rb b/sandbox/ruby/src/TemplateCreateFormFieldGroupsExample.rb new file mode 100644 index 000000000..83fdc09bb --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateFormFieldGroupsExample.rb @@ -0,0 +1,108 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.form_field_groups = form_field_groups +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateFormFieldRulesExample.rb b/sandbox/ruby/src/TemplateCreateFormFieldRulesExample.rb new file mode 100644 index 000000000..cea893e1d --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateFormFieldRulesExample.rb @@ -0,0 +1,124 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.form_field_rules = form_field_rules +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/sandbox/ruby/src/TemplateCreateFormFieldsPerDocumentExample.rb b/sandbox/ruby/src/TemplateCreateFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..39185b3d0 --- /dev/null +++ b/sandbox/ruby/src/TemplateCreateFormFieldsPerDocumentExample.rb @@ -0,0 +1,96 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.merge_fields = merge_fields + +begin + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_create: #{e}" +end diff --git a/sandbox/ruby/src/TemplateDeleteExample.rb b/sandbox/ruby/src/TemplateDeleteExample.rb new file mode 100644 index 000000000..33e07f299 --- /dev/null +++ b/sandbox/ruby/src/TemplateDeleteExample.rb @@ -0,0 +1,15 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + Dropbox::Sign::TemplateApi.new.template_delete( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_delete: #{e}" +end diff --git a/sandbox/ruby/src/TemplateFilesAsDataUriExample.rb b/sandbox/ruby/src/TemplateFilesAsDataUriExample.rb new file mode 100644 index 000000000..c51e03680 --- /dev/null +++ b/sandbox/ruby/src/TemplateFilesAsDataUriExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files_as_data_uri( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files_as_data_uri: #{e}" +end diff --git a/sandbox/ruby/src/TemplateFilesAsFileUrlExample.rb b/sandbox/ruby/src/TemplateFilesAsFileUrlExample.rb new file mode 100644 index 000000000..055fd32f6 --- /dev/null +++ b/sandbox/ruby/src/TemplateFilesAsFileUrlExample.rb @@ -0,0 +1,20 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files_as_file_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + { + force_download: 1, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files_as_file_url: #{e}" +end diff --git a/sandbox/ruby/src/TemplateFilesExample.rb b/sandbox/ruby/src/TemplateFilesExample.rb new file mode 100644 index 000000000..6aef00074 --- /dev/null +++ b/sandbox/ruby/src/TemplateFilesExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + FileUtils.cp(response.path, "./file_response") +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_files: #{e}" +end diff --git a/sandbox/ruby/src/TemplateGetExample.rb b/sandbox/ruby/src/TemplateGetExample.rb new file mode 100644 index 000000000..aacf15e90 --- /dev/null +++ b/sandbox/ruby/src/TemplateGetExample.rb @@ -0,0 +1,17 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_get( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_get: #{e}" +end diff --git a/sandbox/ruby/src/TemplateListExample.rb b/sandbox/ruby/src/TemplateListExample.rb new file mode 100644 index 000000000..a69c46f66 --- /dev/null +++ b/sandbox/ruby/src/TemplateListExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +begin + response = Dropbox::Sign::TemplateApi.new.template_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_list: #{e}" +end diff --git a/sandbox/ruby/src/TemplateRemoveUserExample.rb b/sandbox/ruby/src/TemplateRemoveUserExample.rb new file mode 100644 index 000000000..00687e102 --- /dev/null +++ b/sandbox/ruby/src/TemplateRemoveUserExample.rb @@ -0,0 +1,21 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_remove_user_request = Dropbox::Sign::TemplateRemoveUserRequest.new +template_remove_user_request.email_address = "george@dropboxsign.com" + +begin + response = Dropbox::Sign::TemplateApi.new.template_remove_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_remove_user_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_remove_user: #{e}" +end diff --git a/sandbox/ruby/src/TemplateUpdateFilesExample.rb b/sandbox/ruby/src/TemplateUpdateFilesExample.rb new file mode 100644 index 000000000..d5088f2a7 --- /dev/null +++ b/sandbox/ruby/src/TemplateUpdateFilesExample.rb @@ -0,0 +1,23 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +template_update_files_request = Dropbox::Sign::TemplateUpdateFilesRequest.new +template_update_files_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] + +begin + response = Dropbox::Sign::TemplateApi.new.template_update_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_update_files_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling TemplateApi#template_update_files: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedExample.rb new file mode 100644 index 000000000..a22330de8 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedExample.rb @@ -0,0 +1,25 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = true +unclaimed_draft_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb new file mode 100644 index 000000000..46129e4d7 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldGroupsExample.rb @@ -0,0 +1,71 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_field_groups = form_field_groups +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb new file mode 100644 index 000000000..a6b174891 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldRulesExample.rb @@ -0,0 +1,87 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_field_rules = form_field_rules +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..774085a28 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedFormFieldsPerDocumentExample.rb @@ -0,0 +1,59 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = false +unclaimed_draft_create_embedded_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_embedded_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb new file mode 100644 index 000000000..c6e799cae --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateEmbeddedWithTemplateExample.rb @@ -0,0 +1,44 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@dropboxsign.com" + +ccs = [ + ccs_1, +] + +signers_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +unclaimed_draft_create_embedded_with_template_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new +unclaimed_draft_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_with_template_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +unclaimed_draft_create_embedded_with_template_request.test_mode = false +unclaimed_draft_create_embedded_with_template_request.ccs = ccs +unclaimed_draft_create_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateExample.rb new file mode 100644 index 000000000..12f94dfd2 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateExample.rb @@ -0,0 +1,34 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signers_1 = Dropbox::Sign::SubUnclaimedDraftSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers = [ + signers_1, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = true +unclaimed_draft_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +unclaimed_draft_create_request.signers = signers + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateFormFieldGroupsExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldGroupsExample.rb new file mode 100644 index 000000000..881fde8ab --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldGroupsExample.rb @@ -0,0 +1,70 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_groups_1 = Dropbox::Sign::SubFormFieldGroup.new +form_field_groups_1.group_id = "RadioItemGroup1" +form_field_groups_1.group_label = "Radio Item Group 1" +form_field_groups_1.requirement = "require_0-1" + +form_field_groups = [ + form_field_groups_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "radio" +form_fields_per_document_1.required = false +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 18 +form_fields_per_document_1.height = 18 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.group = "RadioItemGroup1" +form_fields_per_document_1.is_checked = true +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentRadio.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "radio" +form_fields_per_document_2.required = false +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 18 +form_fields_per_document_2.height = 18 +form_fields_per_document_2.x = 112 +form_fields_per_document_2.y = 370 +form_fields_per_document_2.group = "RadioItemGroup1" +form_fields_per_document_2.is_checked = false +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_field_groups = form_field_groups +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateFormFieldRulesExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldRulesExample.rb new file mode 100644 index 000000000..54822f3a7 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldRulesExample.rb @@ -0,0 +1,86 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_field_rules_1_triggers_1 = Dropbox::Sign::SubFormFieldRuleTrigger.new +form_field_rules_1_triggers_1.id = "uniqueIdHere_1" +form_field_rules_1_triggers_1.operator = "is" +form_field_rules_1_triggers_1.value = "foo" + +form_field_rules_1_triggers = [ + form_field_rules_1_triggers_1, +] + +form_field_rules_1_actions_1 = Dropbox::Sign::SubFormFieldRuleAction.new +form_field_rules_1_actions_1.hidden = true +form_field_rules_1_actions_1.type = "change-field-visibility" +form_field_rules_1_actions_1.field_id = "uniqueIdHere_2" + +form_field_rules_1_actions = [ + form_field_rules_1_actions_1, +] + +form_field_rules_1 = Dropbox::Sign::SubFormFieldRule.new +form_field_rules_1.id = "rule_1" +form_field_rules_1.trigger_operator = "AND" +form_field_rules_1.triggers = form_field_rules_1_triggers +form_field_rules_1.actions = form_field_rules_1_actions + +form_field_rules = [ + form_field_rules_1, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "0" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_field_rules = form_field_rules +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb new file mode 100644 index 000000000..e4bc66ec0 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftCreateFormFieldsPerDocumentExample.rb @@ -0,0 +1,58 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = false +unclaimed_draft_create_request.file_urls = [ + "https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1", +] +unclaimed_draft_create_request.form_fields_per_document = form_fields_per_document + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" +end diff --git a/sandbox/ruby/src/UnclaimedDraftEditAndResendExample.rb b/sandbox/ruby/src/UnclaimedDraftEditAndResendExample.rb new file mode 100644 index 000000000..dccc4d027 --- /dev/null +++ b/sandbox/ruby/src/UnclaimedDraftEditAndResendExample.rb @@ -0,0 +1,22 @@ +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +unclaimed_draft_edit_and_resend_request = Dropbox::Sign::UnclaimedDraftEditAndResendRequest.new +unclaimed_draft_edit_and_resend_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_edit_and_resend_request.test_mode = false + +begin + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_edit_and_resend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + unclaimed_draft_edit_and_resend_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: #{e}" +end diff --git a/sandbox/ruby/test_fixtures/SignatureRequestCreateEmbeddedRequest.json b/sandbox/ruby/test_fixtures/SignatureRequestCreateEmbeddedRequest.json deleted file mode 100644 index f9bd157f8..000000000 --- a/sandbox/ruby/test_fixtures/SignatureRequestCreateEmbeddedRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "MM / DD / YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/ruby/test_fixtures/SignatureRequestSendRequest.json b/sandbox/ruby/test_fixtures/SignatureRequestSendRequest.json deleted file mode 100644 index 9560ddd52..000000000 --- a/sandbox/ruby/test_fixtures/SignatureRequestSendRequest.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "allow_decline": true, - "allow_reassign": true, - "attachments": [ - { - "name": "Attachment1", - "signer_index": 1, - "instructions": "Upload your Driver's License", - "required": true - } - ], - "cc_email_addresses": [ - "lawyer1@example.com", - "lawyer2@example.com" - ], - "field_options": { - "date_format": "DD - MM - YYYY" - }, - "form_field_groups": [ - { - "group_id": "radio_group_1", - "group_label": "Radio Group 1", - "requirement": "require_0-1" - } - ], - "form_field_rules": [ - { - "id": "rule_1", - "trigger_operator": "AND", - "triggers": [ - { - "id": "api_id_1", - "operator": "is", - "value": "foo" - } - ], - "actions": [ - { - "field_id": "api_id_2", - "hidden": true, - "type": "change-field-visibility" - } - ] - } - ], - "form_fields_per_document": [ - { - "document_index": 0, - "api_id": "api_id_1", - "name": "field_1", - "type": "text", - "x": 0, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": "0", - "page": 1, - "font_family": "roboto", - "font_size": 11 - }, - { - "document_index": 0, - "api_id": "api_id_2", - "name": "field_2", - "type": "text", - "x": 300, - "y": 0, - "width": 120, - "height": 30, - "required": true, - "signer": 0, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_3", - "name": "field_3", - "type": "dropdown", - "options": [ - "Option 1", - "Option 2", - "Option 3" - ], - "x": 0, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": 1, - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_4", - "name": "field_4", - "type": "text", - "x": 300, - "y": 200, - "width": 120, - "height": 30, - "required": true, - "signer": "1", - "page": 1, - "font_size": 12 - }, - { - "document_index": 0, - "api_id": "api_id_5", - "name": "field_5", - "type": "radio", - "group": "radio_group_1", - "is_checked": true, - "x": 0, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - }, - { - "document_index": 0, - "api_id": "api_id_6", - "name": "field_6", - "type": "radio", - "group": "radio_group_1", - "is_checked": false, - "x": 300, - "y": 400, - "width": 100, - "height": 16, - "required": false, - "signer": "2", - "page": 1 - } - ], - "message": "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", - "metadata": { - "custom_id": 1234, - "custom_text": "NDA #9" - }, - "signers": [ - { - "email_address": "s1@example.com", - "name": "Signer 1", - "order": 0 - }, - { - "email_address": "s2@example.com", - "name": "Signer 2", - "order": 1 - }, - { - "email_address": "s3@example.com", - "name": "Signer 3", - "order": 2 - } - ], - "test_mode": true -} diff --git a/sandbox/ruby/test_fixtures/pdf-sample.pdf b/sandbox/ruby/test_fixtures/pdf-sample.pdf deleted file mode 100644 index f698ff53d..000000000 Binary files a/sandbox/ruby/test_fixtures/pdf-sample.pdf and /dev/null differ diff --git a/sdks/dotnet/.github/workflows/github-actions.yml b/sdks/dotnet/.github/workflows/github-actions.yml index 1046c5fd5..d906a4852 100644 --- a/sdks/dotnet/.github/workflows/github-actions.yml +++ b/sdks/dotnet/.github/workflows/github-actions.yml @@ -40,7 +40,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore ${SOLUTION}.sln diff --git a/sdks/dotnet/.gitignore b/sdks/dotnet/.gitignore index 02e0c345b..78294d932 100644 --- a/sdks/dotnet/.gitignore +++ b/sdks/dotnet/.gitignore @@ -361,6 +361,8 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd +git_push.sh +global.json vendor /api .openapi-generator diff --git a/sdks/dotnet/.openapi-generator-ignore b/sdks/dotnet/.openapi-generator-ignore index 77ed52efa..7484ee590 100644 --- a/sdks/dotnet/.openapi-generator-ignore +++ b/sdks/dotnet/.openapi-generator-ignore @@ -21,7 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md - -git_push.sh -**/Model/*AllOf* -docs/*AllOf* diff --git a/sdks/dotnet/Dropbox.Sign.sln b/sdks/dotnet/Dropbox.Sign.sln old mode 100755 new mode 100644 diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index df751f711..e1c6c1734 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -23,8 +23,8 @@ directory that corresponds to the file you want updated. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- SDK version: 1.8-dev -- Generator version: 7.8.0 +- SDK version: 2.0-dev +- Generator version: 7.12.0 - Build package: org.openapitools.codegen.languages.CSharpClientCodegen ### Building @@ -49,7 +49,7 @@ this command. ## Dependencies -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 112.0.0 or later - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later @@ -82,36 +82,39 @@ c.Proxy = webProxy; ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class AccountCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountCreateRequest( + var accountCreateRequest = new AccountCreateRequest( emailAddress: "newuser@dropboxsign.com" ); try { - var result = accountApi.AccountCreate(data); - Console.WriteLine(result); + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -142,7 +145,7 @@ Class | Method | HTTP request | Description *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* | [**FaxFiles**](docs/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download 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 @@ -161,6 +164,10 @@ Class | Method | HTTP request | Description *SignatureRequestApi* | [**SignatureRequestCancel**](docs/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request *SignatureRequestApi* | [**SignatureRequestCreateEmbedded**](docs/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request *SignatureRequestApi* | [**SignatureRequestCreateEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +*SignatureRequestApi* | [**SignatureRequestEdit**](docs/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +*SignatureRequestApi* | [**SignatureRequestEditEmbedded**](docs/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +*SignatureRequestApi* | [**SignatureRequestEditEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +*SignatureRequestApi* | [**SignatureRequestEditWithTemplate**](docs/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template *SignatureRequestApi* | [**SignatureRequestFiles**](docs/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files *SignatureRequestApi* | [**SignatureRequestFilesAsDataUri**](docs/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri *SignatureRequestApi* | [**SignatureRequestFilesAsFileUrl**](docs/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -265,6 +272,10 @@ Class | Method | HTTP request | Description - [Model.SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [Model.SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [Model.SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [Model.SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [Model.SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [Model.SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [Model.SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [Model.SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [Model.SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [Model.SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) diff --git a/sdks/dotnet/VERSION b/sdks/dotnet/VERSION index d82db9132..c3bb52e88 100644 --- a/sdks/dotnet/VERSION +++ b/sdks/dotnet/VERSION @@ -1 +1 @@ -1.8-dev +2.0-dev diff --git a/sdks/dotnet/bin/copy-constants.php b/sdks/dotnet/bin/copy-constants.php new file mode 100755 index 000000000..885380501 --- /dev/null +++ b/sdks/dotnet/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); \ No newline at end of file diff --git a/sdks/dotnet/bin/dotnet b/sdks/dotnet/bin/dotnet index f1b73acd7..b3e5c445d 100755 --- a/sdks/dotnet/bin/dotnet +++ b/sdks/dotnet/bin/dotnet @@ -12,4 +12,4 @@ docker run --rm \ -v "${ROOT_DIR}:${WORKING_DIR}" \ -w "${WORKING_DIR}" \ -u root:root \ - mcr.microsoft.com/dotnet/sdk:6.0 "$@" + mcr.microsoft.com/dotnet/sdk:8.0 "$@" diff --git a/sdks/dotnet/docs/AccountApi.md b/sdks/dotnet/docs/AccountApi.md index 897f4d2ab..f62f83365 100644 --- a/sdks/dotnet/docs/AccountApi.md +++ b/sdks/dotnet/docs/AccountApi.md @@ -20,36 +20,39 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class AccountCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountCreateRequest( + var accountCreateRequest = new AccountCreateRequest( emailAddress: "newuser@dropboxsign.com" ); try { - var result = accountApi.AccountCreate(data); - Console.WriteLine(result); + var response = new AccountApi(config).AccountCreate( + accountCreateRequest: accountCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling AccountApi#AccountCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -117,32 +120,33 @@ Returns the properties and settings of your Account. ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class AccountGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = accountApi.AccountGet(null, "jack@example.com"); - Console.WriteLine(result); + var response = new AccountApi(config).AccountGet(); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling AccountApi#AccountGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -211,36 +215,40 @@ Updates the properties and settings of your Account. Currently only allows for u ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class AccountUpdateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountUpdateRequest( - callbackUrl: "https://www.example.com/callback" + var accountUpdateRequest = new AccountUpdateRequest( + callbackUrl: "https://www.example.com/callback", + locale: "en-US" ); try { - var result = accountApi.AccountUpdate(data); - Console.WriteLine(result); + var response = new AccountApi(config).AccountUpdate( + accountUpdateRequest: accountUpdateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling AccountApi#AccountUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -308,36 +316,39 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class AccountVerifyExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var accountApi = new AccountApi(config); - - var data = new AccountVerifyRequest( + var accountVerifyRequest = new AccountVerifyRequest( emailAddress: "some_user@dropboxsign.com" ); try { - var result = accountApi.AccountVerify(data); - Console.WriteLine(result); + var response = new AccountApi(config).AccountVerify( + accountVerifyRequest: accountVerifyRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling AccountApi#AccountVerify: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/ApiAppApi.md b/sdks/dotnet/docs/ApiAppApi.md index e587a69d8..e94d26a30 100644 --- a/sdks/dotnet/docs/ApiAppApi.md +++ b/sdks/dotnet/docs/ApiAppApi.md @@ -23,29 +23,28 @@ Creates a new API App. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ApiAppCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; var oauth = new SubOAuth( callbackUrl: "https://example.com/oauth", - scopes: new List() { + scopes: [ SubOAuth.ScopesEnum.BasicAccountInfo, - SubOAuth.ScopesEnum.RequestSignature - } + SubOAuth.ScopesEnum.RequestSignature, + ] ); var whiteLabelingOptions = new SubWhiteLabelingOptions( @@ -53,27 +52,30 @@ public class Example primaryButtonTextColor: "#ffffff" ); - var customLogoFile = new FileStream( - "CustomLogoFile.png", - FileMode.Open - ); - - var data = new ApiAppCreateRequest( + var apiAppCreateRequest = new ApiAppCreateRequest( name: "My Production App", - domains: new List(){"example.com"}, + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), oauth: oauth, - whiteLabelingOptions: whiteLabelingOptions, - customLogoFile: customLogoFile + whiteLabelingOptions: whiteLabelingOptions ); try { - var result = apiAppApi.ApiAppCreate(data); - Console.WriteLine(result); + var response = new ApiAppApi(config).ApiAppCreate( + apiAppCreateRequest: apiAppCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ApiAppApi#ApiAppCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -143,32 +145,31 @@ Deletes an API App. Can only be invoked for apps you own. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ApiAppDeleteExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - apiAppApi.ApiAppDelete(clientId); + new ApiAppApi(config).ApiAppDelete( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ApiAppApi#ApiAppDelete: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -233,34 +234,35 @@ Returns an object with information about an API App. ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ApiAppGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = apiAppApi.ApiAppGet(clientId); - Console.WriteLine(result); + var response = new ApiAppApi(config).ApiAppGet( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ApiAppApi#ApiAppGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -328,35 +330,36 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ApiAppListExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); - - var page = 1; - var pageSize = 2; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = apiAppApi.ApiAppList(page, pageSize); - Console.WriteLine(result); + var response = new ApiAppApi(config).ApiAppList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ApiAppApi#ApiAppList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -427,29 +430,28 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ApiAppUpdateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiAppApi = new ApiAppApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; var oauth = new SubOAuth( callbackUrl: "https://example.com/oauth", - scopes: new List() { + scopes: [ SubOAuth.ScopesEnum.BasicAccountInfo, - SubOAuth.ScopesEnum.RequestSignature - } + SubOAuth.ScopesEnum.RequestSignature, + ] ); var whiteLabelingOptions = new SubWhiteLabelingOptions( @@ -457,29 +459,32 @@ public class Example primaryButtonTextColor: "#ffffff" ); - var customLogoFile = new FileStream( - "CustomLogoFile.png", - FileMode.Open - ); - - var data = new ApiAppUpdateRequest( - name: "My Production App", - domains: new List(){"example.com"}, + var apiAppUpdateRequest = new ApiAppUpdateRequest( + callbackUrl: "https://example.com/dropboxsign", + name: "New Name", + domains: [ + "example.com", + ], + customLogoFile: new FileStream( + path: "CustomLogoFile.png", + mode: FileMode.Open + ), oauth: oauth, - whiteLabelingOptions: whiteLabelingOptions, - customLogoFile: customLogoFile + whiteLabelingOptions: whiteLabelingOptions ); - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - try { - var result = apiAppApi.ApiAppUpdate(clientId, data); - Console.WriteLine(result); + var response = new ApiAppApi(config).ApiAppUpdate( + clientId: "0dd3b823a682527788c4e40cb7b6f7e9", + apiAppUpdateRequest: apiAppUpdateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ApiAppApi#ApiAppUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/BulkSendJobApi.md b/sdks/dotnet/docs/BulkSendJobApi.md index 050257d63..46b262680 100644 --- a/sdks/dotnet/docs/BulkSendJobApi.md +++ b/sdks/dotnet/docs/BulkSendJobApi.md @@ -20,33 +20,35 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class BulkSendJobGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var bulkSendJobApi = new BulkSendJobApi(config); - - var bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = bulkSendJobApi.BulkSendJobGet(bulkSendJobId); - Console.WriteLine(result); + var response = new BulkSendJobApi(config).BulkSendJobGet( + bulkSendJobId: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -118,34 +120,34 @@ Returns a list of BulkSendJob that you can access. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class BulkSendJobListExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var bulkSendJobApi = new BulkSendJobApi(config); - - var page = 1; - var pageSize = 20; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = bulkSendJobApi.BulkSendJobList(page, pageSize); - Console.WriteLine(result); + var response = new BulkSendJobApi(config).BulkSendJobList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling BulkSendJobApi#BulkSendJobList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/EmbeddedApi.md b/sdks/dotnet/docs/EmbeddedApi.md index 39c38b4c2..473f3dfaf 100644 --- a/sdks/dotnet/docs/EmbeddedApi.md +++ b/sdks/dotnet/docs/EmbeddedApi.md @@ -20,38 +20,43 @@ Retrieves an embedded object containing a template url that can be opened in an using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class EmbeddedEditUrlExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var embeddedApi = new EmbeddedApi(config); + var mergeFields = new List(); - var data = new EmbeddedEditUrlRequest( - ccRoles: new List(){""}, - mergeFields: new List() + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest( + ccRoles: [ + "", + ], + mergeFields: mergeFields ); - var templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - var result = embeddedApi.EmbeddedEditUrl(templateId, data); - Console.WriteLine(result); + var response = new EmbeddedApi(config).EmbeddedEditUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + embeddedEditUrlRequest: embeddedEditUrlRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedEditUrl: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -122,33 +127,33 @@ Retrieves an embedded object containing a signature url that can be opened in an using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class EmbeddedSignUrlExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var embeddedApi = new EmbeddedApi(config); - - var signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = embeddedApi.EmbeddedSignUrl(signatureId); - Console.WriteLine(result); + var response = new EmbeddedApi(config).EmbeddedSignUrl( + signatureId: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedSignUrl: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/FaxApi.md b/sdks/dotnet/docs/FaxApi.md index 303d4eff9..41349a481 100644 --- a/sdks/dotnet/docs/FaxApi.md +++ b/sdks/dotnet/docs/FaxApi.md @@ -5,7 +5,7 @@ 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 | +| [**FaxFiles**](FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download 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 | @@ -16,33 +16,37 @@ All URIs are relative to *https://api.hellosign.com/v3* Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxDeleteExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxApi = new FaxApi(config); - try { - faxApi.FaxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + new FaxApi(config).FaxDelete( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxApi#FaxDelete: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -100,41 +104,43 @@ void (empty response body) # **FaxFiles** > System.IO.Stream FaxFiles (string faxId) -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxFilesExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxApi = new FaxApi(config); - - var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - var result = faxApi.FaxFiles(faxId); - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); + var response = new FaxApi(config).FaxFiles( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); fileStream.Close(); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxApi#FaxFiles: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -149,7 +155,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - // List Fax Files + // Download Fax Files ApiResponse response = apiInstance.FaxFilesWithHttpInfo(faxId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); @@ -197,36 +203,39 @@ catch (ApiException e) Get Fax -Returns information about fax +Returns information about a Fax ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - var faxApi = new FaxApi(config); - - var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - var result = faxApi.FaxGet(faxId); - Console.WriteLine(result); + var response = new FaxApi(config).FaxGet( + faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxApi#FaxGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -289,37 +298,40 @@ catch (ApiException e) Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example ```csharp using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxListExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - var faxApi = new FaxApi(config); - - var page = 1; - var pageSize = 2; - try { - var result = faxApi.FaxList(page, pageSize); - Console.WriteLine(result); + var response = new FaxApi(config).FaxList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxApi#FaxList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -352,8 +364,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **page** | **int?** | Page | [optional] [default to 1] | -| **pageSize** | **int?** | Page size | [optional] [default to 20] | +| **page** | **int?** | Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **int?** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | ### Return type @@ -383,54 +395,56 @@ catch (ApiException e) Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxSendExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxApi = new FaxApi(config); - - var files = new List { - new FileStream( - "./example_fax.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new FaxSendRequest( - files: files, - testMode: true, + var faxSendRequest = new FaxSendRequest( recipient: "16690000001", sender: "16690000000", + testMode: true, coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", + files: new List + { + new FileStream( + path: "./example_fax.pdf", + mode: FileMode.Open + ), + } ); try { - var result = faxApi.FaxSend(data); - Console.WriteLine(result); + var response = new FaxApi(config).FaxSend( + faxSendRequest: faxSendRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/FaxLineAddUserRequest.md b/sdks/dotnet/docs/FaxLineAddUserRequest.md index f89c0deef..705c9d91d 100644 --- a/sdks/dotnet/docs/FaxLineAddUserRequest.md +++ b/sdks/dotnet/docs/FaxLineAddUserRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | The Fax Line number. | **AccountId** | **string** | Account ID | [optional] **EmailAddress** | **string** | Email address | [optional] +**Number** | **string** | The Fax Line number | **AccountId** | **string** | Account ID | [optional] **EmailAddress** | **string** | Email address | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineApi.md b/sdks/dotnet/docs/FaxLineApi.md index 9fdd09ba0..42ebfe88b 100644 --- a/sdks/dotnet/docs/FaxLineApi.md +++ b/sdks/dotnet/docs/FaxLineApi.md @@ -25,32 +25,37 @@ Grants a user access to the specified Fax Line. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineAddUserExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineAddUserRequest( + var faxLineAddUserRequest = new FaxLineAddUserRequest( number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com" ); try { - var result = faxLineApi.FaxLineAddUser(data); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineAddUser( + faxLineAddUserRequest: faxLineAddUserRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAddUser: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -113,34 +118,39 @@ catch (ApiException e) Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineAreaCodeGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - try { - var result = faxLineApi.FaxLineAreaCodeGet("US", "CA"); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineAreaCodeGet( + country: "US" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineAreaCodeGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -173,10 +183,10 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **country** | **string** | Filter area codes by country. | | -| **state** | **string?** | Filter area codes by state. | [optional] | -| **province** | **string?** | Filter area codes by province. | [optional] | -| **city** | **string?** | Filter area codes by city. | [optional] | +| **country** | **string** | Filter area codes by country | | +| **state** | **string?** | Filter area codes by state | [optional] | +| **province** | **string?** | Filter area codes by province | [optional] | +| **city** | **string?** | Filter area codes by city | [optional] | ### Return type @@ -206,39 +216,44 @@ catch (ApiException e) Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineCreateRequest( + var faxLineCreateRequest = new FaxLineCreateRequest( areaCode: 209, - country: "US" + country: FaxLineCreateRequest.CountryEnum.US ); try { - var result = faxLineApi.FaxLineCreate(data); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineCreate( + faxLineCreateRequest: faxLineCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -308,30 +323,34 @@ Deletes the specified Fax Line from the subscription. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineDeleteExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineDeleteRequest( + var faxLineDeleteRequest = new FaxLineDeleteRequest( number: "[FAX_NUMBER]" ); try { - faxLineApi.FaxLineDelete(data); + new FaxLineApi(config).FaxLineDelete( + faxLineDeleteRequest: faxLineDeleteRequest + ); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineDelete: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -398,27 +417,32 @@ Returns the properties and settings of a Fax Line. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - try { - var result = faxLineApi.FaxLineGet("[FAX_NUMBER]"); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineGet( + number: "123-123-1234" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -451,7 +475,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **number** | **string** | The Fax Line number. | | +| **number** | **string** | The Fax Line number | | ### Return type @@ -488,27 +512,34 @@ Returns the properties and settings of multiple Fax Lines. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineListExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - try { - var result = faxLineApi.FaxLineList(); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineList( + accountId: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -542,9 +573,9 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **accountId** | **string?** | Account ID | [optional] | -| **page** | **int?** | Page | [optional] [default to 1] | -| **pageSize** | **int?** | Page size | [optional] [default to 20] | -| **showTeamLines** | **bool?** | Show team lines | [optional] | +| **page** | **int?** | Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **int?** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | +| **showTeamLines** | **bool?** | Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -574,39 +605,44 @@ catch (ApiException e) Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class FaxLineRemoveUserExample { - public static void Main() + public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; - var faxLineApi = new FaxLineApi(config); - - var data = new FaxLineRemoveUserRequest( + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest( number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com" ); try { - var result = faxLineApi.FaxLineRemoveUser(data); - Console.WriteLine(result); + var response = new FaxLineApi(config).FaxLineRemoveUser( + faxLineRemoveUserRequest: faxLineRemoveUserRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling FaxLineApi#FaxLineRemoveUser: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/FaxLineCreateRequest.md b/sdks/dotnet/docs/FaxLineCreateRequest.md index 21d3ffc88..d8bf8c4d9 100644 --- a/sdks/dotnet/docs/FaxLineCreateRequest.md +++ b/sdks/dotnet/docs/FaxLineCreateRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AreaCode** | **int** | Area code | **Country** | **string** | Country | **City** | **string** | City | [optional] **AccountId** | **string** | Account ID | [optional] +**AreaCode** | **int** | Area code of the new Fax Line | **Country** | **string** | Country of the area code | **City** | **string** | City of the area code | [optional] **AccountId** | **string** | Account ID of the account that will be assigned this new Fax Line | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineDeleteRequest.md b/sdks/dotnet/docs/FaxLineDeleteRequest.md index 673880d28..1d8885b58 100644 --- a/sdks/dotnet/docs/FaxLineDeleteRequest.md +++ b/sdks/dotnet/docs/FaxLineDeleteRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | The Fax Line number. | +**Number** | **string** | The Fax Line number | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxLineRemoveUserRequest.md b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md index 0d73414a7..3be0e7bdb 100644 --- a/sdks/dotnet/docs/FaxLineRemoveUserRequest.md +++ b/sdks/dotnet/docs/FaxLineRemoveUserRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **string** | The Fax Line number. | **AccountId** | **string** | Account ID | [optional] **EmailAddress** | **string** | Email address | [optional] +**Number** | **string** | The Fax Line number | **AccountId** | **string** | Account ID of the user to remove access | [optional] **EmailAddress** | **string** | Email address of the user to remove access | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/FaxSendRequest.md b/sdks/dotnet/docs/FaxSendRequest.md index b02d7f0b8..371c7c062 100644 --- a/sdks/dotnet/docs/FaxSendRequest.md +++ b/sdks/dotnet/docs/FaxSendRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Recipient** | **string** | Fax Send To Recipient | **Sender** | **string** | Fax Send From Sender (used only with fax number) | [optional] **Files** | **List<System.IO.Stream>** | Fax File to Send | [optional] **FileUrls** | **List<string>** | Fax File URL to Send | [optional] **TestMode** | **bool** | API Test Mode Setting | [optional] [default to false]**CoverPageTo** | **string** | Fax Cover Page for Recipient | [optional] **CoverPageFrom** | **string** | Fax Cover Page for Sender | [optional] **CoverPageMessage** | **string** | Fax Cover Page Message | [optional] **Title** | **string** | Fax Title | [optional] +**Recipient** | **string** | Recipient of the fax Can be a phone number in E.164 format or email address | **Sender** | **string** | Fax Send From Sender (used only with fax number) | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **TestMode** | **bool** | API Test Mode Setting | [optional] [default to false]**CoverPageTo** | **string** | Fax cover page recipient information | [optional] **CoverPageFrom** | **string** | Fax cover page sender information | [optional] **CoverPageMessage** | **string** | Fax Cover Page Message | [optional] **Title** | **string** | Fax Title | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/docs/OAuthApi.md b/sdks/dotnet/docs/OAuthApi.md index c80ee2758..2918ea95f 100644 --- a/sdks/dotnet/docs/OAuthApi.md +++ b/sdks/dotnet/docs/OAuthApi.md @@ -20,33 +20,39 @@ Once you have retrieved the code from the user callback, you will need to exchan using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class OauthTokenGenerateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - var oAuthApi = new OAuthApi(config); - - var data = new OAuthTokenGenerateRequest( - state: "900e06e2", - code: "1b0d28d90c86c141", + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest( clientId: "cc91c61d00f8bb2ece1428035716b", - clientSecret: "1d14434088507ffa390e6f5528465" + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code" ); try { - var result = oAuthApi.OauthTokenGenerate(data); - Console.WriteLine(result); + var response = new OAuthApi(config).OauthTokenGenerate( + oAuthTokenGenerateRequest: oAuthTokenGenerateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling OAuthApi#OauthTokenGenerate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -116,30 +122,36 @@ Access tokens are only valid for a given period of time (typically one hour) for using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class OauthTokenRefreshExample { - public static void Main() + public static void Run() { var config = new Configuration(); - var oAuthApi = new OAuthApi(config); - - var data = new OAuthTokenRefreshRequest( + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest( + grantType: "refresh_token", refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" ); try { - var result = oAuthApi.OauthTokenRefresh(data); - Console.WriteLine(result); + var response = new OAuthApi(config).OauthTokenRefresh( + oAuthTokenRefreshRequest: oAuthTokenRefreshRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling OAuthApi#OauthTokenRefresh: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/ReportApi.md b/sdks/dotnet/docs/ReportApi.md index 9ea98796f..324902c65 100644 --- a/sdks/dotnet/docs/ReportApi.md +++ b/sdks/dotnet/docs/ReportApi.md @@ -19,40 +19,41 @@ Request the creation of one or more report(s). When the report(s) have been gen using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class ReportCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var reportApi = new ReportApi(config); - - var data = new ReportCreateRequest( + var reportCreateRequest = new ReportCreateRequest( startDate: "09/01/2020", endDate: "09/01/2020", - reportType: new List() { + reportType: [ ReportCreateRequest.ReportTypeEnum.UserActivity, ReportCreateRequest.ReportTypeEnum.DocumentStatus, - } + ] ); try { - var result = reportApi.OauthCreate(data); - Console.WriteLine(result); + var response = new ReportApi(config).ReportCreate( + reportCreateRequest: reportCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling ReportApi#ReportCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/SignatureRequestApi.md b/sdks/dotnet/docs/SignatureRequestApi.md index a507cc08f..a3061633d 100644 --- a/sdks/dotnet/docs/SignatureRequestApi.md +++ b/sdks/dotnet/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**SignatureRequestCancel**](SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**SignatureRequestCreateEmbedded**](SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**SignatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**SignatureRequestEdit**](SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**SignatureRequestEditEmbedded**](SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**SignatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**SignatureRequestEditWithTemplate**](SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**SignatureRequestFiles**](SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**SignatureRequestFilesAsDataUri**](SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**SignatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -34,80 +38,114 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); - var signatureRequestApi = new SignatureRequestApi(config); + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; - var signerList1Signer = new SubSignatureRequestTemplateSigner( + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td" + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" ); - var signerList1CustomFields = new SubBulkSignerListCustomField( + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( name: "company", value: "ABC Corp" ); - var signerList1 = new SubBulkSignerList( - signers: new List(){signerList1Signer}, - customFields: new List(){signerList1CustomFields} - ); + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; - var signerList2Signer = new SubSignatureRequestTemplateSigner( + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b" + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" ); - var signerList2CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "123 Corp" + var signerList1Signers = new List + { + signerList1Signers1, + }; + + var signerList1 = new SubBulkSignerList( + customFields: signerList1CustomFields, + signers: signerList1Signers ); var signerList2 = new SubBulkSignerList( - signers: new List(){signerList2Signer}, - customFields: new List(){signerList2CustomFields} + customFields: signerList2CustomFields, + signers: signerList2Signers ); - var cc1 = new SubCC( + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( role: "Accounting", - emailAddress: "accouting@email.com" + emailAddress: "accounting@example.com" ); - var data = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest( clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], message: "Glad we could come to an agreement.", - signerList: new List(){signerList1, signerList2}, - ccs: new List(){cc1}, - testMode: true + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs ); try { - var result = signatureRequestApi.SignatureRequestBulkCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest: signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkCreateEmbeddedWithTemplate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -177,79 +215,629 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestBulkSendWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; + var signerList2CustomFields1 = new SubBulkSignerListCustomField( + name: "company", + value: "123 LLC" + ); - var signatureRequestApi = new SignatureRequestApi(config); + var signerList2CustomFields = new List + { + signerList2CustomFields1, + }; - var signerList1Signer = new SubSignatureRequestTemplateSigner( + var signerList2Signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td" + name: "Mary", + emailAddress: "mary@example.com", + pin: "gd9as5b" ); - var signerList1CustomFields = new SubBulkSignerListCustomField( + var signerList2Signers = new List + { + signerList2Signers1, + }; + + var signerList1CustomFields1 = new SubBulkSignerListCustomField( name: "company", value: "ABC Corp" ); + var signerList1CustomFields = new List + { + signerList1CustomFields1, + }; + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com", + pin: "d79a3td" + ); + + var signerList1Signers = new List + { + signerList1Signers1, + }; + var signerList1 = new SubBulkSignerList( - signers: new List(){signerList1Signer}, - customFields: new List(){signerList1CustomFields} + customFields: signerList1CustomFields, + signers: signerList1Signers ); - var signerList2Signer = new SubSignatureRequestTemplateSigner( + var signerList2 = new SubBulkSignerList( + customFields: signerList2CustomFields, + signers: signerList2Signers + ); + + var signerList = new List + { + signerList1, + signerList2, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" + ); + + var ccs = new List + { + ccs1, + }; + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest( + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signerList: signerList, + ccs: ccs + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest: signatureRequestBulkSendWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestBulkSendWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestBulkSendWithTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Bulk Send with Template + ApiResponse response = apiInstance.SignatureRequestBulkSendWithTemplateWithHttpInfo(signatureRequestBulkSendWithTemplateRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestBulkSendWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestBulkSendWithTemplateRequest** | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md) | | | + +### Return type + +[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SignatureRequestCancel** +> void SignatureRequestCancel (string signatureRequestId) + +Cancel Incomplete Signature Request + +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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCancelExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + try + { + new SignatureRequestApi(config).SignatureRequestCancel( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCancel: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestCancelWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Cancel Incomplete Signature Request + apiInstance.SignatureRequestCancelWithHttpInfo(signatureRequestId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCancelWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestId** | **string** | The id of the incomplete SignatureRequest to cancel. | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SignatureRequestCreateEmbedded** +> SignatureRequestGetResponse SignatureRequestCreateEmbedded (SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest) + +Create Embedded Signature Request + +Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); + + var signers = new List + { + signers1, + signers2, + }; + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest: signatureRequestCreateEmbeddedRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbedded: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestCreateEmbeddedWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create Embedded Signature Request + ApiResponse response = apiInstance.SignatureRequestCreateEmbeddedWithHttpInfo(signatureRequestCreateEmbeddedRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCreateEmbeddedWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SignatureRequestCreateEmbeddedWithTemplate** +> SignatureRequestGetResponse SignatureRequestCreateEmbeddedWithTemplate (SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest) + +Create Embedded Signature Request with Template + +Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b" + name: "George", + emailAddress: "george@example.com" + ); + + var signers = new List + { + signers1, + }; + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers + ); + + try + { + var response = new SignatureRequestApi(config).SignatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest: signatureRequestCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); + } + catch (ApiException e) + { + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCreateEmbeddedWithTemplate: " + e.Message); + Console.WriteLine("Status Code: " + e.ErrorCode); + Console.WriteLine(e.StackTrace); + } + } +} + +``` + +#### Using the SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create Embedded Signature Request with Template + ApiResponse response = apiInstance.SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo(signatureRequestCreateEmbeddedWithTemplateRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SignatureRequestEdit** +> SignatureRequestGetResponse SignatureRequestEdit (string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example +```csharp +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +using Dropbox.Sign.Api; +using Dropbox.Sign.Client; +using Dropbox.Sign.Model; + +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditExample +{ + public static void Run() + { + var config = new Configuration(); + config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); + + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true ); - var signerList2CustomFields = new SubBulkSignerListCustomField( - name: "company", - value: "123 Corp" + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 ); - var signerList2 = new SubBulkSignerList( - signers: new List(){signerList2Signer}, - customFields: new List(){signerList2CustomFields} + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 ); - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@email.com" - ); + var signers = new List + { + signers1, + signers2, + }; - var data = new SignatureRequestBulkSendWithTemplateRequest( - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: new List(){signerList1, signerList2}, - ccs: new List(){cc1}, - testMode: true + var signatureRequestEditRequest = new SignatureRequestEditRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers ); try { - var result = signatureRequestApi.SignatureRequestBulkSendWithTemplate(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestEdit( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditRequest: signatureRequestEditRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEdit: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -258,21 +846,21 @@ public class Example ``` -#### Using the SignatureRequestBulkSendWithTemplateWithHttpInfo variant +#### Using the SignatureRequestEditWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - // Bulk Send with Template - ApiResponse response = apiInstance.SignatureRequestBulkSendWithTemplateWithHttpInfo(signatureRequestBulkSendWithTemplateRequest); + // Edit Signature Request + ApiResponse response = apiInstance.SignatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestBulkSendWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -282,11 +870,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **signatureRequestBulkSendWithTemplateRequest** | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md) | | | +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md) | | | ### Return type -[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) ### Authorization @@ -306,45 +895,94 @@ catch (ApiException e) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **SignatureRequestCancel** -> void SignatureRequestCancel (string signatureRequestId) + +# **SignatureRequestEditEmbedded** +> SignatureRequestGetResponse SignatureRequestEditEmbedded (string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) -Cancel Incomplete Signature Request +Edit Embedded Signature Request -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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); + + var signers1 = new SubSignatureRequestSigner( + name: "Jack", + emailAddress: "jack@example.com", + order: 0 + ); + + var signers2 = new SubSignatureRequestSigner( + name: "Jill", + emailAddress: "jill@example.com", + order: 1 + ); - var signatureRequestApi = new SignatureRequestApi(config); + var signers = new List + { + signers1, + signers2, + }; - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signingOptions: signingOptions, + signers: signers + ); try { - signatureRequestApi.SignatureRequestCancel(signatureRequestId); + var response = new SignatureRequestApi(config).SignatureRequestEditEmbedded( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedRequest: signatureRequestEditEmbeddedRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbedded: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -353,18 +991,21 @@ public class Example ``` -#### Using the SignatureRequestCancelWithHttpInfo variant +#### Using the SignatureRequestEditEmbeddedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - // Cancel Incomplete Signature Request - apiInstance.SignatureRequestCancelWithHttpInfo(signatureRequestId); + // Edit Embedded Signature Request + ApiResponse response = apiInstance.SignatureRequestEditEmbeddedWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCancelWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditEmbeddedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -374,11 +1015,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **signatureRequestId** | **string** | The id of the incomplete SignatureRequest to cancel. | | +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md) | | | ### Return type -void (empty response body) +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) ### Authorization @@ -386,7 +1028,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json @@ -398,85 +1040,78 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **SignatureRequestCreateEmbedded** -> SignatureRequestGetResponse SignatureRequestCreateEmbedded (SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest) + +# **SignatureRequestEditEmbeddedWithTemplate** +> SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate (string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest) -Create Embedded Signature Request +Edit Embedded Signature Request with Template -Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### Example ```csharp using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditEmbeddedWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", - name: "Jack", - order: 0 - ); - - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw + upload: true + ); + + var signers1 = new SubSignatureRequestTemplateSigner( + role: "Client", + name: "George", + emailAddress: "george@example.com" ); - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) + var signers = new List + { + signers1, }; - var data = new SignatureRequestCreateEmbeddedRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, signingOptions: signingOptions, - testMode: true + signers: signers ); try { - var result = signatureRequestApi.SignatureRequestCreateEmbedded(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestEditEmbeddedWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditEmbeddedWithTemplateRequest: signatureRequestEditEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditEmbeddedWithTemplate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -485,21 +1120,21 @@ public class Example ``` -#### Using the SignatureRequestCreateEmbeddedWithHttpInfo variant +#### Using the SignatureRequestEditEmbeddedWithTemplateWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - // Create Embedded Signature Request - ApiResponse response = apiInstance.SignatureRequestCreateEmbeddedWithHttpInfo(signatureRequestCreateEmbeddedRequest); + // Edit Embedded Signature Request with Template + ApiResponse response = apiInstance.SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCreateEmbeddedWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplateWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -509,7 +1144,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md) | | | +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md) | | | ### Return type @@ -533,66 +1169,101 @@ catch (ApiException e) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **SignatureRequestCreateEmbeddedWithTemplate** -> SignatureRequestGetResponse SignatureRequestCreateEmbeddedWithTemplate (SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest) + +# **SignatureRequestEditWithTemplate** +> SignatureRequestGetResponse SignatureRequestEditWithTemplate (string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) -Create Embedded Signature Request with Template +Edit Signature Request With Template -Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. ### Example ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestEditWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); - var signer1 = new SubSignatureRequestTemplateSigner( + var signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - name: "George" + name: "George", + emailAddress: "george@example.com" ); - var subSigningOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@example.com" ); - var data = new SignatureRequestCreateEmbeddedWithTemplateRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( + name: "Cost", + editor: "Client", + required: true, + value: "$20,000" + ); + + var customFields = new List + { + customFields1, + }; + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - signingOptions: subSigningOptions, - testMode: true + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields ); try { - var result = signatureRequestApi.SignatureRequestCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestEditWithTemplate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestEditWithTemplateRequest: signatureRequestEditWithTemplateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestEditWithTemplate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -601,21 +1272,21 @@ public class Example ``` -#### Using the SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo variant +#### Using the SignatureRequestEditWithTemplateWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - // Create Embedded Signature Request with Template - ApiResponse response = apiInstance.SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo(signatureRequestCreateEmbeddedWithTemplateRequest); + // Edit Signature Request With Template + ApiResponse response = apiInstance.SignatureRequestEditWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditWithTemplateRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling SignatureRequestApi.SignatureRequestEditWithTemplateWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -625,7 +1296,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md) | | | +| **signatureRequestId** | **string** | The id of the SignatureRequest to edit. | | +| **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md) | | | ### Return type @@ -661,37 +1333,37 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestFiles(signatureRequestId, "pdf"); - - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); + var response = new SignatureRequestApi(config).SignatureRequestFiles( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + fileType: "pdf" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); fileStream.Close(); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFiles: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -761,33 +1433,34 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsDataUriExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestFilesAsDataUri(signatureRequestId); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestFilesAsDataUri( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsDataUri: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -856,33 +1529,35 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestFilesAsFileUrlExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestFilesAsFileUrl(signatureRequestId); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestFilesAsFileUrl( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + forceDownload: 1 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestFilesAsFileUrl: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -952,33 +1627,34 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestGet(signatureRequestId); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestGet( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1047,33 +1723,35 @@ Returns a list of SignatureRequests that you can access. This includes Signature ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestListExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var accountId = "accountId"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestList(accountId); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1145,33 +1823,34 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestReleaseHoldExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = signatureRequestApi.SignatureRequestReleaseHold(signatureRequestId); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestReleaseHold( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestReleaseHold: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1240,37 +1919,39 @@ Sends an email to the signer reminding them to sign the signature request. You c ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemindExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var data = new SignatureRequestRemindRequest( + var signatureRequestRemindRequest = new SignatureRequestRemindRequest( emailAddress: "john@example.com" ); - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - var result = signatureRequestApi.SignatureRequestRemind(signatureRequestId, data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestRemind( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestRemindRequest: signatureRequestRemindRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemind: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1340,32 +2021,31 @@ Removes your access to a completed signature request. This action is **not rever ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestRemoveExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - signatureRequestApi.SignatureRequestRemove(signatureRequestId); + new SignatureRequestApi(config).SignatureRequestRemove( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" + ); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestRemove: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1432,83 +2112,90 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); - var signatureRequestApi = new SignatureRequestApi(config); + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); - var signer1 = new SubSignatureRequestSigner( - emailAddress: "jack@example.com", + var signers1 = new SubSignatureRequestSigner( name: "Jack", + emailAddress: "jack@example.com", order: 0 ); - var signer2 = new SubSignatureRequestSigner( - emailAddress: "jill@example.com", + var signers2 = new SubSignatureRequestSigner( name: "Jill", + emailAddress: "jill@example.com", order: 1 ); - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: true, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var metadata = new Dictionary() + var signers = new List { - ["custom_id"] = 1234, - ["custom_text"] = "NDA #9" + signers1, + signers2, }; - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new SignatureRequestSendRequest( - title: "NDA with Acme Co.", + var signatureRequestSendRequest = new SignatureRequestSendRequest( + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - metadata: metadata, + testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + metadata: JsonSerializer.Deserialize>(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """), + fieldOptions: fieldOptions, signingOptions: signingOptions, - fieldOptions: subFieldOptions, - testMode: true + signers: signers ); try { - var result = signatureRequestApi.SignatureRequestSend(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestSend( + signatureRequestSendRequest: signatureRequestSendRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSend: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1577,68 +2264,88 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestSendWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); + var signingOptions = new SubSigningOptions( + defaultType: SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true + ); - var signer1 = new SubSignatureRequestTemplateSigner( + var signers1 = new SubSignatureRequestTemplateSigner( role: "Client", - emailAddress: "george@example.com", - name: "George" + name: "George", + emailAddress: "george@example.com" ); - var cc1 = new SubCC( + var signers = new List + { + signers1, + }; + + var ccs1 = new SubCC( role: "Accounting", - emailAddress: "accouting@emaple.com" + emailAddress: "accounting@example.com" ); - var customField1 = new SubCustomField( + var ccs = new List + { + ccs1, + }; + + var customFields1 = new SubCustomField( name: "Cost", - value: "$20,000", editor: "Client", - required: true + required: true, + value: "$20,000" ); - var signingOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); + var customFields = new List + { + customFields1, + }; - var data = new SignatureRequestSendWithTemplateRequest( - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, - subject: "Purchase Order", + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest( + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], message: "Glad we could come to an agreement.", - signers: new List(){signer1}, - ccs: new List(){cc1}, - customFields: new List(){customField1}, + subject: "Purchase Order", + testMode: true, signingOptions: signingOptions, - testMode: true + signers: signers, + ccs: ccs, + customFields: customFields ); try { - var result = signatureRequestApi.SignatureRequestSendWithTemplate(data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest: signatureRequestSendWithTemplateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestSendWithTemplate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1707,38 +2414,40 @@ Updates the email address and/or the name for a given signer on a signature requ ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class SignatureRequestUpdateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var signatureRequestApi = new SignatureRequestApi(config); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - - var data = new SignatureRequestUpdateRequest( - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3" + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest( + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", + emailAddress: "john@example.com" ); try { - var result = signatureRequestApi.SignatureRequestUpdate(signatureRequestId, data); - Console.WriteLine(result); + var response = new SignatureRequestApi(config).SignatureRequestUpdate( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signatureRequestUpdateRequest: signatureRequestUpdateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/dotnet/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..3d7e41773 --- /dev/null +++ b/sdks/dotnet/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SignatureRequestEditEmbeddedRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false]**PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..8be8d1b17 --- /dev/null +++ b/sdks/dotnet/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SignatureRequestEditEmbeddedWithTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **ClientId** | **string** | Client id of the app you're using to create this embedded signature request. Used for security purposes. | **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **PopulateAutoFillFields** | **bool** | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/SignatureRequestEditRequest.md b/sdks/dotnet/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..20f216403 --- /dev/null +++ b/sdks/dotnet/docs/SignatureRequestEditRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SignatureRequestEditRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **Signers** | [**List<SubSignatureRequestSigner>**](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **GroupedSigners** | [**List<SubSignatureRequestGroupedSigners>**](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | [optional] **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**AllowReassign** | **bool** | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [optional] [default to false]**Attachments** | [**List<SubAttachment>**](SubAttachment.md) | A list describing the attachments | [optional] **CcEmailAddresses** | **List<string>** | The email addresses that should be CCed. | [optional] **ClientId** | **string** | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | [optional] **FieldOptions** | [**SubFieldOptions**](SubFieldOptions.md) | | [optional] **FormFieldGroups** | [**List<SubFormFieldGroup>**](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | [optional] **FormFieldRules** | [**List<SubFormFieldRule>**](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | [optional] **FormFieldsPerDocument** | [**List<SubFormFieldsPerDocumentBase>**](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | [optional] **HideTextTags** | **bool** | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [optional] [default to false]**IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **UseTextTags** | **bool** | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [optional] [default to false]**ExpiresAt** | **int?** | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/dotnet/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..d9ac882ee --- /dev/null +++ b/sdks/dotnet/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SignatureRequestEditWithTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateIds** | **List<string>** | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | **Signers** | [**List<SubSignatureRequestTemplateSigner>**](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | **AllowDecline** | **bool** | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [optional] [default to false]**Ccs** | [**List<SubCC>**](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | [optional] **ClientId** | **string** | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | [optional] **CustomFields** | [**List<SubCustomField>**](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | [optional] **Files** | **List<System.IO.Stream>** | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **FileUrls** | **List<string>** | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | [optional] **IsEid** | **bool** | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [optional] [default to false]**Message** | **string** | The custom message in the email that will be sent to the signers. | [optional] **Metadata** | **Dictionary<string, Object>** | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | [optional] **SigningOptions** | [**SubSigningOptions**](SubSigningOptions.md) | | [optional] **SigningRedirectUrl** | **string** | The URL you want signers redirected to after they successfully sign. | [optional] **Subject** | **string** | The subject in the email that will be sent to the signers. | [optional] **TestMode** | **bool** | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [optional] [default to false]**Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/TeamApi.md b/sdks/dotnet/docs/TeamApi.md index 64d8dd554..2e5e8784f 100644 --- a/sdks/dotnet/docs/TeamApi.md +++ b/sdks/dotnet/docs/TeamApi.md @@ -27,35 +27,39 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamAddMemberExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamAddMemberRequest( + var teamAddMemberRequest = new TeamAddMemberRequest( emailAddress: "george@example.com" ); try { - var result = teamApi.TeamAddMember(data); - Console.WriteLine(result); + var response = new TeamApi(config).TeamAddMember( + teamAddMemberRequest: teamAddMemberRequest, + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamAddMember: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -125,35 +129,38 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamCreateRequest( + var teamCreateRequest = new TeamCreateRequest( name: "New Team Name" ); try { - var result = teamApi.TeamCreate(data); - Console.WriteLine(result); + var response = new TeamApi(config).TeamCreate( + teamCreateRequest: teamCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -222,30 +229,30 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamDeleteExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - teamApi.TeamDelete(); + new TeamApi(config).TeamDelete(); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamDelete: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -307,31 +314,32 @@ Returns information about your Team as well as a list of its members. If you do ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = teamApi.TeamGet(); - Console.WriteLine(result); + var response = new TeamApi(config).TeamGet(); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -396,31 +404,34 @@ Provides information about a team. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamInfoExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = teamApi.TeamInfo(); - Console.WriteLine(result); + var response = new TeamApi(config).TeamInfo( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamInfo: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -489,32 +500,32 @@ Provides a list of team invites (and their roles). ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamInvitesExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var emailAddress = "user@dropboxsign.com"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = teamApi.TeamInvites(emailAddress); - Console.WriteLine(result); + var response = new TeamApi(config).TeamInvites(); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamInvites: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -583,32 +594,36 @@ Provides a paginated list of members (and their roles) that belong to a given te ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamMembersExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = teamApi.TeamMembers(teamId); - Console.WriteLine(result); + var response = new TeamApi(config).TeamMembers( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamMembers: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -679,36 +694,39 @@ Removes the provided user Account from your Team. If the Account had an outstand ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamRemoveMemberExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamRemoveMemberRequest( + var teamRemoveMemberRequest = new TeamRemoveMemberRequest( emailAddress: "teammate@dropboxsign.com", newOwnerEmailAddress: "new_teammate@dropboxsign.com" ); try { - var result = teamApi.TeamRemoveMember(data); - Console.WriteLine(result); + var response = new TeamApi(config).TeamRemoveMember( + teamRemoveMemberRequest: teamRemoveMemberRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamRemoveMember: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -777,32 +795,36 @@ Provides a paginated list of sub teams that belong to a given team. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamSubTeamsExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = teamApi.TeamSubTeams(teamId); - Console.WriteLine(result); + var response = new TeamApi(config).TeamSubTeams( + teamId: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamSubTeams: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -873,35 +895,38 @@ Updates the name of your Team. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TeamUpdateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var teamApi = new TeamApi(config); - - var data = new TeamUpdateRequest( + var teamUpdateRequest = new TeamUpdateRequest( name: "New Team Name" ); try { - var result = teamApi.TeamUpdate(data); - Console.WriteLine(result); + var response = new TeamApi(config).TeamUpdate( + teamUpdateRequest: teamUpdateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TeamApi#TeamUpdate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/TemplateApi.md b/sdks/dotnet/docs/TemplateApi.md index c51decd9d..f9c66e11c 100644 --- a/sdks/dotnet/docs/TemplateApi.md +++ b/sdks/dotnet/docs/TemplateApi.md @@ -28,37 +28,39 @@ Gives the specified Account access to the specified Template. The specified Acco ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateAddUserExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - var data = new TemplateAddUserRequest( + var templateAddUserRequest = new TemplateAddUserRequest( emailAddress: "george@dropboxsign.com" ); try { - var result = templateApi.TemplateAddUser(templateId, data); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateAddUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateAddUserRequest: templateAddUserRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateAddUser: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -129,77 +131,127 @@ Creates a template that can then be used. using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY + ); - var role1 = new SubTemplateRole( + var signerRoles1 = new SubTemplateRole( name: "Client", order: 0 ); - var role2 = new SubTemplateRole( + var signerRoles2 = new SubTemplateRole( name: "Witness", order: 1 ); - var mergeField1 = new SubMergeField( + var signerRoles = new List + { + signerRoles1, + signerRoles2, + }; + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText( + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly + ); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature( + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1 + ); + + var formFieldsPerDocument = new List + { + formFieldsPerDocument1, + formFieldsPerDocument2, + }; + + var mergeFields1 = new SubMergeField( name: "Full Name", type: SubMergeField.TypeEnum.Text ); - var mergeField2 = new SubMergeField( + var mergeFields2 = new SubMergeField( name: "Is Registered?", type: SubMergeField.TypeEnum.Checkbox ); - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY - ); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) + var mergeFields = new List + { + mergeFields1, + mergeFields2, }; - var data = new TemplateCreateRequest( + var templateCreateRequest = new TemplateCreateRequest( clientId: "37dee8d8440c66d54cfa05d92c160882", - files: files, - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: new List(){role1, role2}, - ccRoles: new List(){"Manager"}, - mergeFields: new List(){mergeField1, mergeField2}, - fieldOptions: subFieldOptions, - testMode: true + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields ); try { - var result = templateApi.TemplateCreate(data); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateCreate( + templateCreateRequest: templateCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -269,77 +321,90 @@ The first step in an embedded template workflow. Creates a draft template that c using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateCreateEmbeddedDraftExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var role1 = new SubTemplateRole( - name: "Client", - order: 0 - ); - - var role2 = new SubTemplateRole( - name: "Witness", - order: 1 + var fieldOptions = new SubFieldOptions( + dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY ); - var mergeField1 = new SubMergeField( + var mergeFields1 = new SubMergeField( name: "Full Name", type: SubMergeField.TypeEnum.Text ); - var mergeField2 = new SubMergeField( + var mergeFields2 = new SubMergeField( name: "Is Registered?", type: SubMergeField.TypeEnum.Checkbox ); - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DDMMYYYY + var mergeFields = new List + { + mergeFields1, + mergeFields2, + }; + + var signerRoles1 = new SubTemplateRole( + name: "Client", + order: 0 + ); + + var signerRoles2 = new SubTemplateRole( + name: "Witness", + order: 1 ); - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) + var signerRoles = new List + { + signerRoles1, + signerRoles2, }; - var data = new TemplateCreateEmbeddedDraftRequest( + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest( clientId: "37dee8d8440c66d54cfa05d92c160882", - files: files, - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: new List(){role1, role2}, - ccRoles: new List(){"Manager"}, - mergeFields: new List(){mergeField1, mergeField2}, - fieldOptions: subFieldOptions, - testMode: true + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", + ], + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles ); try { - var result = templateApi.TemplateCreateEmbeddedDraft(data); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest: templateCreateEmbeddedDraftRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateCreateEmbeddedDraft: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -408,32 +473,32 @@ Completely deletes the template specified from the account. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateDeleteExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - templateApi.TemplateDelete(templateId); + new TemplateApi(config).TemplateDelete( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateDelete: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -499,37 +564,36 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateFilesExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = templateApi.TemplateFiles(templateId, "pdf"); - - var fileStream = File.Create("file_response.pdf"); - result.Seek(0, SeekOrigin.Begin); - result.CopyTo(fileStream); + var response = new TemplateApi(config).TemplateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + var fileStream = File.Create("./file_response"); + response.Seek(0, SeekOrigin.Begin); + response.CopyTo(fileStream); fileStream.Close(); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateFiles: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -599,33 +663,34 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsDataUriExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = templateApi.TemplateFilesAsDataUri(templateId, "pdf", false, false); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateFilesAsDataUri( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsDataUri: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -694,33 +759,35 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateFilesAsFileUrlExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = templateApi.TemplateFilesAsFileUrl(templateId, "pdf", false, false); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateFilesAsFileUrl( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + forceDownload: 1 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsFileUrl: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -790,33 +857,34 @@ Returns the Template specified by the `template_id` parameter. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateGetExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = templateApi.TemplateGet(templateId); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateGet( + templateId: "f57db65d3f933b5316d398057a36176831451a35" + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -885,33 +953,35 @@ Returns a list of the Templates that are accessible by you. Take a look at our ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateListExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var accountId = "f57db65d3f933b5316d398057a36176831451a35"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { - var result = templateApi.TemplateList(accountId, 1, 20, null); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateList( + page: 1, + pageSize: 20 + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateList: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -983,37 +1053,39 @@ Removes the specified Account's access to the specified Template. ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateRemoveUserExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var data = new TemplateRemoveUserRequest( + var templateRemoveUserRequest = new TemplateRemoveUserRequest( emailAddress: "george@dropboxsign.com" ); - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - try { - var result = templateApi.TemplateRemoveUser(templateId, data); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateRemoveUser( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateRemoveUserRequest: templateRemoveUserRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateRemoveUser: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -1084,46 +1156,44 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class TemplateUpdateFilesExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; - - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var templateApi = new TemplateApi(config); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new TemplateUpdateFilesRequest( - files: files + // config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest( + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } ); - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - try { - var result = templateApi.TemplateUpdateFiles(templateId, data); - Console.WriteLine(result); + var response = new TemplateApi(config).TemplateUpdateFiles( + templateId: "f57db65d3f933b5316d398057a36176831451a35", + templateUpdateFilesRequest: templateUpdateFilesRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling TemplateApi#TemplateUpdateFiles: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/docs/UnclaimedDraftApi.md b/sdks/dotnet/docs/UnclaimedDraftApi.md index 7d5a0e145..3bd6eda05 100644 --- a/sdks/dotnet/docs/UnclaimedDraftApi.md +++ b/sdks/dotnet/docs/UnclaimedDraftApi.md @@ -22,83 +22,57 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var signer1 = new SubUnclaimedDraftSigner( - emailAddress: "jack@example.com", + var signers1 = new SubUnclaimedDraftSigner( name: "Jack", + emailAddress: "jack@example.com", order: 0 ); - var signer2 = new SubUnclaimedDraftSigner( - emailAddress: "jill@example.com", - name: "Jill", - order: 1 - ); - - var subSigningOptions = new SubSigningOptions( - draw: true, - type: true, - upload: true, - phone: false, - defaultType: SubSigningOptions.DefaultTypeEnum.Draw - ); - - var subFieldOptions = new SubFieldOptions( - dateFormat: SubFieldOptions.DateFormatEnum.DD_MM_YYYY - ); - - var metadata = new Dictionary() + var signers = new List { - ["custom_id"] = 1234, - ["custom_text"] = "NDA #9" - }; - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) + signers1, }; - var data = new UnclaimedDraftCreateRequest( - subject: "The NDA we talked about", + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest( type: UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: new List(){signer1, signer2}, - ccEmailAddresses: new List(){"lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"}, - files: files, - metadata: metadata, - signingOptions: subSigningOptions, - fieldOptions: subFieldOptions, - testMode: true + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + }, + signers: signers ); try { - var result = unclaimedDraftApi.UnclaimedDraftCreate(data); - Console.WriteLine(result); + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreate( + unclaimedDraftCreateRequest: unclaimedDraftCreateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -168,47 +142,46 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs using System; using System.Collections.Generic; using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var files = new List { - new FileStream( - "./example_signature_request.pdf", - FileMode.Open, - FileAccess.Read, - FileShare.Read - ) - }; - - var data = new UnclaimedDraftCreateEmbeddedRequest( - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: files, + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", - testMode: true + testMode: true, + files: new List + { + new FileStream( + path: "./example_signature_request.pdf", + mode: FileMode.Open + ), + } ); try { - var result = unclaimedDraftApi.UnclaimedDraftCreateEmbedded(data); - Console.WriteLine(result); + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest: unclaimedDraftCreateEmbeddedRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbedded: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -277,51 +250,66 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; + var ccs1 = new SubCC( + role: "Accounting", + emailAddress: "accounting@dropboxsign.com" + ); - var unclaimedDraftApi = new UnclaimedDraftApi(config); + var ccs = new List + { + ccs1, + }; - var signer = new SubUnclaimedDraftTemplateSigner( + var signers1 = new SubUnclaimedDraftTemplateSigner( role: "Client", name: "George", emailAddress: "george@example.com" ); - var cc1 = new SubCC( - role: "Accounting", - emailAddress: "accouting@email.com" - ); + var signers = new List + { + signers1, + }; - var data = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: new List(){"c26b8a16784a872da37ea946b9ddec7c1e11dff6"}, + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", - signers: new List(){signer}, - ccs: new List(){cc1}, - testMode: true + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers ); try { - var result = unclaimedDraftApi.UnclaimedDraftCreateEmbeddedWithTemplate(data); - Console.WriteLine(result); + var response = new UnclaimedDraftApi(config).UnclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest: unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftCreateEmbeddedWithTemplate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } @@ -390,38 +378,40 @@ Creates a new signature request from an embedded request that can be edited prio ```csharp using System; using System.Collections.Generic; +using System.IO; +using System.Text.Json; + using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; -public class Example +namespace Dropbox.SignSandbox; + +public class UnclaimedDraftEditAndResendExample { - public static void Main() + public static void Run() { var config = new Configuration(); - // Configure HTTP basic authorization: api_key config.Username = "YOUR_API_KEY"; + // config.AccessToken = "YOUR_ACCESS_TOKEN"; - // or, configure Bearer (JWT) authorization: oauth2 - // config.AccessToken = "YOUR_BEARER_TOKEN"; - - var unclaimedDraftApi = new UnclaimedDraftApi(config); - - var data = new UnclaimedDraftEditAndResendRequest( - clientId: "1a659d9ad95bccd307ecad78d72192f8", - testMode: true + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest( + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false ); - var signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - try { - var result = unclaimedDraftApi.UnclaimedDraftEditAndResend(signatureRequestId, data); - Console.WriteLine(result); + var response = new UnclaimedDraftApi(config).UnclaimedDraftEditAndResend( + signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimedDraftEditAndResendRequest: unclaimedDraftEditAndResendRequest + ); + + Console.WriteLine(response); } catch (ApiException e) { - Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message); + Console.WriteLine("Exception when calling UnclaimedDraftApi#UnclaimedDraftEditAndResend: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } diff --git a/sdks/dotnet/openapi-config.yaml b/sdks/dotnet/openapi-config.yaml index ce2c64827..986c99a1f 100644 --- a/sdks/dotnet/openapi-config.yaml +++ b/sdks/dotnet/openapi-config.yaml @@ -6,15 +6,20 @@ additionalProperties: packageCompany: Dropbox Sign API Team packageCopyright: Dropbox 2024 packageDescription: Client library for using the Dropbox Sign API - packageVersion: 1.8-dev + packageVersion: 2.0-dev packageTitle: Dropbox Sign .Net SDK sortModelPropertiesByRequiredFlag: true optionalEmitDefaultValues: true - targetFramework: net6.0 + targetFramework: net8.0 + library: restsharp packageGuid: "{F8C8232D-7020-4603-8E04-18D060AE530B}" legacyDiscriminatorBehavior: true useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.namespace: Dropbox.SignSandbox + oseg.packageGuid: "{7045D429-F203-4317-A29F-FB9FD34B7FF9}" + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-EventCallbackHelper.cs: templateType: SupportingFiles diff --git a/sdks/dotnet/run-build b/sdks/dotnet/run-build index 8a2332ad6..d65fff536 100755 --- a/sdks/dotnet/run-build +++ b/sdks/dotnet/run-build @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# see https://github.com/OpenAPITools/openapi-generator/tree/v7.8.0/modules/openapi-generator/src/main/resources/csharp +# see https://github.com/OpenAPITools/openapi-generator/tree/v7.12.0/modules/openapi-generator/src/main/resources/csharp set -e @@ -18,7 +18,7 @@ rm -f "${DIR}/src/Dropbox.Sign/Model/"*.cs docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -46,6 +46,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj b/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj index 50c2bf70c..3ea5d9d8c 100644 --- a/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj +++ b/sdks/dotnet/src/Dropbox.Sign.Test/Dropbox.Sign.Test.csproj @@ -3,7 +3,7 @@ Dropbox.Sign.Test Dropbox.Sign.Test - net6.0 + net8.0 false Dropbox.Sign.Test diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs index b9819df28..096d3bf66 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/FaxApi.cs @@ -31,7 +31,7 @@ public interface IFaxApiSync : IApiAccessor /// Delete Fax /// /// - /// Deletes the specified Fax from the system. + /// Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -43,7 +43,7 @@ public interface IFaxApiSync : IApiAccessor /// Delete Fax /// /// - /// Deletes the specified Fax from the system. + /// Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -51,10 +51,10 @@ public interface IFaxApiSync : IApiAccessor /// ApiResponse of Object(void) ApiResponse FaxDeleteWithHttpInfo(string faxId, int operationIndex = 0); /// - /// List Fax Files + /// Download Fax Files /// /// - /// Returns list of fax files + /// Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -63,10 +63,10 @@ public interface IFaxApiSync : IApiAccessor System.IO.Stream FaxFiles(string faxId, int operationIndex = 0); /// - /// List Fax Files + /// Download Fax Files /// /// - /// Returns list of fax files + /// Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -77,7 +77,7 @@ public interface IFaxApiSync : IApiAccessor /// Get Fax /// /// - /// Returns information about fax + /// Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -89,7 +89,7 @@ public interface IFaxApiSync : IApiAccessor /// Get Fax /// /// - /// Returns information about fax + /// Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -100,11 +100,11 @@ public interface IFaxApiSync : IApiAccessor /// Lists Faxes /// /// - /// Returns properties of multiple faxes + /// Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// FaxListResponse FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); @@ -113,11 +113,11 @@ public interface IFaxApiSync : IApiAccessor /// Lists Faxes /// /// - /// Returns properties of multiple faxes + /// Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// ApiResponse of FaxListResponse ApiResponse FaxListWithHttpInfo(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0); @@ -125,7 +125,7 @@ public interface IFaxApiSync : IApiAccessor /// Send Fax /// /// - /// Action to prepare and send a fax + /// Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -137,7 +137,7 @@ public interface IFaxApiSync : IApiAccessor /// Send Fax /// /// - /// Action to prepare and send a fax + /// Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -157,7 +157,7 @@ public interface IFaxApiAsync : IApiAccessor /// Delete Fax /// /// - /// Deletes the specified Fax from the system. + /// Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -170,7 +170,7 @@ public interface IFaxApiAsync : IApiAccessor /// Delete Fax /// /// - /// Deletes the specified Fax from the system. + /// Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -179,10 +179,10 @@ public interface IFaxApiAsync : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> FaxDeleteWithHttpInfoAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// List Fax Files + /// Download Fax Files /// /// - /// Returns list of fax files + /// Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -192,10 +192,10 @@ public interface IFaxApiAsync : IApiAccessor System.Threading.Tasks.Task FaxFilesAsync(string faxId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// List Fax Files + /// Download Fax Files /// /// - /// Returns list of fax files + /// Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -207,7 +207,7 @@ public interface IFaxApiAsync : IApiAccessor /// Get Fax /// /// - /// Returns information about fax + /// Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -220,7 +220,7 @@ public interface IFaxApiAsync : IApiAccessor /// Get Fax /// /// - /// Returns information about fax + /// Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -232,11 +232,11 @@ public interface IFaxApiAsync : IApiAccessor /// Lists Faxes /// /// - /// Returns properties of multiple faxes + /// Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxListResponse @@ -246,11 +246,11 @@ public interface IFaxApiAsync : IApiAccessor /// Lists Faxes /// /// - /// Returns properties of multiple faxes + /// Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxListResponse) @@ -259,7 +259,7 @@ public interface IFaxApiAsync : IApiAccessor /// Send Fax /// /// - /// Action to prepare and send a fax + /// Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -272,7 +272,7 @@ public interface IFaxApiAsync : IApiAccessor /// Send Fax /// /// - /// Action to prepare and send a fax + /// Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -401,7 +401,7 @@ public Dropbox.Sign.Client.ExceptionFactory ExceptionFactory } /// - /// Delete Fax Deletes the specified Fax from the system. + /// Delete Fax Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -413,7 +413,7 @@ public void FaxDelete(string faxId, int operationIndex = 0) } /// - /// Delete Fax Deletes the specified Fax from the system. + /// Delete Fax Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -476,7 +476,7 @@ public Dropbox.Sign.Client.ApiResponse FaxDeleteWithHttpInfo(string faxI } /// - /// Delete Fax Deletes the specified Fax from the system. + /// Delete Fax Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -489,7 +489,7 @@ public Dropbox.Sign.Client.ApiResponse FaxDeleteWithHttpInfo(string faxI } /// - /// Delete Fax Deletes the specified Fax from the system. + /// Delete Fax Deletes the specified Fax from the system /// /// Thrown when fails to make API call /// Fax ID @@ -555,7 +555,7 @@ public Dropbox.Sign.Client.ApiResponse FaxDeleteWithHttpInfo(string faxI } /// - /// List Fax Files Returns list of fax files + /// Download Fax Files Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -568,7 +568,7 @@ public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) } /// - /// List Fax Files Returns list of fax files + /// Download Fax Files Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -632,7 +632,7 @@ public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) } /// - /// List Fax Files Returns list of fax files + /// Download Fax Files Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -646,7 +646,7 @@ public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) } /// - /// List Fax Files Returns list of fax files + /// Download Fax Files Downloads files associated with a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -713,7 +713,7 @@ public System.IO.Stream FaxFiles(string faxId, int operationIndex = 0) } /// - /// Get Fax Returns information about fax + /// Get Fax Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -726,7 +726,7 @@ public FaxGetResponse FaxGet(string faxId, int operationIndex = 0) } /// - /// Get Fax Returns information about fax + /// Get Fax Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -789,7 +789,7 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Get Fax Returns information about fax + /// Get Fax Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -803,7 +803,7 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Get Fax Returns information about fax + /// Get Fax Returns information about a Fax /// /// Thrown when fails to make API call /// Fax ID @@ -869,11 +869,11 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Lists Faxes Returns properties of multiple faxes + /// Lists Faxes Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// FaxListResponse public FaxListResponse FaxList(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0) @@ -883,11 +883,11 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Lists Faxes Returns properties of multiple faxes + /// Lists Faxes Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// ApiResponse of FaxListResponse public Dropbox.Sign.Client.ApiResponse FaxListWithHttpInfo(int? page = default(int?), int? pageSize = default(int?), int operationIndex = 0) @@ -948,11 +948,11 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Lists Faxes Returns properties of multiple faxes + /// Lists Faxes Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxListResponse @@ -963,11 +963,11 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Lists Faxes Returns properties of multiple faxes + /// Lists Faxes Returns properties of multiple Faxes /// /// Thrown when fails to make API call - /// Page (optional, default to 1) - /// Page size (optional, default to 20) + /// Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxListResponse) @@ -1031,7 +1031,7 @@ public Dropbox.Sign.Client.ApiResponse FaxGetWithHttpInfo(string } /// - /// Send Fax Action to prepare and send a fax + /// Send Fax Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -1044,7 +1044,7 @@ public FaxGetResponse FaxSend(FaxSendRequest faxSendRequest, int operationIndex } /// - /// Send Fax Action to prepare and send a fax + /// Send Fax Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -1115,7 +1115,7 @@ public Dropbox.Sign.Client.ApiResponse FaxSendWithHttpInfo(FaxSe } /// - /// Send Fax Action to prepare and send a fax + /// Send Fax Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// @@ -1129,7 +1129,7 @@ public Dropbox.Sign.Client.ApiResponse FaxSendWithHttpInfo(FaxSe } /// - /// Send Fax Action to prepare and send a fax + /// Send Fax Creates and sends a new Fax with the submitted file(s) /// /// Thrown when fails to make API call /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs index edb0eb516..127f2e4d7 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/FaxLineApi.cs @@ -54,13 +54,13 @@ public interface IFaxLineApiSync : IApiAccessor /// Get Available Fax Line Area Codes /// /// - /// Returns a response with the area codes available for a given state/provice and city. + /// Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// FaxLineAreaCodeGetResponse FaxLineAreaCodeGetResponse FaxLineAreaCodeGet(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0); @@ -69,13 +69,13 @@ public interface IFaxLineApiSync : IApiAccessor /// Get Available Fax Line Area Codes /// /// - /// Returns a response with the area codes available for a given state/provice and city. + /// Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// ApiResponse of FaxLineAreaCodeGetResponse ApiResponse FaxLineAreaCodeGetWithHttpInfo(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0); @@ -83,7 +83,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Purchase Fax Line /// /// - /// Purchases a new Fax Line. + /// Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -95,7 +95,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Purchase Fax Line /// /// - /// Purchases a new Fax Line. + /// Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -132,7 +132,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// FaxLineResponse FaxLineResponse FaxLineGet(string number, int operationIndex = 0); @@ -144,7 +144,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// ApiResponse of FaxLineResponse ApiResponse FaxLineGetWithHttpInfo(string number, int operationIndex = 0); @@ -156,9 +156,9 @@ public interface IFaxLineApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// FaxLineListResponse FaxLineListResponse FaxLineList(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0); @@ -171,9 +171,9 @@ public interface IFaxLineApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// ApiResponse of FaxLineListResponse ApiResponse FaxLineListWithHttpInfo(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0); @@ -181,7 +181,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Remove Fax Line Access /// /// - /// Removes a user's access to the specified Fax Line. + /// Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -193,7 +193,7 @@ public interface IFaxLineApiSync : IApiAccessor /// Remove Fax Line Access /// /// - /// Removes a user's access to the specified Fax Line. + /// Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -238,13 +238,13 @@ public interface IFaxLineApiAsync : IApiAccessor /// Get Available Fax Line Area Codes /// /// - /// Returns a response with the area codes available for a given state/provice and city. + /// Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineAreaCodeGetResponse @@ -254,13 +254,13 @@ public interface IFaxLineApiAsync : IApiAccessor /// Get Available Fax Line Area Codes /// /// - /// Returns a response with the area codes available for a given state/provice and city. + /// Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineAreaCodeGetResponse) @@ -269,7 +269,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Purchase Fax Line /// /// - /// Purchases a new Fax Line. + /// Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -282,7 +282,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Purchase Fax Line /// /// - /// Purchases a new Fax Line. + /// Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -322,7 +322,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse @@ -335,7 +335,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) @@ -348,9 +348,9 @@ public interface IFaxLineApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineListResponse @@ -364,9 +364,9 @@ public interface IFaxLineApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineListResponse) @@ -375,7 +375,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Remove Fax Line Access /// /// - /// Removes a user's access to the specified Fax Line. + /// Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -388,7 +388,7 @@ public interface IFaxLineApiAsync : IApiAccessor /// Remove Fax Line Access /// /// - /// Removes a user's access to the specified Fax Line. + /// Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -689,13 +689,13 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn } /// - /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// Get Available Fax Line Area Codes Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// FaxLineAreaCodeGetResponse public FaxLineAreaCodeGetResponse FaxLineAreaCodeGet(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0) @@ -705,13 +705,13 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn } /// - /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// Get Available Fax Line Area Codes Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// ApiResponse of FaxLineAreaCodeGetResponse public Dropbox.Sign.Client.ApiResponse FaxLineAreaCodeGetWithHttpInfo(string country, string? state = default(string?), string? province = default(string?), string? city = default(string?), int operationIndex = 0) @@ -783,13 +783,13 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn } /// - /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// Get Available Fax Line Area Codes Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineAreaCodeGetResponse @@ -800,13 +800,13 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn } /// - /// Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city. + /// Get Available Fax Line Area Codes Returns a list of available area codes for a given state/province and city /// /// Thrown when fails to make API call - /// Filter area codes by country. - /// Filter area codes by state. (optional) - /// Filter area codes by province. (optional) - /// Filter area codes by city. (optional) + /// Filter area codes by country + /// Filter area codes by state (optional) + /// Filter area codes by province (optional) + /// Filter area codes by city (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineAreaCodeGetResponse) @@ -881,7 +881,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineAddUserWithHttpIn } /// - /// Purchase Fax Line Purchases a new Fax Line. + /// Purchase Fax Line Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -894,7 +894,7 @@ public FaxLineResponse FaxLineCreate(FaxLineCreateRequest faxLineCreateRequest, } /// - /// Purchase Fax Line Purchases a new Fax Line. + /// Purchase Fax Line Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -965,7 +965,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf } /// - /// Purchase Fax Line Purchases a new Fax Line. + /// Purchase Fax Line Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -979,7 +979,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineCreateWithHttpInf } /// - /// Purchase Fax Line Purchases a new Fax Line. + /// Purchase Fax Line Purchases a new Fax Line /// /// Thrown when fails to make API call /// @@ -1226,7 +1226,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineDeleteWithHttpInfo(FaxLine /// Get Fax Line Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// FaxLineResponse public FaxLineResponse FaxLineGet(string number, int operationIndex = 0) @@ -1239,7 +1239,7 @@ public FaxLineResponse FaxLineGet(string number, int operationIndex = 0) /// Get Fax Line Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// ApiResponse of FaxLineResponse public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(string number, int operationIndex = 0) @@ -1302,7 +1302,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Get Fax Line Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineResponse @@ -1316,7 +1316,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// Get Fax Line Returns the properties and settings of a Fax Line. /// /// Thrown when fails to make API call - /// The Fax Line number. + /// The Fax Line number /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineResponse) @@ -1383,9 +1383,9 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// FaxLineListResponse public FaxLineListResponse FaxLineList(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0) @@ -1399,9 +1399,9 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// ApiResponse of FaxLineListResponse public Dropbox.Sign.Client.ApiResponse FaxLineListWithHttpInfo(string? accountId = default(string?), int? page = default(int?), int? pageSize = default(int?), bool? showTeamLines = default(bool?), int operationIndex = 0) @@ -1474,9 +1474,9 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of FaxLineListResponse @@ -1491,9 +1491,9 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s /// /// Thrown when fails to make API call /// Account ID (optional) - /// Page (optional, default to 1) - /// Page size (optional, default to 20) - /// Show team lines (optional) + /// Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + /// Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + /// Include Fax Lines belonging to team members in the list (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (FaxLineListResponse) @@ -1565,7 +1565,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineGetWithHttpInfo(s } /// - /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// Remove Fax Line Access Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -1578,7 +1578,7 @@ public FaxLineResponse FaxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveU } /// - /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// Remove Fax Line Access Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -1649,7 +1649,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt } /// - /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// Remove Fax Line Access Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// @@ -1663,7 +1663,7 @@ public Dropbox.Sign.Client.ApiResponse FaxLineRemoveUserWithHtt } /// - /// Remove Fax Line Access Removes a user's access to the specified Fax Line. + /// Remove Fax Line Access Removes a user's access to the specified Fax Line /// /// Thrown when fails to make API call /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs index 7671b5780..71c7ec8b1 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/SignatureRequestApi.cs @@ -143,6 +143,106 @@ public interface ISignatureRequestApiSync : IApiAccessor /// ApiResponse of SignatureRequestGetResponse ApiResponse SignatureRequestCreateEmbeddedWithTemplateWithHttpInfo(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0); /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEdit(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0); + + /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditWithHttpInfo(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0); + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditEmbedded(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0); + + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditEmbeddedWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0); + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0); + + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0); + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + SignatureRequestGetResponse SignatureRequestEditWithTemplate(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0); + + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + ApiResponse SignatureRequestEditWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0); + /// /// Download Files /// /// @@ -544,6 +644,114 @@ public interface ISignatureRequestApiAsync : IApiAccessor /// Task of ApiResponse (SignatureRequestGetResponse) System.Threading.Tasks.Task> SignatureRequestCreateEmbeddedWithTemplateWithHttpInfoAsync(SignatureRequestCreateEmbeddedWithTemplateRequest signatureRequestCreateEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Edit Signature Request + /// + /// + /// Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditEmbeddedAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Edit Embedded Signature Request + /// + /// + /// Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditEmbeddedWithTemplateAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Edit Embedded Signature Request with Template + /// + /// + /// Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + System.Threading.Tasks.Task SignatureRequestEditWithTemplateAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Edit Signature Request With Template + /// + /// + /// Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + System.Threading.Tasks.Task> SignatureRequestEditWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// /// Download Files /// /// @@ -1842,6 +2050,814 @@ public Dropbox.Sign.Client.ApiResponse SignatureReq return localVarResponse; } + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEdit(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditWithHttpInfo(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + // verify the required parameter 'signatureRequestEditRequest' is set + if (signatureRequestEditRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditRequest' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEdit"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEdit", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditWithHttpInfoAsync(signatureRequestId, signatureRequestEditRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + // verify the required parameter 'signatureRequestEditRequest' is set + if (signatureRequestEditRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditRequest' when calling SignatureRequestApi->SignatureRequestEdit"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEdit"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEdit", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditEmbedded(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditEmbeddedWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedRequest); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditEmbeddedWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedRequest' is set + if (signatureRequestEditEmbeddedRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedRequest' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbedded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_embedded/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbedded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditEmbeddedAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditEmbeddedWithHttpInfoAsync(signatureRequestId, signatureRequestEditEmbeddedRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedRequest' is set + if (signatureRequestEditEmbeddedRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedRequest' when calling SignatureRequestApi->SignatureRequestEditEmbedded"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbedded"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_embedded/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbedded", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditEmbeddedWithTemplate(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditEmbeddedWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is set + if (signatureRequestEditEmbeddedWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_embedded_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbeddedWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditEmbeddedWithTemplateAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditEmbeddedWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is set + if (signatureRequestEditEmbeddedWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditEmbeddedWithTemplate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditEmbeddedWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditEmbeddedWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditEmbeddedWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_embedded_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditEmbeddedWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// SignatureRequestGetResponse + public SignatureRequestGetResponse SignatureRequestEditWithTemplate(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = SignatureRequestEditWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditWithTemplateRequest); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// ApiResponse of SignatureRequestGetResponse + public Dropbox.Sign.Client.ApiResponse SignatureRequestEditWithTemplateWithHttpInfo(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditWithTemplateRequest' is set + if (signatureRequestEditWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/signature_request/edit_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of SignatureRequestGetResponse + public async System.Threading.Tasks.Task SignatureRequestEditWithTemplateAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + Dropbox.Sign.Client.ApiResponse localVarResponse = await SignatureRequestEditWithTemplateWithHttpInfoAsync(signatureRequestId, signatureRequestEditWithTemplateRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit Signature Request With Template Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + /// + /// Thrown when fails to make API call + /// The id of the SignatureRequest to edit. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SignatureRequestGetResponse) + public async System.Threading.Tasks.Task> SignatureRequestEditWithTemplateWithHttpInfoAsync(string signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'signatureRequestId' is set + if (signatureRequestId == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestId' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + // verify the required parameter 'signatureRequestEditWithTemplateRequest' is set + if (signatureRequestEditWithTemplateRequest == null) + { + throw new Dropbox.Sign.Client.ApiException(400, "Missing required parameter 'signatureRequestEditWithTemplateRequest' when calling SignatureRequestApi->SignatureRequestEditWithTemplate"); + } + + + Dropbox.Sign.Client.RequestOptions localVarRequestOptions = new Dropbox.Sign.Client.RequestOptions(); + + var localVarContentType = ""; + var openApiTypes = signatureRequestEditWithTemplateRequest.GetOpenApiTypes(); + if (ClientUtils.HasFileType(openApiTypes)) + { + ClientUtils.SetFormData(localVarRequestOptions, openApiTypes); + localVarContentType = "multipart/form-data"; + } + else + { + localVarContentType = "application/json"; + localVarRequestOptions.Data = signatureRequestEditWithTemplateRequest; + } + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Dropbox.Sign.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("signature_request_id", Dropbox.Sign.Client.ClientUtils.ParameterToString(signatureRequestId)); // path parameter + + localVarRequestOptions.Operation = "SignatureRequestApi.SignatureRequestEditWithTemplate"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (api_key) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Dropbox.Sign.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/signature_request/edit_with_template/{signature_request_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SignatureRequestEditWithTemplate", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Download Files Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. /// diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs b/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs index d43d6f7ec..72c26631b 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/ApiClient.cs @@ -110,7 +110,7 @@ internal object Deserialize(RestResponse response, Type type) if (response.Headers != null) { var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) - ? Path.GetTempPath() + ? global::System.IO.Path.GetTempPath() : _configuration.TempFolderPath; var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); foreach (var header in response.Headers) @@ -334,7 +334,7 @@ private RestRequest NewRequest( { foreach (var value in headerParam.Value) { - request.AddHeader(headerParam.Key, value); + request.AddOrUpdateHeader(headerParam.Key, value); } } } @@ -394,13 +394,21 @@ private RestRequest NewRequest( var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } } } + if (options.HeaderParameters != null) + { + if (options.HeaderParameters.TryGetValue("Content-Type", out var contentTypes) && contentTypes.Any(header => header.Contains("multipart/form-data"))) + { + request.AlwaysMultipartFormData = true; + } + } + return request; } @@ -472,7 +480,7 @@ private async Task> ExecClientAsync(Func> ExecClientAsync(Func DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) + private async Task> DeserializeRestResponseFromPolicyAsync(RestClient client, RestRequest request, PolicyResult policyResult, CancellationToken cancellationToken = default) { if (policyResult.Outcome == OutcomeType.Successful) { - return client.Deserialize(policyResult.Result); + return await client.Deserialize(policyResult.Result, cancellationToken); } else { @@ -594,7 +602,7 @@ private ApiResponse Exec(RestRequest request, RequestOptions options, IRea { var policy = RetryConfiguration.RetryPolicy; var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - return Task.FromResult(DeserializeRestResponseFromPolicy(client, request, policyResult)); + return DeserializeRestResponseFromPolicyAsync(client, request, policyResult); } else { @@ -618,7 +626,7 @@ private ApiResponse Exec(RestRequest request, RequestOptions options, IRea { var policy = RetryConfiguration.AsyncRetryPolicy; var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - return DeserializeRestResponseFromPolicy(client, request, policyResult); + return await DeserializeRestResponseFromPolicyAsync(client, request, policyResult, cancellationToken); } else { diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs b/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs index 8fb7773d6..ec20198ca 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/ClientUtils.cs @@ -105,6 +105,12 @@ public static string ParameterToString(object obj, IReadableConfiguration config // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is DateOnly dateOnly) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15 + return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; if (obj is ICollection collection) diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs index 127056ed0..8316e9803 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/Configuration.cs @@ -36,7 +36,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.8-dev"; + public const string Version = "2.0-dev"; /// /// Identifier for ISO 8601 DateTime Format @@ -120,7 +120,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.8-dev/csharp"); + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/2.0-dev/csharp"); BasePath = "https://api.hellosign.com/v3"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -163,7 +163,7 @@ public Configuration() }; // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; + Timeout = TimeSpan.FromSeconds(100); } /// @@ -247,9 +247,9 @@ public virtual IDictionary DefaultHeader public virtual IDictionary DefaultHeaders { get; set; } /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// Gets or sets the HTTP timeout of ApiClient. Defaults to 100 seconds. /// - public virtual int Timeout { get; set; } + public virtual TimeSpan Timeout { get; set; } /// /// Gets or sets the proxy @@ -567,7 +567,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 3.0.0\n"; - report += " SDK Package Version: 1.8-dev\n"; + report += " SDK Package Version: 2.0-dev\n"; return report; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs b/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs index a4e493e1c..14469bb07 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Client/IReadableConfiguration.cs @@ -72,10 +72,10 @@ public interface IReadableConfiguration string TempFolderPath { get; } /// - /// Gets the HTTP connection timeout (in milliseconds) + /// Gets the HTTP connection timeout. /// /// HTTP connection timeout. - int Timeout { get; } + TimeSpan Timeout { get; } /// /// Gets the proxy. diff --git a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj index db65ddba1..fd6e98aaa 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj +++ b/sdks/dotnet/src/Dropbox.Sign/Dropbox.Sign.csproj @@ -2,7 +2,7 @@ false - net6.0 + net8.0 Dropbox.Sign Dropbox.Sign Library @@ -12,7 +12,7 @@ Client library for using the Dropbox Sign API Dropbox 2024 Dropbox.Sign - 1.8-dev + 2.0-dev bin\$(Configuration)\$(TargetFramework)\Dropbox.Sign.xml https://github.com/hellosign/dropbox-sign-dotnet.git git diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs index 55509a4bc..fbbc7084e 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineAddUserRequest.cs @@ -41,7 +41,7 @@ protected FaxLineAddUserRequest() { } /// /// Initializes a new instance of the class. /// - /// The Fax Line number. (required). + /// The Fax Line number (required). /// Account ID. /// Email address. public FaxLineAddUserRequest(string number = default(string), string accountId = default(string), string emailAddress = default(string)) @@ -74,9 +74,9 @@ public static FaxLineAddUserRequest Init(string jsonData) } /// - /// The Fax Line number. + /// The Fax Line number /// - /// The Fax Line number. + /// The Fax Line number [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs index 733cab7f8..ad5c88445 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineCreateRequest.cs @@ -34,9 +34,9 @@ namespace Dropbox.Sign.Model public partial class FaxLineCreateRequest : IEquatable, IValidatableObject { /// - /// Country + /// Country of the area code /// - /// Country + /// Country of the area code [JsonConverter(typeof(StringEnumConverter))] public enum CountryEnum { @@ -61,9 +61,9 @@ public enum CountryEnum /// - /// Country + /// Country of the area code /// - /// Country + /// Country of the area code [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)] public CountryEnum Country { get; set; } /// @@ -74,10 +74,10 @@ protected FaxLineCreateRequest() { } /// /// Initializes a new instance of the class. /// - /// Area code (required). - /// Country (required). - /// City. - /// Account ID. + /// Area code of the new Fax Line (required). + /// Country of the area code (required). + /// City of the area code. + /// Account ID of the account that will be assigned this new Fax Line. public FaxLineCreateRequest(int areaCode = default(int), CountryEnum country = default(CountryEnum), string city = default(string), string accountId = default(string)) { @@ -104,23 +104,23 @@ public static FaxLineCreateRequest Init(string jsonData) } /// - /// Area code + /// Area code of the new Fax Line /// - /// Area code + /// Area code of the new Fax Line [DataMember(Name = "area_code", IsRequired = true, EmitDefaultValue = true)] public int AreaCode { get; set; } /// - /// City + /// City of the area code /// - /// City + /// City of the area code [DataMember(Name = "city", EmitDefaultValue = true)] public string City { get; set; } /// - /// Account ID + /// Account ID of the account that will be assigned this new Fax Line /// - /// Account ID + /// Account ID of the account that will be assigned this new Fax Line /// ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs index cb5a27378..5bc3e961d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineDeleteRequest.cs @@ -41,7 +41,7 @@ protected FaxLineDeleteRequest() { } /// /// Initializes a new instance of the class. /// - /// The Fax Line number. (required). + /// The Fax Line number (required). public FaxLineDeleteRequest(string number = default(string)) { @@ -70,9 +70,9 @@ public static FaxLineDeleteRequest Init(string jsonData) } /// - /// The Fax Line number. + /// The Fax Line number /// - /// The Fax Line number. + /// The Fax Line number [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs index eed6d36a9..1347d8250 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxLineRemoveUserRequest.cs @@ -41,9 +41,9 @@ protected FaxLineRemoveUserRequest() { } /// /// Initializes a new instance of the class. /// - /// The Fax Line number. (required). - /// Account ID. - /// Email address. + /// The Fax Line number (required). + /// Account ID of the user to remove access. + /// Email address of the user to remove access. public FaxLineRemoveUserRequest(string number = default(string), string accountId = default(string), string emailAddress = default(string)) { @@ -74,24 +74,24 @@ public static FaxLineRemoveUserRequest Init(string jsonData) } /// - /// The Fax Line number. + /// The Fax Line number /// - /// The Fax Line number. + /// The Fax Line number [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = true)] public string Number { get; set; } /// - /// Account ID + /// Account ID of the user to remove access /// - /// Account ID + /// Account ID of the user to remove access /// ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 [DataMember(Name = "account_id", EmitDefaultValue = true)] public string AccountId { get; set; } /// - /// Email address + /// Email address of the user to remove access /// - /// Email address + /// Email address of the user to remove access [DataMember(Name = "email_address", EmitDefaultValue = true)] public string EmailAddress { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs index e4d42e6d4..d5eddb1b5 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/FaxSendRequest.cs @@ -41,13 +41,13 @@ protected FaxSendRequest() { } /// /// Initializes a new instance of the class. /// - /// Fax Send To Recipient (required). + /// Recipient of the fax Can be a phone number in E.164 format or email address (required). /// Fax Send From Sender (used only with fax number). - /// Fax File to Send. - /// Fax File URL to Send. + /// Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both.. /// API Test Mode Setting (default to false). - /// Fax Cover Page for Recipient. - /// Fax Cover Page for Sender. + /// Fax cover page recipient information. + /// Fax cover page sender information. /// Fax Cover Page Message. /// Fax Title. public FaxSendRequest(string recipient = default(string), string sender = default(string), List files = default(List), List fileUrls = default(List), bool testMode = false, string coverPageTo = default(string), string coverPageFrom = default(string), string coverPageMessage = default(string), string title = default(string)) @@ -86,9 +86,9 @@ public static FaxSendRequest Init(string jsonData) } /// - /// Fax Send To Recipient + /// Recipient of the fax Can be a phone number in E.164 format or email address /// - /// Fax Send To Recipient + /// Recipient of the fax Can be a phone number in E.164 format or email address /// recipient@example.com [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] public string Recipient { get; set; } @@ -102,16 +102,16 @@ public static FaxSendRequest Init(string jsonData) public string Sender { get; set; } /// - /// Fax File to Send + /// Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. /// - /// Fax File to Send + /// Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "files", EmitDefaultValue = true)] public List Files { get; set; } /// - /// Fax File URL to Send + /// Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. /// - /// Fax File URL to Send + /// Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. [DataMember(Name = "file_urls", EmitDefaultValue = true)] public List FileUrls { get; set; } @@ -123,17 +123,17 @@ public static FaxSendRequest Init(string jsonData) public bool TestMode { get; set; } /// - /// Fax Cover Page for Recipient + /// Fax cover page recipient information /// - /// Fax Cover Page for Recipient + /// Fax cover page recipient information /// Recipient Name [DataMember(Name = "cover_page_to", EmitDefaultValue = true)] public string CoverPageTo { get; set; } /// - /// Fax Cover Page for Sender + /// Fax cover page sender information /// - /// Fax Cover Page for Sender + /// Fax cover page sender information /// Sender Name [DataMember(Name = "cover_page_from", EmitDefaultValue = true)] public string CoverPageFrom { get; set; } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs new file mode 100644 index 000000000..68a03290b --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedRequest.cs @@ -0,0 +1,772 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// SignatureRequestEditEmbeddedRequest + /// + [DataContract(Name = "SignatureRequestEditEmbeddedRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SignatureRequestEditEmbeddedRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SignatureRequestEditEmbeddedRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. (default to false). + /// A list describing the attachments. + /// The email addresses that should be CCed.. + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. (required). + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.. + /// fieldOptions. + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.. + /// Conditional Logic rules for fields defined in `form_fields_per_document`.. + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`. + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. (default to false). + /// The custom message in the email that will be sent to the signers.. + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. + /// signingOptions. + /// The subject in the email that will be sent to the signers.. + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). + /// The title you want to assign to the SignatureRequest.. + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. (default to false). + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. (default to false). + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.. + public SignatureRequestEditEmbeddedRequest(List files = default(List), List fileUrls = default(List), List signers = default(List), List groupedSigners = default(List), bool allowDecline = false, bool allowReassign = false, List attachments = default(List), List ccEmailAddresses = default(List), string clientId = default(string), List customFields = default(List), SubFieldOptions fieldOptions = default(SubFieldOptions), List formFieldGroups = default(List), List formFieldRules = default(List), List formFieldsPerDocument = default(List), bool hideTextTags = false, string message = default(string), Dictionary metadata = default(Dictionary), SubSigningOptions signingOptions = default(SubSigningOptions), string subject = default(string), bool testMode = false, string title = default(string), bool useTextTags = false, bool populateAutoFillFields = false, int? expiresAt = default(int?)) + { + + // to ensure "clientId" is required (not null) + if (clientId == null) + { + throw new ArgumentNullException("clientId is a required property for SignatureRequestEditEmbeddedRequest and cannot be null"); + } + this.ClientId = clientId; + this.Files = files; + this.FileUrls = fileUrls; + this.Signers = signers; + this.GroupedSigners = groupedSigners; + this.AllowDecline = allowDecline; + this.AllowReassign = allowReassign; + this.Attachments = attachments; + this.CcEmailAddresses = ccEmailAddresses; + this.CustomFields = customFields; + this.FieldOptions = fieldOptions; + this.FormFieldGroups = formFieldGroups; + this.FormFieldRules = formFieldRules; + this.FormFieldsPerDocument = formFieldsPerDocument; + this.HideTextTags = hideTextTags; + this.Message = message; + this.Metadata = metadata; + this.SigningOptions = signingOptions; + this.Subject = subject; + this.TestMode = testMode; + this.Title = title; + this.UseTextTags = useTextTags; + this.PopulateAutoFillFields = populateAutoFillFields; + this.ExpiresAt = expiresAt; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SignatureRequestEditEmbeddedRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditEmbeddedRequest"); + } + + return obj; + } + + /// + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. + /// + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. + [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + /// + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + [DataMember(Name = "signers", EmitDefaultValue = true)] + public List Signers { get; set; } + + /// + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + /// + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] + public List GroupedSigners { get; set; } + + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + [DataMember(Name = "allow_decline", EmitDefaultValue = true)] + public bool AllowDecline { get; set; } + + /// + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + /// + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] + public bool AllowReassign { get; set; } + + /// + /// A list describing the attachments + /// + /// A list describing the attachments + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// The email addresses that should be CCed. + /// + /// The email addresses that should be CCed. + [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] + public List CcEmailAddresses { get; set; } + + /// + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + /// + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + [DataMember(Name = "custom_fields", EmitDefaultValue = true)] + public List CustomFields { get; set; } + + /// + /// Gets or Sets FieldOptions + /// + [DataMember(Name = "field_options", EmitDefaultValue = true)] + public SubFieldOptions FieldOptions { get; set; } + + /// + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + /// + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] + public List FormFieldGroups { get; set; } + + /// + /// Conditional Logic rules for fields defined in `form_fields_per_document`. + /// + /// Conditional Logic rules for fields defined in `form_fields_per_document`. + [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] + public List FormFieldRules { get; set; } + + /// + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + /// + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] + public List FormFieldsPerDocument { get; set; } + + /// + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + /// + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] + public bool HideTextTags { get; set; } + + /// + /// The custom message in the email that will be sent to the signers. + /// + /// The custom message in the email that will be sent to the signers. + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Gets or Sets SigningOptions + /// + [DataMember(Name = "signing_options", EmitDefaultValue = true)] + public SubSigningOptions SigningOptions { get; set; } + + /// + /// The subject in the email that will be sent to the signers. + /// + /// The subject in the email that will be sent to the signers. + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// The title you want to assign to the SignatureRequest. + /// + /// The title you want to assign to the SignatureRequest. + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + /// + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] + public bool UseTextTags { get; set; } + + /// + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + /// + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] + public bool PopulateAutoFillFields { get; set; } + + /// + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + /// + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + [DataMember(Name = "expires_at", EmitDefaultValue = true)] + public int? ExpiresAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SignatureRequestEditEmbeddedRequest {\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" Signers: ").Append(Signers).Append("\n"); + sb.Append(" GroupedSigners: ").Append(GroupedSigners).Append("\n"); + sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); + sb.Append(" AllowReassign: ").Append(AllowReassign).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); + sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); + sb.Append(" FieldOptions: ").Append(FieldOptions).Append("\n"); + sb.Append(" FormFieldGroups: ").Append(FormFieldGroups).Append("\n"); + sb.Append(" FormFieldRules: ").Append(FormFieldRules).Append("\n"); + sb.Append(" FormFieldsPerDocument: ").Append(FormFieldsPerDocument).Append("\n"); + sb.Append(" HideTextTags: ").Append(HideTextTags).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" UseTextTags: ").Append(UseTextTags).Append("\n"); + sb.Append(" PopulateAutoFillFields: ").Append(PopulateAutoFillFields).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SignatureRequestEditEmbeddedRequest); + } + + /// + /// Returns true if SignatureRequestEditEmbeddedRequest instances are equal + /// + /// Instance of SignatureRequestEditEmbeddedRequest to be compared + /// Boolean + public bool Equals(SignatureRequestEditEmbeddedRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.Files == input.Files || + this.Files != null && + input.Files != null && + this.Files.SequenceEqual(input.Files) + ) && + ( + this.FileUrls == input.FileUrls || + this.FileUrls != null && + input.FileUrls != null && + this.FileUrls.SequenceEqual(input.FileUrls) + ) && + ( + this.Signers == input.Signers || + this.Signers != null && + input.Signers != null && + this.Signers.SequenceEqual(input.Signers) + ) && + ( + this.GroupedSigners == input.GroupedSigners || + this.GroupedSigners != null && + input.GroupedSigners != null && + this.GroupedSigners.SequenceEqual(input.GroupedSigners) + ) && + ( + this.AllowDecline == input.AllowDecline || + this.AllowDecline.Equals(input.AllowDecline) + ) && + ( + this.AllowReassign == input.AllowReassign || + this.AllowReassign.Equals(input.AllowReassign) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.CcEmailAddresses == input.CcEmailAddresses || + this.CcEmailAddresses != null && + input.CcEmailAddresses != null && + this.CcEmailAddresses.SequenceEqual(input.CcEmailAddresses) + ) && + ( + this.CustomFields == input.CustomFields || + this.CustomFields != null && + input.CustomFields != null && + this.CustomFields.SequenceEqual(input.CustomFields) + ) && + ( + this.FieldOptions == input.FieldOptions || + (this.FieldOptions != null && + this.FieldOptions.Equals(input.FieldOptions)) + ) && + ( + this.FormFieldGroups == input.FormFieldGroups || + this.FormFieldGroups != null && + input.FormFieldGroups != null && + this.FormFieldGroups.SequenceEqual(input.FormFieldGroups) + ) && + ( + this.FormFieldRules == input.FormFieldRules || + this.FormFieldRules != null && + input.FormFieldRules != null && + this.FormFieldRules.SequenceEqual(input.FormFieldRules) + ) && + ( + this.FormFieldsPerDocument == input.FormFieldsPerDocument || + this.FormFieldsPerDocument != null && + input.FormFieldsPerDocument != null && + this.FormFieldsPerDocument.SequenceEqual(input.FormFieldsPerDocument) + ) && + ( + this.HideTextTags == input.HideTextTags || + this.HideTextTags.Equals(input.HideTextTags) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.SigningOptions == input.SigningOptions || + (this.SigningOptions != null && + this.SigningOptions.Equals(input.SigningOptions)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.UseTextTags == input.UseTextTags || + this.UseTextTags.Equals(input.UseTextTags) + ) && + ( + this.PopulateAutoFillFields == input.PopulateAutoFillFields || + this.PopulateAutoFillFields.Equals(input.PopulateAutoFillFields) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.Files != null) + { + hashCode = (hashCode * 59) + this.Files.GetHashCode(); + } + if (this.FileUrls != null) + { + hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); + } + if (this.Signers != null) + { + hashCode = (hashCode * 59) + this.Signers.GetHashCode(); + } + if (this.GroupedSigners != null) + { + hashCode = (hashCode * 59) + this.GroupedSigners.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); + hashCode = (hashCode * 59) + this.AllowReassign.GetHashCode(); + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.CcEmailAddresses != null) + { + hashCode = (hashCode * 59) + this.CcEmailAddresses.GetHashCode(); + } + if (this.CustomFields != null) + { + hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); + } + if (this.FieldOptions != null) + { + hashCode = (hashCode * 59) + this.FieldOptions.GetHashCode(); + } + if (this.FormFieldGroups != null) + { + hashCode = (hashCode * 59) + this.FormFieldGroups.GetHashCode(); + } + if (this.FormFieldRules != null) + { + hashCode = (hashCode * 59) + this.FormFieldRules.GetHashCode(); + } + if (this.FormFieldsPerDocument != null) + { + hashCode = (hashCode * 59) + this.FormFieldsPerDocument.GetHashCode(); + } + hashCode = (hashCode * 59) + this.HideTextTags.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + if (this.SigningOptions != null) + { + hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + hashCode = (hashCode * 59) + this.UseTextTags.GetHashCode(); + hashCode = (hashCode * 59) + this.PopulateAutoFillFields.GetHashCode(); + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); + } + + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "files", + Property = "Files", + Type = "List", + Value = Files, + }); + types.Add(new OpenApiType() + { + Name = "file_urls", + Property = "FileUrls", + Type = "List", + Value = FileUrls, + }); + types.Add(new OpenApiType() + { + Name = "signers", + Property = "Signers", + Type = "List", + Value = Signers, + }); + types.Add(new OpenApiType() + { + Name = "grouped_signers", + Property = "GroupedSigners", + Type = "List", + Value = GroupedSigners, + }); + types.Add(new OpenApiType() + { + Name = "allow_decline", + Property = "AllowDecline", + Type = "bool", + Value = AllowDecline, + }); + types.Add(new OpenApiType() + { + Name = "allow_reassign", + Property = "AllowReassign", + Type = "bool", + Value = AllowReassign, + }); + types.Add(new OpenApiType() + { + Name = "attachments", + Property = "Attachments", + Type = "List", + Value = Attachments, + }); + types.Add(new OpenApiType() + { + Name = "cc_email_addresses", + Property = "CcEmailAddresses", + Type = "List", + Value = CcEmailAddresses, + }); + types.Add(new OpenApiType() + { + Name = "custom_fields", + Property = "CustomFields", + Type = "List", + Value = CustomFields, + }); + types.Add(new OpenApiType() + { + Name = "field_options", + Property = "FieldOptions", + Type = "SubFieldOptions", + Value = FieldOptions, + }); + types.Add(new OpenApiType() + { + Name = "form_field_groups", + Property = "FormFieldGroups", + Type = "List", + Value = FormFieldGroups, + }); + types.Add(new OpenApiType() + { + Name = "form_field_rules", + Property = "FormFieldRules", + Type = "List", + Value = FormFieldRules, + }); + types.Add(new OpenApiType() + { + Name = "form_fields_per_document", + Property = "FormFieldsPerDocument", + Type = "List", + Value = FormFieldsPerDocument, + }); + types.Add(new OpenApiType() + { + Name = "hide_text_tags", + Property = "HideTextTags", + Type = "bool", + Value = HideTextTags, + }); + types.Add(new OpenApiType() + { + Name = "message", + Property = "Message", + Type = "string", + Value = Message, + }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); + types.Add(new OpenApiType() + { + Name = "signing_options", + Property = "SigningOptions", + Type = "SubSigningOptions", + Value = SigningOptions, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + types.Add(new OpenApiType() + { + Name = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + types.Add(new OpenApiType() + { + Name = "use_text_tags", + Property = "UseTextTags", + Type = "bool", + Value = UseTextTags, + }); + types.Add(new OpenApiType() + { + Name = "populate_auto_fill_fields", + Property = "PopulateAutoFillFields", + Type = "bool", + Value = PopulateAutoFillFields, + }); + types.Add(new OpenApiType() + { + Name = "expires_at", + Property = "ExpiresAt", + Type = "int?", + Value = ExpiresAt, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs new file mode 100644 index 000000000..fcf32fa66 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditEmbeddedWithTemplateRequest.cs @@ -0,0 +1,557 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// SignatureRequestEditEmbeddedWithTemplateRequest + /// + [DataContract(Name = "SignatureRequestEditEmbeddedWithTemplateRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SignatureRequestEditEmbeddedWithTemplateRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SignatureRequestEditEmbeddedWithTemplateRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. (required). + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). + /// Add CC email recipients. Required when a CC role exists for the Template.. + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. (required). + /// An array defining values and options for custom fields. Required when a custom field exists in the Template.. + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// The custom message in the email that will be sent to the signers.. + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. + /// Add Signers to your Templated-based Signature Request. (required). + /// signingOptions. + /// The subject in the email that will be sent to the signers.. + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). + /// The title you want to assign to the SignatureRequest.. + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. (default to false). + public SignatureRequestEditEmbeddedWithTemplateRequest(List templateIds = default(List), bool allowDecline = false, List ccs = default(List), string clientId = default(string), List customFields = default(List), List files = default(List), List fileUrls = default(List), string message = default(string), Dictionary metadata = default(Dictionary), List signers = default(List), SubSigningOptions signingOptions = default(SubSigningOptions), string subject = default(string), bool testMode = false, string title = default(string), bool populateAutoFillFields = false) + { + + // to ensure "templateIds" is required (not null) + if (templateIds == null) + { + throw new ArgumentNullException("templateIds is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); + } + this.TemplateIds = templateIds; + // to ensure "clientId" is required (not null) + if (clientId == null) + { + throw new ArgumentNullException("clientId is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); + } + this.ClientId = clientId; + // to ensure "signers" is required (not null) + if (signers == null) + { + throw new ArgumentNullException("signers is a required property for SignatureRequestEditEmbeddedWithTemplateRequest and cannot be null"); + } + this.Signers = signers; + this.AllowDecline = allowDecline; + this.Ccs = ccs; + this.CustomFields = customFields; + this.Files = files; + this.FileUrls = fileUrls; + this.Message = message; + this.Metadata = metadata; + this.SigningOptions = signingOptions; + this.Subject = subject; + this.TestMode = testMode; + this.Title = title; + this.PopulateAutoFillFields = populateAutoFillFields; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SignatureRequestEditEmbeddedWithTemplateRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditEmbeddedWithTemplateRequest"); + } + + return obj; + } + + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] + public List TemplateIds { get; set; } + + /// + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. + /// + /// Client id of the app you're using to create this embedded signature request. Used for security purposes. + [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// Add Signers to your Templated-based Signature Request. + /// + /// Add Signers to your Templated-based Signature Request. + [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] + public List Signers { get; set; } + + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + [DataMember(Name = "allow_decline", EmitDefaultValue = true)] + public bool AllowDecline { get; set; } + + /// + /// Add CC email recipients. Required when a CC role exists for the Template. + /// + /// Add CC email recipients. Required when a CC role exists for the Template. + [DataMember(Name = "ccs", EmitDefaultValue = true)] + public List Ccs { get; set; } + + /// + /// An array defining values and options for custom fields. Required when a custom field exists in the Template. + /// + /// An array defining values and options for custom fields. Required when a custom field exists in the Template. + [DataMember(Name = "custom_fields", EmitDefaultValue = true)] + public List CustomFields { get; set; } + + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// The custom message in the email that will be sent to the signers. + /// + /// The custom message in the email that will be sent to the signers. + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Gets or Sets SigningOptions + /// + [DataMember(Name = "signing_options", EmitDefaultValue = true)] + public SubSigningOptions SigningOptions { get; set; } + + /// + /// The subject in the email that will be sent to the signers. + /// + /// The subject in the email that will be sent to the signers. + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// The title you want to assign to the SignatureRequest. + /// + /// The title you want to assign to the SignatureRequest. + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + /// + /// Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + [DataMember(Name = "populate_auto_fill_fields", EmitDefaultValue = true)] + public bool PopulateAutoFillFields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SignatureRequestEditEmbeddedWithTemplateRequest {\n"); + sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Signers: ").Append(Signers).Append("\n"); + sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); + sb.Append(" Ccs: ").Append(Ccs).Append("\n"); + sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" PopulateAutoFillFields: ").Append(PopulateAutoFillFields).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SignatureRequestEditEmbeddedWithTemplateRequest); + } + + /// + /// Returns true if SignatureRequestEditEmbeddedWithTemplateRequest instances are equal + /// + /// Instance of SignatureRequestEditEmbeddedWithTemplateRequest to be compared + /// Boolean + public bool Equals(SignatureRequestEditEmbeddedWithTemplateRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.TemplateIds == input.TemplateIds || + this.TemplateIds != null && + input.TemplateIds != null && + this.TemplateIds.SequenceEqual(input.TemplateIds) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.Signers == input.Signers || + this.Signers != null && + input.Signers != null && + this.Signers.SequenceEqual(input.Signers) + ) && + ( + this.AllowDecline == input.AllowDecline || + this.AllowDecline.Equals(input.AllowDecline) + ) && + ( + this.Ccs == input.Ccs || + this.Ccs != null && + input.Ccs != null && + this.Ccs.SequenceEqual(input.Ccs) + ) && + ( + this.CustomFields == input.CustomFields || + this.CustomFields != null && + input.CustomFields != null && + this.CustomFields.SequenceEqual(input.CustomFields) + ) && + ( + this.Files == input.Files || + this.Files != null && + input.Files != null && + this.Files.SequenceEqual(input.Files) + ) && + ( + this.FileUrls == input.FileUrls || + this.FileUrls != null && + input.FileUrls != null && + this.FileUrls.SequenceEqual(input.FileUrls) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.SigningOptions == input.SigningOptions || + (this.SigningOptions != null && + this.SigningOptions.Equals(input.SigningOptions)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.PopulateAutoFillFields == input.PopulateAutoFillFields || + this.PopulateAutoFillFields.Equals(input.PopulateAutoFillFields) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TemplateIds != null) + { + hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); + } + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.Signers != null) + { + hashCode = (hashCode * 59) + this.Signers.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); + if (this.Ccs != null) + { + hashCode = (hashCode * 59) + this.Ccs.GetHashCode(); + } + if (this.CustomFields != null) + { + hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); + } + if (this.Files != null) + { + hashCode = (hashCode * 59) + this.Files.GetHashCode(); + } + if (this.FileUrls != null) + { + hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + if (this.SigningOptions != null) + { + hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + hashCode = (hashCode * 59) + this.PopulateAutoFillFields.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); + } + + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "template_ids", + Property = "TemplateIds", + Type = "List", + Value = TemplateIds, + }); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "signers", + Property = "Signers", + Type = "List", + Value = Signers, + }); + types.Add(new OpenApiType() + { + Name = "allow_decline", + Property = "AllowDecline", + Type = "bool", + Value = AllowDecline, + }); + types.Add(new OpenApiType() + { + Name = "ccs", + Property = "Ccs", + Type = "List", + Value = Ccs, + }); + types.Add(new OpenApiType() + { + Name = "custom_fields", + Property = "CustomFields", + Type = "List", + Value = CustomFields, + }); + types.Add(new OpenApiType() + { + Name = "files", + Property = "Files", + Type = "List", + Value = Files, + }); + types.Add(new OpenApiType() + { + Name = "file_urls", + Property = "FileUrls", + Type = "List", + Value = FileUrls, + }); + types.Add(new OpenApiType() + { + Name = "message", + Property = "Message", + Type = "string", + Value = Message, + }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); + types.Add(new OpenApiType() + { + Name = "signing_options", + Property = "SigningOptions", + Type = "SubSigningOptions", + Value = SigningOptions, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + types.Add(new OpenApiType() + { + Name = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + types.Add(new OpenApiType() + { + Name = "populate_auto_fill_fields", + Property = "PopulateAutoFillFields", + Type = "bool", + Value = PopulateAutoFillFields, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs new file mode 100644 index 000000000..f239fcf60 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditRequest.cs @@ -0,0 +1,793 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// SignatureRequestEditRequest + /// + [DataContract(Name = "SignatureRequestEditRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SignatureRequestEditRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SignatureRequestEditRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.. + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. (default to false). + /// A list describing the attachments. + /// The email addresses that should be CCed.. + /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.. + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.. + /// fieldOptions. + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.. + /// Conditional Logic rules for fields defined in `form_fields_per_document`.. + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`. + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. (default to false). + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). + /// The custom message in the email that will be sent to the signers.. + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. + /// signingOptions. + /// The URL you want signers redirected to after they successfully sign.. + /// The subject in the email that will be sent to the signers.. + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). + /// The title you want to assign to the SignatureRequest.. + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. (default to false). + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.. + public SignatureRequestEditRequest(List files = default(List), List fileUrls = default(List), List signers = default(List), List groupedSigners = default(List), bool allowDecline = false, bool allowReassign = false, List attachments = default(List), List ccEmailAddresses = default(List), string clientId = default(string), List customFields = default(List), SubFieldOptions fieldOptions = default(SubFieldOptions), List formFieldGroups = default(List), List formFieldRules = default(List), List formFieldsPerDocument = default(List), bool hideTextTags = false, bool isEid = false, string message = default(string), Dictionary metadata = default(Dictionary), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string), bool useTextTags = false, int? expiresAt = default(int?)) + { + + this.Files = files; + this.FileUrls = fileUrls; + this.Signers = signers; + this.GroupedSigners = groupedSigners; + this.AllowDecline = allowDecline; + this.AllowReassign = allowReassign; + this.Attachments = attachments; + this.CcEmailAddresses = ccEmailAddresses; + this.ClientId = clientId; + this.CustomFields = customFields; + this.FieldOptions = fieldOptions; + this.FormFieldGroups = formFieldGroups; + this.FormFieldRules = formFieldRules; + this.FormFieldsPerDocument = formFieldsPerDocument; + this.HideTextTags = hideTextTags; + this.IsEid = isEid; + this.Message = message; + this.Metadata = metadata; + this.SigningOptions = signingOptions; + this.SigningRedirectUrl = signingRedirectUrl; + this.Subject = subject; + this.TestMode = testMode; + this.Title = title; + this.UseTextTags = useTextTags; + this.ExpiresAt = expiresAt; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SignatureRequestEditRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditRequest"); + } + + return obj; + } + + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + /// + /// Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + [DataMember(Name = "signers", EmitDefaultValue = true)] + public List Signers { get; set; } + + /// + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + /// + /// Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + [DataMember(Name = "grouped_signers", EmitDefaultValue = true)] + public List GroupedSigners { get; set; } + + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + [DataMember(Name = "allow_decline", EmitDefaultValue = true)] + public bool AllowDecline { get; set; } + + /// + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + /// + /// Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + [DataMember(Name = "allow_reassign", EmitDefaultValue = true)] + public bool AllowReassign { get; set; } + + /// + /// A list describing the attachments + /// + /// A list describing the attachments + [DataMember(Name = "attachments", EmitDefaultValue = true)] + public List Attachments { get; set; } + + /// + /// The email addresses that should be CCed. + /// + /// The email addresses that should be CCed. + [DataMember(Name = "cc_email_addresses", EmitDefaultValue = true)] + public List CcEmailAddresses { get; set; } + + /// + /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + /// + /// The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + [DataMember(Name = "client_id", EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + /// + /// When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + [DataMember(Name = "custom_fields", EmitDefaultValue = true)] + public List CustomFields { get; set; } + + /// + /// Gets or Sets FieldOptions + /// + [DataMember(Name = "field_options", EmitDefaultValue = true)] + public SubFieldOptions FieldOptions { get; set; } + + /// + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + /// + /// Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + [DataMember(Name = "form_field_groups", EmitDefaultValue = true)] + public List FormFieldGroups { get; set; } + + /// + /// Conditional Logic rules for fields defined in `form_fields_per_document`. + /// + /// Conditional Logic rules for fields defined in `form_fields_per_document`. + [DataMember(Name = "form_field_rules", EmitDefaultValue = true)] + public List FormFieldRules { get; set; } + + /// + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + /// + /// The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + [DataMember(Name = "form_fields_per_document", EmitDefaultValue = true)] + public List FormFieldsPerDocument { get; set; } + + /// + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + /// + /// Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + [DataMember(Name = "hide_text_tags", EmitDefaultValue = true)] + public bool HideTextTags { get; set; } + + /// + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + /// + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + [DataMember(Name = "is_eid", EmitDefaultValue = true)] + public bool IsEid { get; set; } + + /// + /// The custom message in the email that will be sent to the signers. + /// + /// The custom message in the email that will be sent to the signers. + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Gets or Sets SigningOptions + /// + [DataMember(Name = "signing_options", EmitDefaultValue = true)] + public SubSigningOptions SigningOptions { get; set; } + + /// + /// The URL you want signers redirected to after they successfully sign. + /// + /// The URL you want signers redirected to after they successfully sign. + [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] + public string SigningRedirectUrl { get; set; } + + /// + /// The subject in the email that will be sent to the signers. + /// + /// The subject in the email that will be sent to the signers. + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// The title you want to assign to the SignatureRequest. + /// + /// The title you want to assign to the SignatureRequest. + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + /// + /// Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + [DataMember(Name = "use_text_tags", EmitDefaultValue = true)] + public bool UseTextTags { get; set; } + + /// + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + /// + /// When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + [DataMember(Name = "expires_at", EmitDefaultValue = true)] + public int? ExpiresAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SignatureRequestEditRequest {\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" Signers: ").Append(Signers).Append("\n"); + sb.Append(" GroupedSigners: ").Append(GroupedSigners).Append("\n"); + sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); + sb.Append(" AllowReassign: ").Append(AllowReassign).Append("\n"); + sb.Append(" Attachments: ").Append(Attachments).Append("\n"); + sb.Append(" CcEmailAddresses: ").Append(CcEmailAddresses).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); + sb.Append(" FieldOptions: ").Append(FieldOptions).Append("\n"); + sb.Append(" FormFieldGroups: ").Append(FormFieldGroups).Append("\n"); + sb.Append(" FormFieldRules: ").Append(FormFieldRules).Append("\n"); + sb.Append(" FormFieldsPerDocument: ").Append(FormFieldsPerDocument).Append("\n"); + sb.Append(" HideTextTags: ").Append(HideTextTags).Append("\n"); + sb.Append(" IsEid: ").Append(IsEid).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); + sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" UseTextTags: ").Append(UseTextTags).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SignatureRequestEditRequest); + } + + /// + /// Returns true if SignatureRequestEditRequest instances are equal + /// + /// Instance of SignatureRequestEditRequest to be compared + /// Boolean + public bool Equals(SignatureRequestEditRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Files == input.Files || + this.Files != null && + input.Files != null && + this.Files.SequenceEqual(input.Files) + ) && + ( + this.FileUrls == input.FileUrls || + this.FileUrls != null && + input.FileUrls != null && + this.FileUrls.SequenceEqual(input.FileUrls) + ) && + ( + this.Signers == input.Signers || + this.Signers != null && + input.Signers != null && + this.Signers.SequenceEqual(input.Signers) + ) && + ( + this.GroupedSigners == input.GroupedSigners || + this.GroupedSigners != null && + input.GroupedSigners != null && + this.GroupedSigners.SequenceEqual(input.GroupedSigners) + ) && + ( + this.AllowDecline == input.AllowDecline || + this.AllowDecline.Equals(input.AllowDecline) + ) && + ( + this.AllowReassign == input.AllowReassign || + this.AllowReassign.Equals(input.AllowReassign) + ) && + ( + this.Attachments == input.Attachments || + this.Attachments != null && + input.Attachments != null && + this.Attachments.SequenceEqual(input.Attachments) + ) && + ( + this.CcEmailAddresses == input.CcEmailAddresses || + this.CcEmailAddresses != null && + input.CcEmailAddresses != null && + this.CcEmailAddresses.SequenceEqual(input.CcEmailAddresses) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.CustomFields == input.CustomFields || + this.CustomFields != null && + input.CustomFields != null && + this.CustomFields.SequenceEqual(input.CustomFields) + ) && + ( + this.FieldOptions == input.FieldOptions || + (this.FieldOptions != null && + this.FieldOptions.Equals(input.FieldOptions)) + ) && + ( + this.FormFieldGroups == input.FormFieldGroups || + this.FormFieldGroups != null && + input.FormFieldGroups != null && + this.FormFieldGroups.SequenceEqual(input.FormFieldGroups) + ) && + ( + this.FormFieldRules == input.FormFieldRules || + this.FormFieldRules != null && + input.FormFieldRules != null && + this.FormFieldRules.SequenceEqual(input.FormFieldRules) + ) && + ( + this.FormFieldsPerDocument == input.FormFieldsPerDocument || + this.FormFieldsPerDocument != null && + input.FormFieldsPerDocument != null && + this.FormFieldsPerDocument.SequenceEqual(input.FormFieldsPerDocument) + ) && + ( + this.HideTextTags == input.HideTextTags || + this.HideTextTags.Equals(input.HideTextTags) + ) && + ( + this.IsEid == input.IsEid || + this.IsEid.Equals(input.IsEid) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.SigningOptions == input.SigningOptions || + (this.SigningOptions != null && + this.SigningOptions.Equals(input.SigningOptions)) + ) && + ( + this.SigningRedirectUrl == input.SigningRedirectUrl || + (this.SigningRedirectUrl != null && + this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.UseTextTags == input.UseTextTags || + this.UseTextTags.Equals(input.UseTextTags) + ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Files != null) + { + hashCode = (hashCode * 59) + this.Files.GetHashCode(); + } + if (this.FileUrls != null) + { + hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); + } + if (this.Signers != null) + { + hashCode = (hashCode * 59) + this.Signers.GetHashCode(); + } + if (this.GroupedSigners != null) + { + hashCode = (hashCode * 59) + this.GroupedSigners.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); + hashCode = (hashCode * 59) + this.AllowReassign.GetHashCode(); + if (this.Attachments != null) + { + hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); + } + if (this.CcEmailAddresses != null) + { + hashCode = (hashCode * 59) + this.CcEmailAddresses.GetHashCode(); + } + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.CustomFields != null) + { + hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); + } + if (this.FieldOptions != null) + { + hashCode = (hashCode * 59) + this.FieldOptions.GetHashCode(); + } + if (this.FormFieldGroups != null) + { + hashCode = (hashCode * 59) + this.FormFieldGroups.GetHashCode(); + } + if (this.FormFieldRules != null) + { + hashCode = (hashCode * 59) + this.FormFieldRules.GetHashCode(); + } + if (this.FormFieldsPerDocument != null) + { + hashCode = (hashCode * 59) + this.FormFieldsPerDocument.GetHashCode(); + } + hashCode = (hashCode * 59) + this.HideTextTags.GetHashCode(); + hashCode = (hashCode * 59) + this.IsEid.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + if (this.SigningOptions != null) + { + hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); + } + if (this.SigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + hashCode = (hashCode * 59) + this.UseTextTags.GetHashCode(); + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); + } + + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "files", + Property = "Files", + Type = "List", + Value = Files, + }); + types.Add(new OpenApiType() + { + Name = "file_urls", + Property = "FileUrls", + Type = "List", + Value = FileUrls, + }); + types.Add(new OpenApiType() + { + Name = "signers", + Property = "Signers", + Type = "List", + Value = Signers, + }); + types.Add(new OpenApiType() + { + Name = "grouped_signers", + Property = "GroupedSigners", + Type = "List", + Value = GroupedSigners, + }); + types.Add(new OpenApiType() + { + Name = "allow_decline", + Property = "AllowDecline", + Type = "bool", + Value = AllowDecline, + }); + types.Add(new OpenApiType() + { + Name = "allow_reassign", + Property = "AllowReassign", + Type = "bool", + Value = AllowReassign, + }); + types.Add(new OpenApiType() + { + Name = "attachments", + Property = "Attachments", + Type = "List", + Value = Attachments, + }); + types.Add(new OpenApiType() + { + Name = "cc_email_addresses", + Property = "CcEmailAddresses", + Type = "List", + Value = CcEmailAddresses, + }); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "custom_fields", + Property = "CustomFields", + Type = "List", + Value = CustomFields, + }); + types.Add(new OpenApiType() + { + Name = "field_options", + Property = "FieldOptions", + Type = "SubFieldOptions", + Value = FieldOptions, + }); + types.Add(new OpenApiType() + { + Name = "form_field_groups", + Property = "FormFieldGroups", + Type = "List", + Value = FormFieldGroups, + }); + types.Add(new OpenApiType() + { + Name = "form_field_rules", + Property = "FormFieldRules", + Type = "List", + Value = FormFieldRules, + }); + types.Add(new OpenApiType() + { + Name = "form_fields_per_document", + Property = "FormFieldsPerDocument", + Type = "List", + Value = FormFieldsPerDocument, + }); + types.Add(new OpenApiType() + { + Name = "hide_text_tags", + Property = "HideTextTags", + Type = "bool", + Value = HideTextTags, + }); + types.Add(new OpenApiType() + { + Name = "is_eid", + Property = "IsEid", + Type = "bool", + Value = IsEid, + }); + types.Add(new OpenApiType() + { + Name = "message", + Property = "Message", + Type = "string", + Value = Message, + }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); + types.Add(new OpenApiType() + { + Name = "signing_options", + Property = "SigningOptions", + Type = "SubSigningOptions", + Value = SigningOptions, + }); + types.Add(new OpenApiType() + { + Name = "signing_redirect_url", + Property = "SigningRedirectUrl", + Type = "string", + Value = SigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + types.Add(new OpenApiType() + { + Name = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + types.Add(new OpenApiType() + { + Name = "use_text_tags", + Property = "UseTextTags", + Type = "bool", + Value = UseTextTags, + }); + types.Add(new OpenApiType() + { + Name = "expires_at", + Property = "ExpiresAt", + Type = "int?", + Value = ExpiresAt, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs new file mode 100644 index 000000000..84990b8ff --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SignatureRequestEditWithTemplateRequest.cs @@ -0,0 +1,578 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// SignatureRequestEditWithTemplateRequest + /// + [DataContract(Name = "SignatureRequestEditWithTemplateRequest")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SignatureRequestEditWithTemplateRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SignatureRequestEditWithTemplateRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. (required). + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. (default to false). + /// Add CC email recipients. Required when a CC role exists for the Template.. + /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.. + /// An array defining values and options for custom fields. Required when a custom field exists in the Template.. + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.. + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. (default to false). + /// The custom message in the email that will be sent to the signers.. + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.. + /// Add Signers to your Templated-based Signature Request. (required). + /// signingOptions. + /// The URL you want signers redirected to after they successfully sign.. + /// The subject in the email that will be sent to the signers.. + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. (default to false). + /// The title you want to assign to the SignatureRequest.. + public SignatureRequestEditWithTemplateRequest(List templateIds = default(List), bool allowDecline = false, List ccs = default(List), string clientId = default(string), List customFields = default(List), List files = default(List), List fileUrls = default(List), bool isEid = false, string message = default(string), Dictionary metadata = default(Dictionary), List signers = default(List), SubSigningOptions signingOptions = default(SubSigningOptions), string signingRedirectUrl = default(string), string subject = default(string), bool testMode = false, string title = default(string)) + { + + // to ensure "templateIds" is required (not null) + if (templateIds == null) + { + throw new ArgumentNullException("templateIds is a required property for SignatureRequestEditWithTemplateRequest and cannot be null"); + } + this.TemplateIds = templateIds; + // to ensure "signers" is required (not null) + if (signers == null) + { + throw new ArgumentNullException("signers is a required property for SignatureRequestEditWithTemplateRequest and cannot be null"); + } + this.Signers = signers; + this.AllowDecline = allowDecline; + this.Ccs = ccs; + this.ClientId = clientId; + this.CustomFields = customFields; + this.Files = files; + this.FileUrls = fileUrls; + this.IsEid = isEid; + this.Message = message; + this.Metadata = metadata; + this.SigningOptions = signingOptions; + this.SigningRedirectUrl = signingRedirectUrl; + this.Subject = subject; + this.TestMode = testMode; + this.Title = title; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SignatureRequestEditWithTemplateRequest Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SignatureRequestEditWithTemplateRequest"); + } + + return obj; + } + + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + /// + /// Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + [DataMember(Name = "template_ids", IsRequired = true, EmitDefaultValue = true)] + public List TemplateIds { get; set; } + + /// + /// Add Signers to your Templated-based Signature Request. + /// + /// Add Signers to your Templated-based Signature Request. + [DataMember(Name = "signers", IsRequired = true, EmitDefaultValue = true)] + public List Signers { get; set; } + + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + /// + /// Allows signers to decline to sign a document if `true`. Defaults to `false`. + [DataMember(Name = "allow_decline", EmitDefaultValue = true)] + public bool AllowDecline { get; set; } + + /// + /// Add CC email recipients. Required when a CC role exists for the Template. + /// + /// Add CC email recipients. Required when a CC role exists for the Template. + [DataMember(Name = "ccs", EmitDefaultValue = true)] + public List Ccs { get; set; } + + /// + /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + /// + /// Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + [DataMember(Name = "client_id", EmitDefaultValue = true)] + public string ClientId { get; set; } + + /// + /// An array defining values and options for custom fields. Required when a custom field exists in the Template. + /// + /// An array defining values and options for custom fields. Required when a custom field exists in the Template. + [DataMember(Name = "custom_fields", EmitDefaultValue = true)] + public List CustomFields { get; set; } + + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "files", EmitDefaultValue = true)] + public List Files { get; set; } + + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + /// + /// Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + [DataMember(Name = "file_urls", EmitDefaultValue = true)] + public List FileUrls { get; set; } + + /// + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + /// + /// Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + [DataMember(Name = "is_eid", EmitDefaultValue = true)] + public bool IsEid { get; set; } + + /// + /// The custom message in the email that will be sent to the signers. + /// + /// The custom message in the email that will be sent to the signers. + [DataMember(Name = "message", EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + /// + /// Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Dictionary Metadata { get; set; } + + /// + /// Gets or Sets SigningOptions + /// + [DataMember(Name = "signing_options", EmitDefaultValue = true)] + public SubSigningOptions SigningOptions { get; set; } + + /// + /// The URL you want signers redirected to after they successfully sign. + /// + /// The URL you want signers redirected to after they successfully sign. + [DataMember(Name = "signing_redirect_url", EmitDefaultValue = true)] + public string SigningRedirectUrl { get; set; } + + /// + /// The subject in the email that will be sent to the signers. + /// + /// The subject in the email that will be sent to the signers. + [DataMember(Name = "subject", EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + /// + /// Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + [DataMember(Name = "test_mode", EmitDefaultValue = true)] + public bool TestMode { get; set; } + + /// + /// The title you want to assign to the SignatureRequest. + /// + /// The title you want to assign to the SignatureRequest. + [DataMember(Name = "title", EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SignatureRequestEditWithTemplateRequest {\n"); + sb.Append(" TemplateIds: ").Append(TemplateIds).Append("\n"); + sb.Append(" Signers: ").Append(Signers).Append("\n"); + sb.Append(" AllowDecline: ").Append(AllowDecline).Append("\n"); + sb.Append(" Ccs: ").Append(Ccs).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" FileUrls: ").Append(FileUrls).Append("\n"); + sb.Append(" IsEid: ").Append(IsEid).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" SigningOptions: ").Append(SigningOptions).Append("\n"); + sb.Append(" SigningRedirectUrl: ").Append(SigningRedirectUrl).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" TestMode: ").Append(TestMode).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SignatureRequestEditWithTemplateRequest); + } + + /// + /// Returns true if SignatureRequestEditWithTemplateRequest instances are equal + /// + /// Instance of SignatureRequestEditWithTemplateRequest to be compared + /// Boolean + public bool Equals(SignatureRequestEditWithTemplateRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.TemplateIds == input.TemplateIds || + this.TemplateIds != null && + input.TemplateIds != null && + this.TemplateIds.SequenceEqual(input.TemplateIds) + ) && + ( + this.Signers == input.Signers || + this.Signers != null && + input.Signers != null && + this.Signers.SequenceEqual(input.Signers) + ) && + ( + this.AllowDecline == input.AllowDecline || + this.AllowDecline.Equals(input.AllowDecline) + ) && + ( + this.Ccs == input.Ccs || + this.Ccs != null && + input.Ccs != null && + this.Ccs.SequenceEqual(input.Ccs) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ) && + ( + this.CustomFields == input.CustomFields || + this.CustomFields != null && + input.CustomFields != null && + this.CustomFields.SequenceEqual(input.CustomFields) + ) && + ( + this.Files == input.Files || + this.Files != null && + input.Files != null && + this.Files.SequenceEqual(input.Files) + ) && + ( + this.FileUrls == input.FileUrls || + this.FileUrls != null && + input.FileUrls != null && + this.FileUrls.SequenceEqual(input.FileUrls) + ) && + ( + this.IsEid == input.IsEid || + this.IsEid.Equals(input.IsEid) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.SigningOptions == input.SigningOptions || + (this.SigningOptions != null && + this.SigningOptions.Equals(input.SigningOptions)) + ) && + ( + this.SigningRedirectUrl == input.SigningRedirectUrl || + (this.SigningRedirectUrl != null && + this.SigningRedirectUrl.Equals(input.SigningRedirectUrl)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.TestMode == input.TestMode || + this.TestMode.Equals(input.TestMode) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TemplateIds != null) + { + hashCode = (hashCode * 59) + this.TemplateIds.GetHashCode(); + } + if (this.Signers != null) + { + hashCode = (hashCode * 59) + this.Signers.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AllowDecline.GetHashCode(); + if (this.Ccs != null) + { + hashCode = (hashCode * 59) + this.Ccs.GetHashCode(); + } + if (this.ClientId != null) + { + hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); + } + if (this.CustomFields != null) + { + hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); + } + if (this.Files != null) + { + hashCode = (hashCode * 59) + this.Files.GetHashCode(); + } + if (this.FileUrls != null) + { + hashCode = (hashCode * 59) + this.FileUrls.GetHashCode(); + } + hashCode = (hashCode * 59) + this.IsEid.GetHashCode(); + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + if (this.SigningOptions != null) + { + hashCode = (hashCode * 59) + this.SigningOptions.GetHashCode(); + } + if (this.SigningRedirectUrl != null) + { + hashCode = (hashCode * 59) + this.SigningRedirectUrl.GetHashCode(); + } + if (this.Subject != null) + { + hashCode = (hashCode * 59) + this.Subject.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TestMode.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Message (string) maxLength + if (this.Message != null && this.Message.Length > 5000) + { + yield return new ValidationResult("Invalid value for Message, length must be less than 5000.", new[] { "Message" }); + } + + // Subject (string) maxLength + if (this.Subject != null && this.Subject.Length > 255) + { + yield return new ValidationResult("Invalid value for Subject, length must be less than 255.", new[] { "Subject" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 255) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 255.", new[] { "Title" }); + } + + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "template_ids", + Property = "TemplateIds", + Type = "List", + Value = TemplateIds, + }); + types.Add(new OpenApiType() + { + Name = "signers", + Property = "Signers", + Type = "List", + Value = Signers, + }); + types.Add(new OpenApiType() + { + Name = "allow_decline", + Property = "AllowDecline", + Type = "bool", + Value = AllowDecline, + }); + types.Add(new OpenApiType() + { + Name = "ccs", + Property = "Ccs", + Type = "List", + Value = Ccs, + }); + types.Add(new OpenApiType() + { + Name = "client_id", + Property = "ClientId", + Type = "string", + Value = ClientId, + }); + types.Add(new OpenApiType() + { + Name = "custom_fields", + Property = "CustomFields", + Type = "List", + Value = CustomFields, + }); + types.Add(new OpenApiType() + { + Name = "files", + Property = "Files", + Type = "List", + Value = Files, + }); + types.Add(new OpenApiType() + { + Name = "file_urls", + Property = "FileUrls", + Type = "List", + Value = FileUrls, + }); + types.Add(new OpenApiType() + { + Name = "is_eid", + Property = "IsEid", + Type = "bool", + Value = IsEid, + }); + types.Add(new OpenApiType() + { + Name = "message", + Property = "Message", + Type = "string", + Value = Message, + }); + types.Add(new OpenApiType() + { + Name = "metadata", + Property = "Metadata", + Type = "Dictionary", + Value = Metadata, + }); + types.Add(new OpenApiType() + { + Name = "signing_options", + Property = "SigningOptions", + Type = "SubSigningOptions", + Value = SigningOptions, + }); + types.Add(new OpenApiType() + { + Name = "signing_redirect_url", + Property = "SigningRedirectUrl", + Type = "string", + Value = SigningRedirectUrl, + }); + types.Add(new OpenApiType() + { + Name = "subject", + Property = "Subject", + Type = "string", + Value = Subject, + }); + types.Add(new OpenApiType() + { + Name = "test_mode", + Property = "TestMode", + Type = "bool", + Value = TestMode, + }); + types.Add(new OpenApiType() + { + Name = "title", + Property = "Title", + Type = "string", + Value = Title, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs index a15a63f13..b6af36b3d 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubFormFieldRuleAction.cs @@ -40,16 +40,18 @@ public partial class SubFormFieldRuleAction : IEquatable public enum TypeEnum { /// - /// Enum FieldVisibility for value: change-field-visibility + /// Enum ChangeFieldVisibility for value: change-field-visibility /// [EnumMember(Value = "change-field-visibility")] - FieldVisibility = 1, + ChangeFieldVisibility = 1, + FieldVisibility = ChangeFieldVisibility, /// - /// Enum GroupVisibility for value: change-group-visibility + /// Enum ChangeGroupVisibility for value: change-group-visibility /// [EnumMember(Value = "change-group-visibility")] - GroupVisibility = 2 + ChangeGroupVisibility = 2, + GroupVisibility = ChangeGroupVisibility } diff --git a/sdks/dotnet/templates/ApiClient.mustache b/sdks/dotnet/templates/ApiClient.mustache index f8798bd23..bd0a31747 100644 --- a/sdks/dotnet/templates/ApiClient.mustache +++ b/sdks/dotnet/templates/ApiClient.mustache @@ -109,7 +109,7 @@ namespace {{packageName}}.Client if (response.Headers != null) { var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) - ? Path.GetTempPath() + ? global::System.IO.Path.GetTempPath() : _configuration.TempFolderPath; var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); foreach (var header in response.Headers) @@ -338,7 +338,7 @@ namespace {{packageName}}.Client { foreach (var value in headerParam.Value) { - request.AddHeader(headerParam.Key, value); + request.AddOrUpdateHeader(headerParam.Key, value); } } } @@ -398,13 +398,21 @@ namespace {{packageName}}.Client var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name)); + request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name)); else request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } } } + if (options.HeaderParameters != null) + { + if (options.HeaderParameters.TryGetValue("Content-Type", out var contentTypes) && contentTypes.Any(header => header.Contains("multipart/form-data"))) + { + request.AlwaysMultipartFormData = true; + } + } + return request; } @@ -476,7 +484,7 @@ namespace {{packageName}}.Client var clientOptions = new RestClientOptions(baseUrl) { ClientCertificates = configuration.ClientCertificates, - MaxTimeout = configuration.Timeout, + Timeout = configuration.Timeout, Proxy = configuration.Proxy, UserAgent = configuration.UserAgent, UseDefaultCredentials = configuration.UseDefaultCredentials, @@ -585,11 +593,11 @@ namespace {{packageName}}.Client } } - private RestResponse DeserializeRestResponseFromPolicy(RestClient client, RestRequest request, PolicyResult policyResult) + private async Task> DeserializeRestResponseFromPolicyAsync(RestClient client, RestRequest request, PolicyResult policyResult, CancellationToken cancellationToken = default) { if (policyResult.Outcome == OutcomeType.Successful) { - return client.Deserialize(policyResult.Result); + return await client.Deserialize(policyResult.Result, cancellationToken); } else { @@ -622,7 +630,7 @@ namespace {{packageName}}.Client { var policy = RetryConfiguration.RetryPolicy; var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - return Task.FromResult(DeserializeRestResponseFromPolicy(client, request, policyResult)); + return DeserializeRestResponseFromPolicyAsync(client, request, policyResult); } else { @@ -648,7 +656,7 @@ namespace {{packageName}}.Client { var policy = RetryConfiguration.AsyncRetryPolicy; var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - return DeserializeRestResponseFromPolicy(client, request, policyResult); + return await DeserializeRestResponseFromPolicyAsync(client, request, policyResult, cancellationToken); } else { diff --git a/sdks/dotnet/templates/ApiClient.v790.mustache b/sdks/dotnet/templates/ApiClient.v790.mustache new file mode 100644 index 000000000..a63d1c2be --- /dev/null +++ b/sdks/dotnet/templates/ApiClient.v790.mustache @@ -0,0 +1,838 @@ +{{>partial_header}} + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters; +using System.Text; +using System.Threading; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +{{^net60OrLater}} +using System.Web; +{{/net60OrLater}} +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using RestSharp; +using RestSharp.Serializers; +using RestSharpMethod = RestSharp.Method; +using FileIO = System.IO.File; +{{#supportsRetry}} +using Polly; +{{/supportsRetry}} +{{#hasOAuthMethods}} +using {{packageName}}.Client.Auth; +{{/hasOAuthMethods}} +using {{packageName}}.{{modelPackage}}; + +namespace {{packageName}}.Client +{ + /// + /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. + /// + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer + { + private readonly IReadableConfiguration _configuration; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return ((AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) + { + var result = (T)Deserialize(response, typeof(T)); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + internal object Deserialize(RestResponse response, Type type) + { + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + var bytes = response.RawBytes; + if (response.Headers != null) + { + var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) + ? global::System.IO.Path.GetTempPath() + : _configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in response.Headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + FileIO.WriteAllBytes(fileName, bytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(bytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; + + public string[] AcceptedContentTypes => ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public ContentType ContentType { get; set; } = ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; + } + {{! NOTE: Any changes related to RestSharp should be done in this class. All other client classes are for extensibility by consumers.}} + /// + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), + /// encapsulating general REST accessor use cases. + /// + {{>visibility}} partial class ApiClient : ISynchronousClient{{#supportsAsync}}, IAsynchronousClient{{/supportsAsync}} + { + private readonly string _baseUrl; + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(RestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(RestRequest request, RestResponse response); + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// + public ApiClient() + { + _baseUrl = GlobalConfiguration.Instance.BasePath; + } + + /// + /// Initializes a new instance of the + /// + /// The target service's base path in URL format. + /// + public ApiClient(string basePath) + { + if (string.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + _baseUrl = basePath; + } + + /// + /// Constructs the RestSharp version of an http method + /// + /// Swagger Client Custom HttpMethod + /// RestSharp's HttpMethod instance. + /// + private RestSharpMethod Method(HttpMethod method) + { + RestSharpMethod other; + switch (method) + { + case HttpMethod.Get: + other = RestSharpMethod.Get; + break; + case HttpMethod.Post: + other = RestSharpMethod.Post; + break; + case HttpMethod.Put: + other = RestSharpMethod.Put; + break; + case HttpMethod.Delete: + other = RestSharpMethod.Delete; + break; + case HttpMethod.Head: + other = RestSharpMethod.Head; + break; + case HttpMethod.Options: + other = RestSharpMethod.Options; + break; + case HttpMethod.Patch: + other = RestSharpMethod.Patch; + break; + default: + throw new ArgumentOutOfRangeException("method", method, null); + } + + return other; + } + + /// + /// Provides all logic for constructing a new RestSharp . + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. + /// + /// The http verb. + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// [private] A new RestRequest instance. + /// + private RestRequest NewRequest( + HttpMethod method, + string path, + RequestOptions options, + IReadableConfiguration configuration) + { + if (path == null) throw new ArgumentNullException("path"); + if (options == null) throw new ArgumentNullException("options"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + RestRequest request = new RestRequest(path, Method(method)); + + if (options.PathParameters != null) + { + foreach (var pathParam in options.PathParameters) + { + request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment); + } + } + + if (options.QueryParameters != null) + { + foreach (var queryParam in options.QueryParameters) + { + foreach (var value in queryParam.Value) + { + request.AddQueryParameter(queryParam.Key, value); + } + } + } + + if (configuration.DefaultHeaders != null) + { + foreach (var headerParam in configuration.DefaultHeaders) + { + request.AddHeader(headerParam.Key, headerParam.Value); + } + } + + if (options.HeaderParameters != null) + { + foreach (var headerParam in options.HeaderParameters) + { + foreach (var value in headerParam.Value) + { + request.AddHeader(headerParam.Key, value); + } + } + } + + if (options.FormParameters != null) + { + foreach (var formParam in options.FormParameters) + { + request.AddParameter(formParam.Key, formParam.Value); + } + } + + if (options.Data != null) + { + if (options.Data is Stream stream) + { + var contentType = "application/octet-stream"; + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + contentType = contentTypes[0]; + } + + var bytes = ClientUtils.ReadAsBytes(stream); + request.AddParameter(contentType, bytes, ParameterType.RequestBody); + } + else + { + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) + { + request.RequestFormat = DataFormat.Json; + } + else + { + // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default. + } + } + else + { + // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly. + request.RequestFormat = DataFormat.Json; + } + + request.AddJsonBody(options.Data); + } + } + + if (options.FileParameters != null) + { + foreach (var fileParam in options.FileParameters) + { + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name)); + else + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); + } + } + } + + return request; + } + + /// + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// + /// The RestSharp response object + /// A new ApiResponse instance. + private ApiResponse ToApiResponse(RestResponse response) + { + T result = response.Data; + string rawContent = response.Content; + + var transformed = new ApiResponse(response.StatusCode, new Multimap({{#caseInsensitiveResponseHeaders}}StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), result, rawContent) + { + ErrorText = response.ErrorMessage, + Cookies = new List() + }; + + if (response.Headers != null) + { + foreach (var responseHeader in response.Headers) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.Cookies != null) + { + foreach (var responseCookies in response.Cookies.Cast()) + { + transformed.Cookies.Add( + new Cookie( + responseCookies.Name, + responseCookies.Value, + responseCookies.Path, + responseCookies.Domain) + ); + } + } + + return transformed; + } + + /// + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// + /// Local function that executes http request and returns http response. + /// Local function to specify options for the service. + /// The RestSharp request object + /// The RestSharp options object + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A new ApiResponse instance. + private async Task> ExecClientAsync(Func>> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; + setOptions(clientOptions); + + {{#hasOAuthMethods}} + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) + { + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthFlow, + SerializerSettings, + configuration); + } + + {{/hasOAuthMethods}} + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) + { + InterceptRequest(request); + + RestResponse response = await getResponse(client); + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + try + { + response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; + } + + InterceptResponse(request, response); + + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) + { + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } + } + return result; + } + } + + private async Task> DeserializeRestResponseFromPolicyAsync(RestClient client, RestRequest request, PolicyResult policyResult, CancellationToken cancellationToken = default) + { + if (policyResult.Outcome == OutcomeType.Successful) + { + return await client.Deserialize(policyResult.Result, cancellationToken); + } + else + { + return new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + } + + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + Action setOptions = (clientOptions) => + { + var cookies = new CookieContainer(); + + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + clientOptions.CookieContainer = cookies; + }; + + Func>> getResponse = (client) => + { + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return DeserializeRestResponseFromPolicyAsync(client, request, policyResult); + } + else + { + return Task.FromResult(client.Execute(request)); + } + }; + + return ExecClientAsync(getResponse, setOptions, request, options, configuration).GetAwaiter().GetResult(); + } + + {{#supportsAsync}} + private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) + { + Action setOptions = (clientOptions) => + { + //no extra options + }; + + Func>> getResponse = async (client) => + { + {{#supportsRetry}} + if (RetryConfiguration.AsyncRetryPolicy != null) + { + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + return await DeserializeRestResponseFromPolicyAsync(client, request, policyResult, cancellationToken); + } + else + { + {{/supportsRetry}} + return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + {{#supportsRetry}} + } + {{/supportsRetry}} + }; + + return ExecClientAsync(getResponse, setOptions, request, options, configuration); + } + + #region IAsynchronousClient + /// + /// Make a HTTP GET request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP POST request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PUT request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP DELETE request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP HEAD request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP OPTION request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PATCH request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); + } + #endregion IAsynchronousClient + {{/supportsAsync}} + + #region ISynchronousClient + /// + /// Make a HTTP GET request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); + } + + /// + /// Make a HTTP POST request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); + } + + /// + /// Make a HTTP PUT request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); + } + + /// + /// Make a HTTP DELETE request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); + } + + /// + /// Make a HTTP HEAD request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); + } + + /// + /// Make a HTTP OPTION request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); + } + + /// + /// Make a HTTP PATCH request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); + } + #endregion ISynchronousClient + } +} diff --git a/sdks/dotnet/templates/ClientUtils.mustache b/sdks/dotnet/templates/ClientUtils.mustache index cacf67e42..f8481e37f 100644 --- a/sdks/dotnet/templates/ClientUtils.mustache +++ b/sdks/dotnet/templates/ClientUtils.mustache @@ -118,6 +118,14 @@ namespace {{packageName}}.Client // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); +{{#net60OrLater}} + if (obj is DateOnly dateOnly) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15 + return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); +{{/net60OrLater}} if (obj is bool boolean) return boolean ? "true" : "false"; if (obj is ICollection collection) { diff --git a/sdks/dotnet/templates/Configuration.mustache b/sdks/dotnet/templates/Configuration.mustache index 64441d8de..c81ca2623 100644 --- a/sdks/dotnet/templates/Configuration.mustache +++ b/sdks/dotnet/templates/Configuration.mustache @@ -216,7 +216,7 @@ namespace {{packageName}}.Client }; // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; + Timeout = TimeSpan.FromSeconds(100); } /// @@ -300,9 +300,9 @@ namespace {{packageName}}.Client public virtual IDictionary DefaultHeaders { get; set; } /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// Gets or sets the HTTP timeout of ApiClient. Defaults to 100 seconds. /// - public virtual int Timeout { get; set; } + public virtual TimeSpan Timeout { get; set; } /// /// Gets or sets the proxy diff --git a/sdks/dotnet/templates/Configuration.v790.mustache b/sdks/dotnet/templates/Configuration.v790.mustache new file mode 100644 index 000000000..2753aafb3 --- /dev/null +++ b/sdks/dotnet/templates/Configuration.v790.mustache @@ -0,0 +1,737 @@ +{{>partial_header}} + +using System; +{{^net35}} +using System.Collections.Concurrent; +{{/net35}} +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Net.Http; +using System.Net.Security; +{{#useRestSharp}} +{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; +{{/hasOAuthMethods}} +{{/useRestSharp}} + +namespace {{packageName}}.Client +{ + /// + /// Represents a set of configuration settings + /// + {{>visibility}} class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "{{packageVersion}}"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.RawContent), + response.RawContent, response.Headers); + } + {{^netStandard}} + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + } + {{/netStandard}} + return null; + }; + + #endregion Static Members + + #region Private Members + + /// + /// Defines the base path of the target API server. + /// Example: http://localhost:3000/v1/ + /// + private string _basePath; + + private bool _useDefaultCredentials = false; + + /// + /// Gets or sets the API key based on the authentication name. + /// This is the key and value comprising the "secret" for accessing an API. + /// + /// The API key. + private IDictionary _apiKey; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + {{#servers.0}} + + /// + /// Gets or sets the servers defined in the OpenAPI spec. + /// + /// The servers + private IList> _servers; + {{/servers.0}} + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + {{#hasHttpSignatureMethods}} + + /// + /// HttpSigning configuration + /// + private HttpSigningConfiguration _HttpSigningConfiguration = null; + {{/hasHttpSignatureMethods}} + #endregion Private Members + + #region Constructors + + /// + /// Initializes a new instance of the class + /// + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration() + { + Proxy = null; + UserAgent = WebUtility.UrlEncode("{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"); + BasePath = "{{{basePath}}}"; + DefaultHeaders = new {{^net35}}Concurrent{{/net35}}Dictionary(); + ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary(); + ApiKeyPrefix = new {{^net35}}Concurrent{{/net35}}Dictionary(); + {{#servers}} + {{#-first}} + Servers = new List>() + { + {{/-first}} + { + new Dictionary { + {"url", "{{{url}}}"}, + {"description", "{{{description}}}{{^description}}No description provided{{/description}}"}, + {{#variables}} + {{#-first}} + { + "variables", new Dictionary { + {{/-first}} + { + "{{{name}}}", new Dictionary { + {"description", "{{{description}}}{{^description}}No description provided{{/description}}"}, + {"default_value", {{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}"{{{defaultValue}}}"}, + {{#enumValues}} + {{#-first}} + { + "enum_values", new List() { + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + } + } + {{/-last}} + {{/enumValues}} + } + }{{^-last}},{{/-last}} + {{#-last}} + } + } + {{/-last}} + {{/variables}} + } + }{{^-last}},{{/-last}} + {{#-last}} + }; + {{/-last}} + {{/servers}} + OperationServers = new Dictionary>>() + { + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers.0}} + { + "{{{classname}}}.{{{nickname}}}", new List> + { + {{#servers}} + { + new Dictionary + { + {"url", "{{{url}}}"}, + {"description", "{{{description}}}{{^description}}No description provided{{/description}}"} + } + }, + {{/servers}} + } + }, + {{/servers.0}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + }; + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = 100000; + } + + /// + /// Initializes a new instance of the class + /// + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration( + IDictionary defaultHeaders, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "{{{basePath}}}") : this() + { + if (string.{{^net35}}IsNullOrWhiteSpace{{/net35}}{{#net35}}IsNullOrEmpty{{/net35}}(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeaders == null) + throw new ArgumentNullException("defaultHeaders"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeaders) + { + DefaultHeaders.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + #endregion Constructors + + #region Properties + + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath + { + get { return _basePath; } + set { _basePath = value; } + } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + + /// + /// Gets or sets the default header. + /// + [Obsolete("Use DefaultHeaders instead.")] + public virtual IDictionary DefaultHeader + { + get + { + return DefaultHeaders; + } + set + { + DefaultHeaders = value; + } + } + + /// + /// Gets or sets the default headers. + /// + public virtual IDictionary DefaultHeaders { get; set; } + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout { get; set; } + + /// + /// Gets or sets the proxy + /// + /// Proxy. + public virtual WebProxy Proxy { get; set; } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + string apiKeyValue; + ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); + string apiKeyPrefix; + if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) + { + return apiKeyPrefix + " " + apiKeyValue; + } + + return apiKeyValue; + } + + /// + /// Gets or sets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + public X509CertificateCollection ClientCertificates { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// This helper property simplifies code generation. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + {{#useRestSharp}} + {{#hasOAuthMethods}} + /// + /// Gets or sets the token URL for OAuth2 authentication. + /// + /// The OAuth Token URL. + public virtual string OAuthTokenUrl { get; set; } + + /// + /// Gets or sets the client ID for OAuth2 authentication. + /// + /// The OAuth Client ID. + public virtual string OAuthClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + /// The OAuth Client Secret. + public virtual string OAuthClientSecret { get; set; } + + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string{{nrt?}} OAuthScope { get; set; } + + /// + /// Gets or sets the flow for OAuth2 authentication. + /// + /// The OAuth Flow. + public virtual OAuthFlow? OAuthFlow { get; set; } + + {{/hasOAuthMethods}} + {{/useRestSharp}} + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// Whatever you set here will be prepended to the value defined in AddApiKey. + /// + /// An example invocation here might be: + /// + /// ApiKeyPrefix["Authorization"] = "Bearer"; + /// + /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. + /// + /// + /// OAuth2 workflows should set tokens via AccessToken. + /// + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + {{#servers.0}} + + /// + /// Gets or sets the servers. + /// + /// The servers. + public virtual IList> Servers + { + get { return _servers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Servers may not be null."); + } + _servers = value; + } + } + + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + + /// + /// Returns URL based on server settings without providing values + /// for the variables + /// + /// Array index of the server settings. + /// The server URL. + public string GetServerUrl(int index) + { + return GetServerUrl(Servers, index, null); + } + + /// + /// Returns URL based on server settings. + /// + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + public string GetServerUrl(int index, Dictionary inputVariables) + { + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) + { + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); + } + + if (inputVariables == null) + { + inputVariables = new Dictionary(); + } + + IReadOnlyDictionary server = servers[index]; + string url = (string)server["url"]; + + if (server.ContainsKey("variables")) + { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { + + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + + if (inputVariables.ContainsKey(variable.Key)) + { + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } + } + else + { + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + } + } + } + + return url; + } + {{/servers.0}} + {{#hasHttpSignatureMethods}} + + /// + /// Gets and Sets the HttpSigningConfiguration + /// + public HttpSigningConfiguration HttpSigningConfiguration + { + get { return _HttpSigningConfiguration; } + set { _HttpSigningConfiguration = value; } + } + {{/hasHttpSignatureMethods}} + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } + + #endregion Properties + + #region Methods + + /// + /// Returns a string with essential information for debugging. + /// + public static string ToDebugReport() + { + string report = "C# SDK ({{{packageName}}}) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: {{{version}}}\n"; + report += " SDK Package Version: {{{packageVersion}}}\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + + #region Static Members + /// + /// Merge configurations. + /// + /// First configuration. + /// Second configuration. + /// Merged configuration. + public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) + { + if (second == null) return first ?? GlobalConfiguration.Instance; + + Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + + foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; + foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; + foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; + + var config = new Configuration + { + ApiKey = apiKey, + ApiKeyPrefix = apiKeyPrefix, + DefaultHeaders = defaultHeaders, + BasePath = second.BasePath ?? first.BasePath, + Timeout = second.Timeout, + Proxy = second.Proxy ?? first.Proxy, + UserAgent = second.UserAgent ?? first.UserAgent, + Username = second.Username ?? first.Username, + Password = second.Password ?? first.Password, + AccessToken = second.AccessToken ?? first.AccessToken, + {{#useRestSharp}} + {{#hasOAuthMethods}} + OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, + OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, + OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, + {{/hasOAuthMethods}} + {{/useRestSharp}} + {{#hasHttpSignatureMethods}} + HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, + {{/hasHttpSignatureMethods}} + TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, + }; + return config; + } + #endregion Static Members + } +} diff --git a/sdks/dotnet/templates/Entry.cs b/sdks/dotnet/templates/Entry.cs new file mode 100644 index 000000000..b642a7ff1 --- /dev/null +++ b/sdks/dotnet/templates/Entry.cs @@ -0,0 +1,8 @@ +namespace Dropbox.SignSandbox; + +public class Entry +{ + public static void Main() + { + } +} diff --git a/sdks/dotnet/templates/HttpSigningConfiguration.mustache b/sdks/dotnet/templates/HttpSigningConfiguration.mustache index faca67594..97b855dc5 100644 --- a/sdks/dotnet/templates/HttpSigningConfiguration.mustache +++ b/sdks/dotnet/templates/HttpSigningConfiguration.mustache @@ -133,16 +133,18 @@ namespace {{packageName}}.Client foreach (var parameter in requestOptions.QueryParameters) { #if (NETCOREAPP) + string framework = RuntimeInformation.FrameworkDescription; + string key = framework.StartsWith(".NET 9")?parameter.Key:HttpUtility.UrlEncode(parameter.Key); if (parameter.Value.Count > 1) { // array foreach (var value in parameter.Value) { - httpValues.Add(HttpUtility.UrlEncode(parameter.Key) + "[]", value); + httpValues.Add(key + "[]", value); } } else { - httpValues.Add(HttpUtility.UrlEncode(parameter.Key), parameter.Value[0]); + httpValues.Add(key, parameter.Value[0]); } #else if (parameter.Value.Count > 1) @@ -389,7 +391,7 @@ namespace {{packageName}}.Client } /// - /// Convert ANS1 format to DER format. Not recommended to use because it generate inavlid signature occationally. + /// Convert ANS1 format to DER format. Not recommended to use because it generate invalid signature occasionally. /// /// /// diff --git a/sdks/dotnet/templates/IReadableConfiguration.mustache b/sdks/dotnet/templates/IReadableConfiguration.mustache index 5981728b4..6712aa632 100644 --- a/sdks/dotnet/templates/IReadableConfiguration.mustache +++ b/sdks/dotnet/templates/IReadableConfiguration.mustache @@ -101,10 +101,10 @@ namespace {{packageName}}.Client string TempFolderPath { get; } /// - /// Gets the HTTP connection timeout (in milliseconds) + /// Gets the HTTP connection timeout. /// /// HTTP connection timeout. - int Timeout { get; } + TimeSpan Timeout { get; } /// /// Gets the proxy. diff --git a/sdks/dotnet/templates/IReadableConfiguration.v790.mustache b/sdks/dotnet/templates/IReadableConfiguration.v790.mustache new file mode 100644 index 000000000..5981728b4 --- /dev/null +++ b/sdks/dotnet/templates/IReadableConfiguration.v790.mustache @@ -0,0 +1,178 @@ +{{>partial_header}} + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Security; +using System.Security.Cryptography.X509Certificates; +{{#useRestSharp}} +{{#hasOAuthMethods}}using {{packageName}}.Client.Auth; +{{/hasOAuthMethods}} +{{/useRestSharp}} + +namespace {{packageName}}.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + {{#useRestSharp}} + {{#hasOAuthMethods}} + /// + /// Gets the OAuth token URL. + /// + /// OAuth Token URL. + string OAuthTokenUrl { get; } + + /// + /// Gets the OAuth client ID. + /// + /// OAuth Client ID. + string OAuthClientId { get; } + + /// + /// Gets the OAuth client secret. + /// + /// OAuth Client Secret. + string OAuthClientSecret { get; } + + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string{{nrt?}} OAuthScope { get; } + + /// + /// Gets the OAuth flow. + /// + /// OAuth Flow. + OAuthFlow? OAuthFlow { get; } + + {{/hasOAuthMethods}} + {{/useRestSharp}} + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time format. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + [Obsolete("Use DefaultHeaders instead.")] + IDictionary DefaultHeader { get; } + + /// + /// Gets the default headers. + /// + /// Default headers. + IDictionary DefaultHeaders { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the proxy. + /// + /// Proxy. + WebProxy Proxy { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + + /// + /// Gets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + X509CertificateCollection ClientCertificates { get; } + {{#hasHttpSignatureMethods}} + + /// + /// Gets the HttpSigning configuration + /// + HttpSigningConfiguration HttpSigningConfiguration { get; } + {{/hasHttpSignatureMethods}} + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } + } +} diff --git a/sdks/dotnet/templates/README.mustache b/sdks/dotnet/templates/README.mustache index f70a5dae2..7455a8f95 100644 --- a/sdks/dotnet/templates/README.mustache +++ b/sdks/dotnet/templates/README.mustache @@ -67,7 +67,7 @@ this command. ## Dependencies {{#useRestSharp}} -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 112.0.0 or later {{/useRestSharp}} - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later diff --git a/sdks/dotnet/templates/Solution.mustache b/sdks/dotnet/templates/Solution.mustache index f5589670a..268f8c7f8 100644 --- a/sdks/dotnet/templates/Solution.mustache +++ b/sdks/dotnet/templates/Solution.mustache @@ -2,14 +2,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio {{^netStandard}}2012{{/netStandard}}{{#netStandard}}14{{/netStandard}} VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14.0.25420.1{{/netStandard}} MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}} -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" -EndProject {{^useCustomTemplateCode}} -{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "{{sourceFolder}}\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" +EndProject +{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "{{sourceFolder}}\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject {{/excludeTests}}Global {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dropbox.Sign.Test", "src\Dropbox.Sign.Test\Dropbox.Sign.Test.csproj", "{C305EB17-93FE-4BDA-89A4-120BD8C8A88A}" EndProject Global diff --git a/sdks/dotnet/templates/api.mustache b/sdks/dotnet/templates/api.mustache index 632833ab9..c0b29af2e 100644 --- a/sdks/dotnet/templates/api.mustache +++ b/sdks/dotnet/templates/api.mustache @@ -317,6 +317,7 @@ namespace {{packageName}}.{{apiPackage}} {{^useCustomTemplateCode}} var localVarContentType = {{packageName}}.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarMultipartFormData = localVarContentType == "multipart/form-data"; {{/useCustomTemplateCode}} if (localVarContentType != null) { @@ -403,7 +404,7 @@ namespace {{packageName}}.{{apiPackage}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{#isPrimitiveType}}{{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}){{/isPrimitiveType}}{{^isPrimitiveType}}localVarMultipartFormData ? {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}) : {{packageName}}.Client.ClientUtils.Serialize({{paramName}}){{/isPrimitiveType}}); // form parameter {{/isFile}} {{/required}} {{^required}} @@ -425,7 +426,7 @@ namespace {{packageName}}.{{apiPackage}} {{/isArray}} {{/isFile}} {{^isFile}} - localVarRequestOptions.FormParameters.Add("{{baseName}}", {{packageName}}.Client.ClientUtils.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}})); // form parameter + localVarRequestOptions.FormParameters.Add("{{baseName}}", {{#isPrimitiveType}}{{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}){{/isPrimitiveType}}{{^isPrimitiveType}}localVarMultipartFormData ? {{packageName}}.Client.ClientUtils.ParameterToString({{paramName}}) : {{packageName}}.Client.ClientUtils.Serialize({{paramName}}){{/isPrimitiveType}}); // form parameter {{/isFile}} } {{/required}} diff --git a/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache b/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache index d71f262a8..111270ebf 100644 --- a/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache +++ b/sdks/dotnet/templates/auth/OAuthAuthenticator.mustache @@ -11,8 +11,25 @@ namespace {{packageName}}.Client.Auth /// /// An authenticator for OAuth2 authentication flows /// - public class OAuthAuthenticator : AuthenticatorBase + public class OAuthAuthenticator : IAuthenticator { + private TokenResponse{{nrt?}} _token; + + /// + /// Returns the current authentication token. Can return null if there is no authentication token, or it has expired. + /// + public string{{nrt?}} Token + { + get + { + if (_token == null) return null; + if (_token.ExpiresIn == null) return _token.AccessToken; + if (_token.ExpiresAt < DateTime.Now) return null; + + return _token.AccessToken; + } + } + readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; @@ -31,7 +48,7 @@ namespace {{packageName}}.Client.Auth string{{nrt?}} scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, - IReadableConfiguration configuration) : base("") + IReadableConfiguration configuration) { _tokenUrl = tokenUrl; _clientId = clientId; @@ -62,9 +79,13 @@ namespace {{packageName}}.Client.Auth /// /// Creates an authentication parameter from an access token. /// - /// Access token to create a parameter from. /// An authentication parameter. - protected override async ValueTask GetAuthenticationParameter(string accessToken) +{{^useCustomTemplateCode}} + protected async ValueTask GetAuthenticationParameter() +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} + protected async ValueTask GetAuthenticationParameter(string accessToken) +{{/useCustomTemplateCode}} { var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; return new HeaderParameter(KnownHeaders.Authorization, token); @@ -76,31 +97,45 @@ namespace {{packageName}}.Client.Auth /// An authentication token. async Task GetToken() { - var client = new RestClient(_tokenUrl, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); - - var request = new RestRequest() - .AddParameter("grant_type", _grantType) - .AddParameter("client_id", _clientId) - .AddParameter("client_secret", _clientSecret); + var client = new RestClient(_tokenUrl, configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); + var request = new RestRequest(); + if (!string.IsNullOrWhiteSpace(_token?.RefreshToken)) + { + request.AddParameter("grant_type", "refresh_token") + .AddParameter("refresh_token", _token.RefreshToken); + } + else + { + request + .AddParameter("grant_type", _grantType) + .AddParameter("client_id", _clientId) + .AddParameter("client_secret", _clientSecret); + } if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } - - var response = await client.PostAsync(request).ConfigureAwait(false); - + _token = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. - switch (response.TokenType?.ToLower()) + switch (_token?.TokenType?.ToLower()) { case "bearer": - return $"Bearer {response.AccessToken}"; + return $"Bearer {_token.AccessToken}"; default: - return $"{response.TokenType} {response.AccessToken}"; + return $"{_token?.TokenType} {_token?.AccessToken}"; } } + + /// + /// Retrieves the authentication token (creating a new one if necessary) and adds it to the current request + /// + /// + /// + /// + public async ValueTask Authenticate(IRestClient client, RestRequest request) + => request.AddOrUpdateParameter(await GetAuthenticationParameter().ConfigureAwait(false)); } } diff --git a/sdks/dotnet/templates/auth/TokenResponse.mustache b/sdks/dotnet/templates/auth/TokenResponse.mustache index f118b97a9..7a72e04c1 100644 --- a/sdks/dotnet/templates/auth/TokenResponse.mustache +++ b/sdks/dotnet/templates/auth/TokenResponse.mustache @@ -1,5 +1,6 @@ {{>partial_header}} +using System; using Newtonsoft.Json; namespace {{packageName}}.Client.Auth @@ -10,5 +11,14 @@ namespace {{packageName}}.Client.Auth public string TokenType { get; set; } [JsonProperty("access_token")] public string AccessToken { get; set; } + [JsonProperty("expires_in")] + public int? ExpiresIn { get; set; } + [JsonProperty("created")] + public DateTime? Created { get; set; } + + [JsonProperty("refresh_token")] + public string{{nrt?}} RefreshToken { get; set; } + + public DateTime? ExpiresAt => ExpiresIn == null ? null : Created?.AddSeconds(ExpiresIn.Value); } } \ No newline at end of file diff --git a/sdks/dotnet/templates/gitignore.mustache b/sdks/dotnet/templates/gitignore.mustache index a41122f00..da28f4ecd 100644 --- a/sdks/dotnet/templates/gitignore.mustache +++ b/sdks/dotnet/templates/gitignore.mustache @@ -364,6 +364,8 @@ MigrationBackup/ FodyWeavers.xsd {{#useCustomTemplateCode}} +git_push.sh +global.json vendor /api .openapi-generator diff --git a/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache b/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache index 3292a1e86..c71bc79b9 100644 --- a/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ApiTestsBase.mustache @@ -31,7 +31,7 @@ namespace {{packageName}}.Test.{{apiPackage}} {{#lambda.trimTrailingWithNewLine}} {{#apiKeyMethods}} string apiKeyTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken{{-index}}); {{/apiKeyMethods}} diff --git a/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache b/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache index 269d20c4d..357d2197c 100644 --- a/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ClientUtils.mustache @@ -12,7 +12,11 @@ using System.Text; using System.Text.Json; using System.Text.RegularExpressions;{{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} +{{#models}} +{{#-first}} using {{packageName}}.{{modelPackage}}; +{{/-first}} +{{/models}} using System.Runtime.CompilerServices; {{>Assembly}}namespace {{packageName}}.{{clientPackage}} @@ -20,7 +24,7 @@ using System.Runtime.CompilerServices; /// /// Utility functions providing some benefit to API client consumers. /// - {{>visibility}} static class ClientUtils + {{>visibility}} static {{#net70OrLater}}partial {{/net70OrLater}}class ClientUtils { {{#useCompareNetObjects}} /// @@ -60,7 +64,7 @@ using System.Runtime.CompilerServices; /// /// The {{keyParamName}} header /// - {{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}{{^-last}},{{/-last}} + {{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}{{^-last}},{{/-last}} {{/apiKeyMethods}} } @@ -76,7 +80,7 @@ using System.Runtime.CompilerServices; return value switch { {{#apiKeyMethods}} - ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}} => "{{keyParamName}}", + ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}} => "{{keyParamName}}", {{/apiKeyMethods}} _ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)), }; @@ -85,7 +89,7 @@ using System.Runtime.CompilerServices; switch(value) { {{#apiKeyMethods}} - case ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}: + case ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}: return "{{keyParamName}}"; {{/apiKeyMethods}} default: @@ -139,17 +143,6 @@ using System.Runtime.CompilerServices; } } - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - return match.Success ? match.Groups[1].Value : filename; - } - /// /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". @@ -172,6 +165,10 @@ using System.Runtime.CompilerServices; // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString(format); + {{#net60OrLater}} + if (obj is DateOnly dateOnly) + return dateOnly.ToString(format); + {{/net60OrLater}} if (obj is bool boolean) return boolean ? "true" @@ -317,7 +314,13 @@ using System.Runtime.CompilerServices; /// /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + {{#net70OrLater}} + [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] + private static partial Regex JsonRegex(); + {{/net70OrLater}} + {{^net70OrLater}} + private static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + {{/net70OrLater}} /// /// Check if the given MIME is a JSON MIME. @@ -333,7 +336,7 @@ using System.Runtime.CompilerServices; { if (string.IsNullOrWhiteSpace(mime)) return false; - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); + return {{#net70OrLater}}JsonRegex(){{/net70OrLater}}{{^net70OrLater}}JsonRegex{{/net70OrLater}}.IsMatch(mime) || mime.Equals("application/json-patch+json"); } /// diff --git a/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache b/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache index aadf2c731..6085b51e5 100644 --- a/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache +++ b/sdks/dotnet/templates/libraries/generichost/DependencyInjectionTests.mustache @@ -21,7 +21,7 @@ namespace {{packageName}}.Test.{{apiPackage}} { {{#lambda.trimTrailingWithNewLine}} {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken{{-index}}); {{/apiKeyMethods}} @@ -55,7 +55,7 @@ namespace {{packageName}}.Test.{{apiPackage}} { {{#lambda.trimTrailingWithNewLine}} {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken{{-index}}); {{/apiKeyMethods}} @@ -92,7 +92,7 @@ namespace {{packageName}}.Test.{{apiPackage}} { {{#lambda.trimTrailingWithNewLine}} {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken{{-index}}); {{/apiKeyMethods}} @@ -129,7 +129,7 @@ namespace {{packageName}}.Test.{{apiPackage}} { {{#lambda.trimTrailingWithNewLine}} {{#apiKeyMethods}} - ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{keyParamName}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken{{-index}}); {{/apiKeyMethods}} diff --git a/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache b/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache index 016ef7c69..b74fcfa0a 100644 --- a/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ExceptionEventArgs.mustache @@ -13,7 +13,7 @@ namespace {{packageName}}.{{clientPackage}} public Exception Exception { get; } /// - /// The ExcepetionEventArgs + /// The ExceptionEventArgs /// /// public ExceptionEventArgs(Exception exception) diff --git a/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache b/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache index d7d1e3bf3..1333f0e67 100644 --- a/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache +++ b/sdks/dotnet/templates/libraries/generichost/HostConfiguration.mustache @@ -11,7 +11,11 @@ using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; using {{packageName}}.{{apiPackage}}; +{{#models}} +{{#-first}} using {{packageName}}.{{modelPackage}}; +{{/-first}} +{{/models}} namespace {{packageName}}.{{clientPackage}} { diff --git a/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache b/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache index 5e0f7739d..357626fcc 100644 --- a/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache +++ b/sdks/dotnet/templates/libraries/generichost/HttpSigningConfiguration.mustache @@ -65,7 +65,7 @@ namespace {{packageName}}.{{clientPackage}} public string SigningAlgorithm { get; set; } /// - /// Gets the Signature validaty period in seconds + /// Gets the Signature validity period in seconds /// public int SignatureValidityPeriod { get; set; } diff --git a/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache b/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache index 189acfd74..0ff2753e3 100644 --- a/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache +++ b/sdks/dotnet/templates/libraries/generichost/JsonConverter.mustache @@ -51,7 +51,7 @@ {{/-first}} if (discriminator != null && discriminator.Equals("{{name}}")) - return JsonSerializer.Deserialize<{{{name}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + return JsonSerializer.Deserialize<{{{classname}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); {{/children}} {{/discriminator}} @@ -342,13 +342,13 @@ public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) { {{#lambda.trimLineBreaks}} - {{#lambda.copy}} + {{#lambda.copyText}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copy}} + {{/lambda.copyText}} {{#discriminator}} {{#children}} - if ({{#lambda.pasteLine}}{{/lambda.pasteLine}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ - JsonSerializer.Serialize<{{{name}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + if ({{#lambda.paste}}{{/lambda.paste}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ + JsonSerializer.Serialize<{{{classname}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); return; } @@ -439,7 +439,7 @@ {{#isDiscriminator}} {{^model.composedSchemas.anyOf}} {{^model.composedSchemas.oneOf}} - writer.WriteString("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}{{/isNew}}); + writer.WriteString("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}); {{/model.composedSchemas.oneOf}} {{/model.composedSchemas.anyOf}} @@ -449,9 +449,9 @@ {{^isMap}} {{^isEnum}} {{^isUuid}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} @@ -460,44 +460,44 @@ {{/isMap}} {{/isString}} {{#isBoolean}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} {{/isBoolean}} {{^isEnum}} {{#isNumeric}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} {{/isNumeric}} {{/isEnum}} {{#isDate}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} {{/isDate}} {{#isDateTime}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} {{/isDateTime}} {{#isEnum}} {{#isNumeric}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} @@ -519,9 +519,9 @@ {{/isNullable}} {{/isInnerEnum}} {{^isInnerEnum}} - {{#lambda.copy}} + {{#lambda.copyText}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copy}} + {{/lambda.copyText}} {{#required}} {{#isNullable}} if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) @@ -533,7 +533,7 @@ {{#enumVars}} {{#-first}} {{#isString}} - if ({{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} + if ({{#lambda.paste}}{{/lambda.paste}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); else writer.WriteNull("{{baseName}}"); @@ -552,10 +552,10 @@ {{#enumVars}} {{#-first}} {{^isNumeric}} - writer.WriteString("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + writer.WriteString("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); {{/isNumeric}} {{#isNumeric}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.camelcase_sanitize_param}}RawValue); + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.paste}}{{/lambda.paste}}{{/lambda.camelcase_sanitize_param}}RawValue); {{/isNumeric}} {{/-first}} {{/enumVars}} @@ -568,16 +568,16 @@ {{#isNullable}} if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option{{nrt!}}.Value != null) { - var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); } else writer.WriteNull("{{baseName}}"); {{/isNullable}} {{^isNullable}} { - var {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.pasteLine}}{{/lambda.pasteLine}}RawValue); + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); } {{/isNullable}} {{/required}} @@ -586,9 +586,9 @@ {{/isMap}} {{/isEnum}} {{#isUuid}} - {{#lambda.copy}} + {{#lambda.copyText}} writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copy}} + {{/lambda.copyText}} {{#lambda.indent3}} {{>WriteProperty}} {{/lambda.indent3}} diff --git a/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache b/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache index 7af8e0760..a1a9fa976 100644 --- a/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache +++ b/sdks/dotnet/templates/libraries/generichost/OnErrorDefaultImplementation.mustache @@ -1,2 +1,2 @@ - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while sending the request to the server."); \ No newline at end of file + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache b/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache index 857a505ab..bafe525c0 100644 --- a/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache +++ b/sdks/dotnet/templates/libraries/generichost/RateLimitProvider`1.mustache @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Channels; namespace {{packageName}}.{{clientPackage}} { @@ -17,7 +16,7 @@ namespace {{packageName}}.{{clientPackage}} /// {{>visibility}} class RateLimitProvider : TokenProvider where TTokenBase : TokenBase { - internal Dictionary> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary>{{/net70OrLater}}(); + internal Dictionary> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary>{{/net70OrLater}}(); /// /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. @@ -29,12 +28,12 @@ namespace {{packageName}}.{{clientPackage}} token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); {{#lambda.copy}} - BoundedChannelOptions options = new BoundedChannelOptions(_tokens.Length) + global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(_tokens.Length) { - FullMode = BoundedChannelFullMode.DropWrite + FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite }; - AvailableTokens.Add(string.Empty, Channel.CreateBounded(options)); + AvailableTokens.Add(string.Empty, global::System.Threading.Channels.Channel.CreateBounded(options)); {{/lambda.copy}} {{#hasApiKeyMethods}} if (container is TokenContainer apiKeyTokenContainer) @@ -43,31 +42,35 @@ namespace {{packageName}}.{{clientPackage}} foreach (string header in headers) { - BoundedChannelOptions options = new BoundedChannelOptions(apiKeyTokenContainer.Tokens.Count(t => ClientUtils.ApiKeyHeaderToString(t.Header).Equals(header))) + global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(apiKeyTokenContainer.Tokens.Count(t => ClientUtils.ApiKeyHeaderToString(t.Header).Equals(header))) { - FullMode = BoundedChannelFullMode.DropWrite + FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite }; - AvailableTokens.Add(header, Channel.CreateBounded(options)); + AvailableTokens.Add(header, global::System.Threading.Channels.Channel.CreateBounded(options)); } } else { - {{#lambda.indent1}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/lambda.indent1}} + {{#lambda.indentAll1}} + {{#lambda.paste}} + {{/lambda.paste}} + {{/lambda.indentAll1}} } {{/hasApiKeyMethods}} {{^hasApiKeyMethods}} - {{#lambda.pasteLine}}{{/lambda.pasteLine}} + {{#lambda.paste}} + {{/lambda.paste}} {{/hasApiKeyMethods}} - foreach(Channel tokens in AvailableTokens.Values) + foreach(global::System.Threading.Channels.Channel tokens in AvailableTokens.Values) for (int i = 0; i < _tokens.Length; i++) _tokens[i].TokenBecameAvailable += ((sender) => tokens.Writer.TryWrite((TTokenBase) sender)); } internal override async System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) { - if (!AvailableTokens.TryGetValue(header, out Channel{{nrt?}} tokens)) + if (!AvailableTokens.TryGetValue(header, out global::System.Threading.Channels.Channel{{nrt?}} tokens)) throw new KeyNotFoundException($"Could not locate a token for header '{header}'."); return await tokens.Reader.ReadAsync(cancellation).ConfigureAwait(false); diff --git a/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache b/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache index 78aba8fb3..8918b8cf4 100644 --- a/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache +++ b/sdks/dotnet/templates/libraries/generichost/ValidateRegex.mustache @@ -1,7 +1,7 @@ // {{{name}}} ({{{dataType}}}) pattern Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); {{#lambda.copy}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null && {{/lambda.copy}} -if ({{#lambda.first}}{{^required}}{{#lambda.pasteLine}}{{/lambda.pasteLine}} {{/required}}{{#isNullable}}{{#lambda.pasteLine}}{{/lambda.pasteLine}}{{/isNullable}}{{/lambda.first}}!regex{{{name}}}.Match(this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}}{{#isUuid}}.ToString(){{#lambda.first}}{{^required}}{{nrt!}} {{/required}}{{#isNullable}}! {{/isNullable}}{{/lambda.first}}{{/isUuid}}).Success) +if ({{#lambda.first}}{{^required}}{{#lambda.paste}}{{/lambda.paste}} {{/required}}{{#isNullable}}{{#lambda.paste}}{{/lambda.paste}}{{/isNullable}}{{/lambda.first}}!regex{{{name}}}.Match(this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}}{{#isUuid}}.ToString(){{#lambda.first}}{{^required}}{{nrt!}} {{/required}}{{#isNullable}}! {{/isNullable}}{{/lambda.first}}{{/isUuid}}).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); } \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache b/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache index 183946cf7..616993bce 100644 --- a/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache +++ b/sdks/dotnet/templates/libraries/generichost/WritePropertyHelper.mustache @@ -1,9 +1,10 @@ {{#isNullable}} if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null) - {{#lambda.pasteLine}}{{/lambda.pasteLine}} + {{#lambda.paste}}{{/lambda.paste}} else writer.WriteNull("{{baseName}}"); {{/isNullable}} {{^isNullable}} -{{#lambda.pasteLine}}{{/lambda.pasteLine}} +{{#lambda.paste}} +{{/lambda.paste}} {{/isNullable}} \ No newline at end of file diff --git a/sdks/dotnet/templates/libraries/generichost/api.mustache b/sdks/dotnet/templates/libraries/generichost/api.mustache index 8c02da8f1..b33115f0a 100644 --- a/sdks/dotnet/templates/libraries/generichost/api.mustache +++ b/sdks/dotnet/templates/libraries/generichost/api.mustache @@ -85,6 +85,7 @@ namespace {{packageName}}.{{apiPackage}} {{/operation}} } {{#operation}} + {{^vendorExtensions.x-duplicates}} {{#responses}} {{#-first}} @@ -115,6 +116,7 @@ namespace {{packageName}}.{{apiPackage}} } {{/-first}} {{/responses}} + {{/vendorExtensions.x-duplicates}} {{/operation}} /// @@ -134,7 +136,7 @@ namespace {{packageName}}.{{apiPackage}} /// public event EventHandler{{nrt?}} OnError{{operationId}}; - internal void ExecuteOn{{operationId}}({{classname}}.{{operationId}}ApiResponse apiResponse) + internal void ExecuteOn{{operationId}}({{#vendorExtensions.x-duplicates}}{{.}}{{/vendorExtensions.x-duplicates}}{{^vendorExtensions.x-duplicates}}{{classname}}{{/vendorExtensions.x-duplicates}}.{{operationId}}ApiResponse apiResponse) { On{{operationId}}?.Invoke(this, new ApiResponseEventArgs(apiResponse)); } @@ -303,30 +305,30 @@ namespace {{packageName}}.{{apiPackage}} /// /// Logs exceptions that occur while retrieving the server response /// - /// - /// - /// + /// + /// + /// {{#allParams}} /// {{/allParams}} - private void OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) + private void OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}Exception exceptionLocalVar string pathFormatLocalVar string pathLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) { - bool suppressDefaultLog = false; - OnError{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog exception pathFormat path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + bool suppressDefaultLogLocalVar = false; + OnError{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLogLocalVar exceptionLocalVar pathFormatLocalVar pathLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); {{>OnErrorDefaultImplementation}} } /// /// A partial method that gives developers a way to provide customized exception handling /// - /// - /// - /// - /// + /// + /// + /// + /// {{#allParams}} /// {{/allParams}} - partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLogLocalVar Exception exceptionLocalVar string pathFormatLocalVar string pathLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); /// /// {{summary}} {{notes}} @@ -380,7 +382,7 @@ namespace {{packageName}}.{{apiPackage}} uriBuilderLocalVar.Host = HttpClient.BaseAddress{{nrt!}}.Host; uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "{{path}}"; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "{{{path}}}"; {{/servers}} {{#servers}} {{#-first}} @@ -619,9 +621,9 @@ namespace {{packageName}}.{{apiPackage}} { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - ILogger<{{operationId}}ApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<{{operationId}}ApiResponse>(); + ILogger<{{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<{{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse>(); - {{operationId}}ApiResponse apiResponseLocalVar = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, _jsonSerializerOptions); + {{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse apiResponseLocalVar = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{{path}}}", requestedAtLocalVar, _jsonSerializerOptions); After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); @@ -674,12 +676,13 @@ namespace {{packageName}}.{{apiPackage}} } catch(Exception e) { - OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}e "{{path}}" uriBuilderLocalVar.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}e "{{{path}}}" uriBuilderLocalVar.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); Events.ExecuteOnError{{operationId}}(e); throw; } {{/lambda.trimLineBreaks}} } + {{^vendorExtensions.x-duplicates}} {{#responses}} {{#-first}} @@ -792,6 +795,7 @@ namespace {{packageName}}.{{apiPackage}} } {{/-first}} {{/responses}} + {{/vendorExtensions.x-duplicates}} {{/operation}} } {{/operations}} diff --git a/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache b/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache index 6bf210bbc..04fb37138 100644 --- a/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache +++ b/sdks/dotnet/templates/libraries/generichost/modelGeneric.mustache @@ -34,6 +34,13 @@ {{/isNew}} {{/isInherited}} {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} {{/allVars}} OnCreated(); } @@ -71,6 +78,13 @@ {{/isNew}} {{/isInherited}} {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} {{/allVars}} OnCreated(); } @@ -109,7 +123,7 @@ /// {{.}} {{/description}} {{#example}} - /// {{.}} + /* {{.}} */ {{/example}} [JsonPropertyName("{{baseName}}")] {{#deprecated}} @@ -136,7 +150,7 @@ /// {{#description}} /// {{.}}{{/description}} {{#example}} - /// {{.}} + /* {{.}} */ {{/example}} {{#deprecated}} [Obsolete] @@ -152,7 +166,7 @@ /// {{#description}} /// {{.}}{{/description}} {{#example}} - /// {{.}} + /* {{.}} */ {{/example}} {{#deprecated}} [Obsolete] @@ -162,7 +176,7 @@ {{/vendorExtensions.x-duplicated-data-type}} {{/composedSchemas.oneOf}} {{#allVars}} - {{#isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} {{^model.composedSchemas.anyOf}} {{^model.composedSchemas.oneOf}} /// @@ -170,12 +184,12 @@ /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } = {{^isNew}}"{{classname}}"{{/isNew}}{{#isNew}}{{^isEnum}}"{{classname}}"{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), "{{classname}}"){{/isEnum}}{{/isNew}}; + public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } {{/model.composedSchemas.oneOf}} {{/model.composedSchemas.anyOf}} - {{/isDiscriminator}} - {{^isDiscriminator}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{^vendorExtensions.x-is-base-or-new-discriminator}} {{^isEnum}} {{#isInherited}} {{#isNew}} @@ -193,7 +207,7 @@ /// {{#description}} /// {{.}}{{/description}} {{#example}} - /// {{.}} + /* {{.}} */ {{/example}} [JsonPropertyName("{{baseName}}")] {{#deprecated}} @@ -218,7 +232,7 @@ /// {{#description}} /// {{.}}{{/description}} {{#example}} - /// {{.}} + /* {{.}} */ {{/example}} [JsonPropertyName("{{baseName}}")] {{#deprecated}} @@ -228,7 +242,7 @@ {{/isInherited}} {{/isEnum}} - {{/isDiscriminator}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} {{/allVars}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} @@ -345,15 +359,17 @@ {{/readOnlyVars}} {{#readOnlyVars}} {{#lambda.copy}} - if ({{name}} != null) hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/lambda.copy}} {{#isNullable}} - {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} {{/isNullable}} {{^required}} - {{#lambda.pasteOnce}}{{/lambda.pasteOnce}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} {{/required}} {{/readOnlyVars}} {{#isAdditionalPropertiesTrue}} diff --git a/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache b/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache index cefe6be9f..603284acb 100644 --- a/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache +++ b/sdks/dotnet/templates/libraries/httpclient/ApiClient.mustache @@ -481,7 +481,7 @@ namespace {{packageName}}.Client try { - if (configuration.Timeout > 0) + if (configuration.Timeout > TimeSpan.Zero) { timeoutTokenSource = new CancellationTokenSource(configuration.Timeout); finalTokenSource = CancellationTokenSource.CreateLinkedTokenSource(finalToken, timeoutTokenSource.Token); diff --git a/sdks/dotnet/templates/modelGeneric.mustache b/sdks/dotnet/templates/modelGeneric.mustache index 7392b272f..5075f0e64 100644 --- a/sdks/dotnet/templates/modelGeneric.mustache +++ b/sdks/dotnet/templates/modelGeneric.mustache @@ -10,7 +10,9 @@ [DataContract(Name = "{{{name}}}")] {{^useUnityWebRequest}} {{#discriminator}} + {{#mappedModels.size}} [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] + {{/mappedModels.size}} {{#mappedModels}} [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] {{/mappedModels}} @@ -46,7 +48,14 @@ /// {{.}} {{/description}} {{#example}} +{{^useCustomTemplateCode}} + /* + {{.}} + */ +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} /// {{.}} +{{/useCustomTemplateCode}} {{/example}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] @@ -290,7 +299,14 @@ /// {{#description}} /// {{.}}{{/description}} {{#example}} +{{^useCustomTemplateCode}} + /* + {{.}} + */ +{{/useCustomTemplateCode}} +{{#useCustomTemplateCode}} /// {{.}} +{{/useCustomTemplateCode}} {{/example}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] diff --git a/sdks/dotnet/templates/netcore_project.mustache b/sdks/dotnet/templates/netcore_project.mustache index 01717e65a..06243449e 100644 --- a/sdks/dotnet/templates/netcore_project.mustache +++ b/sdks/dotnet/templates/netcore_project.mustache @@ -38,21 +38,16 @@ {{/useGenericHost}} {{#useRestSharp}} -{{^useCustomTemplateCode}} - -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -{{/useCustomTemplateCode}} {{/useRestSharp}} {{#useGenericHost}} - - + + {{#supportsRetry}} - + {{/supportsRetry}} {{#net80OrLater}} - + {{/net80OrLater}} {{^net60OrLater}} diff --git a/sdks/dotnet/templates/netcore_testproject.mustache b/sdks/dotnet/templates/netcore_testproject.mustache index 90d11eb82..90434b77e 100644 --- a/sdks/dotnet/templates/netcore_testproject.mustache +++ b/sdks/dotnet/templates/netcore_testproject.mustache @@ -9,9 +9,9 @@ - - - + + + diff --git a/sdks/dotnet/templates/nuspec.mustache b/sdks/dotnet/templates/nuspec.mustache index b473cbd64..680ee2fe4 100644 --- a/sdks/dotnet/templates/nuspec.mustache +++ b/sdks/dotnet/templates/nuspec.mustache @@ -32,12 +32,7 @@ {{#useRestSharp}} -{{^useCustomTemplateCode}} - -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -{{/useCustomTemplateCode}} {{/useRestSharp}} {{#useCompareNetObjects}} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 9d6eaa6cb..addfdd702 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -55,7 +55,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 1.8-dev + 1.8.1-dev compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.8-dev" + implementation "com.dropbox.sign:dropbox-sign:1.8.1-dev" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.8-dev.jar` +- `target/dropbox-sign-1.8.1-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -94,31 +94,41 @@ Please follow the [installation](#installation) instruction and execute the foll ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = accountApi.accountCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountCreate"); System.err.println("Status code: " + e.getCode()); @@ -178,7 +188,7 @@ Class | Method | HTTP request | Description *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* | [**faxFiles**](docs/FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 @@ -197,6 +207,10 @@ Class | Method | HTTP request | Description *SignatureRequestApi* | [**signatureRequestCancel**](docs/SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](docs/SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +*SignatureRequestApi* | [**signatureRequestEdit**](docs/SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +*SignatureRequestApi* | [**signatureRequestEditEmbedded**](docs/SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +*SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +*SignatureRequestApi* | [**signatureRequestEditWithTemplate**](docs/SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template *SignatureRequestApi* | [**signatureRequestFiles**](docs/SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](docs/SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](docs/SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -300,6 +314,10 @@ Class | Method | HTTP request | Description - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) @@ -459,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.8-dev` + - Package version: `1.8.1-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v1/VERSION b/sdks/java-v1/VERSION index d82db9132..00f91b858 100644 --- a/sdks/java-v1/VERSION +++ b/sdks/java-v1/VERSION @@ -1 +1 @@ -1.8-dev +1.8.1-dev diff --git a/sdks/java-v1/bin/copy-constants.php b/sdks/java-v1/bin/copy-constants.php new file mode 100755 index 000000000..70ec3083c --- /dev/null +++ b/sdks/java-v1/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); \ No newline at end of file diff --git a/sdks/java-v1/build.gradle b/sdks/java-v1/build.gradle index e09981d03..ef2920f41 100644 --- a/sdks/java-v1/build.gradle +++ b/sdks/java-v1/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '1.8-dev' +version = '1.8.1-dev' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/sdks/java-v1/build.sbt b/sdks/java-v1/build.sbt index b949b2013..203853da9 100644 --- a/sdks/java-v1/build.sbt +++ b/sdks/java-v1/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "1.8-dev", + version := "1.8.1-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v1/docs/AccountApi.md b/sdks/java-v1/docs/AccountApi.md index 494853dda..e638f559d 100644 --- a/sdks/java-v1/docs/AccountApi.md +++ b/sdks/java-v1/docs/AccountApi.md @@ -22,31 +22,41 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = accountApi.accountCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountCreate"); System.err.println("Status code: " + e.getCode()); @@ -97,30 +107,41 @@ Returns the properties and settings of your Account. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - try { - AccountGetResponse result = accountApi.accountGet(null, "jack@example.com"); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountGet( + null, // accountId + null // emailAddress + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -170,33 +191,44 @@ Updates the properties and settings of your Account. Currently only allows for u ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountUpdateRequest() - .callbackUrl("https://www.example.com/callback"); - - try { - AccountGetResponse result = accountApi.accountUpdate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountUpdateRequest = new AccountUpdateRequest(); + accountUpdateRequest.callbackUrl("https://www.example.com/callback"); + accountUpdateRequest.locale("en-US"); + + try + { + var response = new AccountApi(config).accountUpdate( + accountUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -245,33 +277,43 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountVerifyRequest() - .emailAddress("some_user@dropboxsign.com"); - - try { - AccountVerifyResponse result = accountApi.accountVerify(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountVerifyExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountVerifyRequest = new AccountVerifyRequest(); + accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountVerify( + accountVerifyRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountVerify"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/ApiAppApi.md b/sdks/java-v1/docs/ApiAppApi.md index 02630c9d7..c9e5fd615 100644 --- a/sdks/java-v1/docs/ApiAppApi.md +++ b/sdks/java-v1/docs/ApiAppApi.md @@ -23,50 +23,60 @@ Creates a new API App. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of((SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppCreateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - try { - ApiAppGetResponse result = apiAppApi.apiAppCreate(data); - System.out.println(result); +import java.util.Map; + +public class ApiAppCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppCreateRequest = new ApiAppCreateRequest(); + apiAppCreateRequest.name("My Production App"); + apiAppCreateRequest.domains(List.of ( + "example.com" + )); + apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppCreateRequest.oauth(oauth); + apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppCreate( + apiAppCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -115,30 +125,38 @@ Deletes an API App. Can only be invoked for apps you own. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - apiAppApi.apiAppDelete(clientId); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new ApiAppApi(config).apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -187,32 +205,40 @@ Returns an object with information about an API App. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppGet(clientId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -261,33 +287,41 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var page = 1; - var pageSize = 2; - - try { - ApiAppListResponse result = apiAppApi.apiAppList(page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -337,52 +371,62 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of(SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppUpdateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppUpdate(clientId, data); - System.out.println(result); +import java.util.Map; + +public class ApiAppUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppUpdateRequest = new ApiAppUpdateRequest(); + apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); + apiAppUpdateRequest.name("New Name"); + apiAppUpdateRequest.domains(List.of ( + "example.com" + )); + apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppUpdateRequest.oauth(oauth); + apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/BulkSendJobApi.md b/sdks/java-v1/docs/BulkSendJobApi.md index 5d7335a12..a4b8a3460 100644 --- a/sdks/java-v1/docs/BulkSendJobApi.md +++ b/sdks/java-v1/docs/BulkSendJobApi.md @@ -20,32 +20,42 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - - try { - BulkSendJobGetResponse result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -96,33 +106,41 @@ Returns a list of BulkSendJob that you can access. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var page = 1; - var pageSize = 20; - - try { - BulkSendJobListResponse result = bulkSendJobApi.bulkSendJobList(page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/EmbeddedApi.md b/sdks/java-v1/docs/EmbeddedApi.md index 62955f908..416c319ee 100644 --- a/sdks/java-v1/docs/EmbeddedApi.md +++ b/sdks/java-v1/docs/EmbeddedApi.md @@ -20,38 +20,49 @@ Retrieves an embedded object containing a template url that can be opened in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Main { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var data = new EmbeddedEditUrlRequest() - .ccRoles(List.of("")) - .mergeFields(List.of()); - - var templateId = "5de8179668f2033afac48da1868d0093bf133266"; - - try { - EmbeddedEditUrlResponse result = embeddedApi.embeddedEditUrl(templateId, data); - System.out.println(result); +import java.util.Map; + +public class EmbeddedEditUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var mergeFields = new ArrayList(List.of ()); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); + embeddedEditUrlRequest.ccRoles(List.of ( + "" + )); + embeddedEditUrlRequest.mergeFields(mergeFields); + + try + { + var response = new EmbeddedApi(config).embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -101,32 +112,40 @@ Retrieves an embedded object containing a signature url that can be opened in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - - try { - EmbeddedSignUrlResponse result = embeddedApi.embeddedSignUrl(signatureId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedSignUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new EmbeddedApi(config).embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/FaxApi.md b/sdks/java-v1/docs/FaxApi.md index a3d9baef9..7ee47ff0e 100644 --- a/sdks/java-v1/docs/FaxApi.md +++ b/sdks/java-v1/docs/FaxApi.md @@ -5,7 +5,7 @@ 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 +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 @@ -18,29 +18,42 @@ All URIs are relative to *https://api.hellosign.com/v3* Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; 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"); +import java.util.Map; + +public class FaxDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new FaxApi(config).faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -82,34 +95,45 @@ null (empty response body) > File faxFiles(faxId) -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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"));; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -153,31 +177,44 @@ public class Example { Get Fax -Returns information about fax +Returns information about a Fax ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling FaxApi#faxGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -221,32 +258,45 @@ public class Example { Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling FaxApi#faxList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -262,8 +312,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **page** | **Integer**| Page | [optional] [default to 1] - **pageSize** | **Integer**| Page size | [optional] [default to 20] + **page** | **Integer**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] ### Return type @@ -291,41 +341,56 @@ public class Example { Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; 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); +import java.util.Map; + +public class FaxSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxSendRequest = new FaxSendRequest(); + faxSendRequest.recipient("16690000001"); + faxSendRequest.sender("16690000000"); + faxSendRequest.testMode(true); + faxSendRequest.coverPageTo("Jill Fax"); + faxSendRequest.coverPageFrom("Faxer Faxerson"); + faxSendRequest.coverPageMessage("I'm sending you a fax!"); + faxSendRequest.title("This is what the fax is about!"); + faxSendRequest.files(List.of ( + new File("./example_fax.pdf") + )); + + try + { + var response = new FaxApi(config).faxSend( + faxSendRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/FaxLineAddUserRequest.md b/sdks/java-v1/docs/FaxLineAddUserRequest.md index 1c9e997f9..4023bd024 100644 --- a/sdks/java-v1/docs/FaxLineAddUserRequest.md +++ b/sdks/java-v1/docs/FaxLineAddUserRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | | `accountId` | ```String``` | Account ID | | | `emailAddress` | ```String``` | Email address | | diff --git a/sdks/java-v1/docs/FaxLineApi.md b/sdks/java-v1/docs/FaxLineApi.md index 1997f1f12..79ccf8b93 100644 --- a/sdks/java-v1/docs/FaxLineApi.md +++ b/sdks/java-v1/docs/FaxLineApi.md @@ -25,29 +25,43 @@ Grants a user access to the specified Fax Line. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineAddUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineAddUser(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineAddUserRequest = new FaxLineAddUserRequest(); + faxLineAddUserRequest.number("[FAX_NUMBER]"); + faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineAddUser( + faxLineAddUserRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -91,30 +105,47 @@ public class Example { Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); - System.out.println(result); +import java.util.Map; + +public class FaxLineAreaCodeGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineAreaCodeGet( + "US", // country + null, // state + null, // province + null // city + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -130,10 +161,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **country** | **String**| Filter area codes by country. | [enum: CA, US, UK] - **state** | **String**| Filter area codes by state. | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] - **province** | **String**| Filter area codes by province. | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] - **city** | **String**| Filter area codes by city. | [optional] + **country** | **String**| Filter area codes by country | [enum: CA, US, UK] + **state** | **String**| Filter area codes by state | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] + **province** | **String**| Filter area codes by province | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] + **city** | **String**| Filter area codes by city | [optional] ### Return type @@ -161,34 +192,48 @@ public class Example { Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineCreateRequest() - .areaCode(209) - .country("US"); - - try { - FaxLineResponse result = faxLineApi.faxLineCreate(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineCreateRequest = new FaxLineCreateRequest(); + faxLineCreateRequest.areaCode(209); + faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); + + try + { + var response = new FaxLineApi(config).faxLineCreate( + faxLineCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -237,27 +282,40 @@ Deletes the specified Fax Line from the subscription. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineDeleteRequest() - .number("[FAX_NUMBER]"); - - try { - faxLineApi.faxLineDelete(data); +import java.util.Map; + +public class FaxLineDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineDeleteRequest = new FaxLineDeleteRequest(); + faxLineDeleteRequest.number("[FAX_NUMBER]"); + + try + { + new FaxLineApi(config).faxLineDelete( + faxLineDeleteRequest + ); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -306,25 +364,39 @@ Returns the properties and settings of a Fax Line. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); - System.out.println(result); +import java.util.Map; + +public class FaxLineGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineGet( + "123-123-1234" // number + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -340,7 +412,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **number** | **String**| The Fax Line number. | + **number** | **String**| The Fax Line number | ### Return type @@ -373,25 +445,42 @@ Returns the properties and settings of multiple Fax Lines. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineListResponse result = faxLineApi.faxLineList(); - System.out.println(result); +import java.util.Map; + +public class FaxLineListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + null // showTeamLines + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -408,9 +497,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| **accountId** | **String**| Account ID | [optional] - **page** | **Integer**| Page | [optional] [default to 1] - **pageSize** | **Integer**| Page size | [optional] [default to 20] - **showTeamLines** | **Boolean**| Show team lines | [optional] + **page** | **Integer**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + **showTeamLines** | **Boolean**| Include Fax Lines belonging to team members in the list | [optional] ### Return type @@ -438,34 +527,48 @@ public class Example { Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineRemoveUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineRemoveUser(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); + faxLineRemoveUserRequest.number("[FAX_NUMBER]"); + faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineRemoveUser( + faxLineRemoveUserRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/FaxLineCreateRequest.md b/sdks/java-v1/docs/FaxLineCreateRequest.md index da9ba3953..7fd1be6bf 100644 --- a/sdks/java-v1/docs/FaxLineCreateRequest.md +++ b/sdks/java-v1/docs/FaxLineCreateRequest.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `areaCode`*_required_ | ```Integer``` | Area code | | -| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country | | -| `city` | ```String``` | City | | -| `accountId` | ```String``` | Account ID | | +| `areaCode`*_required_ | ```Integer``` | Area code of the new Fax Line | | +| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country of the area code | | +| `city` | ```String``` | City of the area code | | +| `accountId` | ```String``` | Account ID of the account that will be assigned this new Fax Line | | diff --git a/sdks/java-v1/docs/FaxLineDeleteRequest.md b/sdks/java-v1/docs/FaxLineDeleteRequest.md index de1748fa1..4b45b339f 100644 --- a/sdks/java-v1/docs/FaxLineDeleteRequest.md +++ b/sdks/java-v1/docs/FaxLineDeleteRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | diff --git a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md index 51d81b8fa..8e55d572d 100644 --- a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md +++ b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | -| `accountId` | ```String``` | Account ID | | -| `emailAddress` | ```String``` | Email address | | +| `number`*_required_ | ```String``` | The Fax Line number | | +| `accountId` | ```String``` | Account ID of the user to remove access | | +| `emailAddress` | ```String``` | Email address of the user to remove access | | diff --git a/sdks/java-v1/docs/FaxSendRequest.md b/sdks/java-v1/docs/FaxSendRequest.md index 5b939a0af..65b105756 100644 --- a/sdks/java-v1/docs/FaxSendRequest.md +++ b/sdks/java-v1/docs/FaxSendRequest.md @@ -8,13 +8,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```String``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```List``` | Fax File to Send | | -| `fileUrls` | ```List``` | Fax File URL to Send | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `testMode` | ```Boolean``` | API Test Mode Setting | | -| `coverPageTo` | ```String``` | Fax Cover Page for Recipient | | -| `coverPageFrom` | ```String``` | Fax Cover Page for Sender | | +| `coverPageTo` | ```String``` | Fax cover page recipient information | | +| `coverPageFrom` | ```String``` | Fax cover page sender information | | | `coverPageMessage` | ```String``` | Fax Cover Page Message | | | `title` | ```String``` | Fax Title | | diff --git a/sdks/java-v1/docs/OAuthApi.md b/sdks/java-v1/docs/OAuthApi.md index a2eaa2508..aab2b9456 100644 --- a/sdks/java-v1/docs/OAuthApi.md +++ b/sdks/java-v1/docs/OAuthApi.md @@ -20,29 +20,45 @@ Once you have retrieved the code from the user callback, you will need to exchan ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenGenerateRequest() - .state("900e06e2") - .code("1b0d28d90c86c141") - .clientId("cc91c61d00f8bb2ece1428035716b") - .clientSecret("1d14434088507ffa390e6f5528465"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenGenerate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenGenerateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); + oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); + oAuthTokenGenerateRequest.state("900e06e2"); + oAuthTokenGenerateRequest.grantType("authorization_code"); + + try + { + var response = new OAuthApi(config).oauthTokenGenerate( + oAuthTokenGenerateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -91,26 +107,42 @@ Access tokens are only valid for a given period of time (typically one hour) for ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenRefreshRequest() - .refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenRefresh(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenRefreshExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); + oAuthTokenRefreshRequest.grantType("refresh_token"); + oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + + try + { + var response = new OAuthApi(config).oauthTokenRefresh( + oAuthTokenRefreshRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/ReportApi.md b/sdks/java-v1/docs/ReportApi.md index e0a409741..cadac49ae 100644 --- a/sdks/java-v1/docs/ReportApi.md +++ b/sdks/java-v1/docs/ReportApi.md @@ -21,40 +21,47 @@ When the report(s) have been generated, you will receive an email (one per reque ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var reportApi = new ReportApi(apiClient); - - var data = new ReportCreateRequest() - .startDate("09/01/2020") - .endDate("09/01/2020") - .reportType(List.of( - ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, - ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS - )); - - try { - ReportCreateResponse result = reportApi.reportCreate(data); - System.out.println(result); +import java.util.Map; + +public class ReportCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var reportCreateRequest = new ReportCreateRequest(); + reportCreateRequest.startDate("09/01/2020"); + reportCreateRequest.endDate("09/01/2020"); + reportCreateRequest.reportType(List.of ( + ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, + ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS + )); + + try + { + var response = new ReportApi(config).reportCreate( + reportCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ReportApi#reportCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/SignatureRequestApi.md b/sdks/java-v1/docs/SignatureRequestApi.md index 60e02426f..96034a20b 100644 --- a/sdks/java-v1/docs/SignatureRequestApi.md +++ b/sdks/java-v1/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to *https://api.hellosign.com/v3* [**signatureRequestCancel**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request [**signatureRequestCreateEmbedded**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request [**signatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +[**signatureRequestEdit**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +[**signatureRequestEditEmbedded**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +[**signatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +[**signatureRequestEditWithTemplate**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template [**signatureRequestFiles**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files [**signatureRequestFilesAsDataUri**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri [**signatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -36,72 +40,107 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC().role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -152,72 +191,107 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); - System.out.println(result); +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); + signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkSendWithTemplateRequest.testMode(true); + signatureRequestBulkSendWithTemplateRequest.signerList(signerList); + signatureRequestBulkSendWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -274,30 +348,38 @@ To be eligible for cancelation, a signature request must have been sent successf ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - signatureRequestApi.signatureRequestCancel(signatureRequestId); +public class SignatureRequestCancelExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new SignatureRequestApi(config).signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -346,61 +428,78 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbedded(data); - System.out.println(result); +public class SignatureRequestCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -449,52 +548,67 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George"); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedWithTemplateRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .signingOptions(subSigningOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); + signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -532,6 +646,504 @@ public class Example { | **4XX** | failed_operation | - | +## signatureRequestEdit + +> SignatureRequestGetResponse signatureRequestEdit(signatureRequestId, signatureRequestEditRequest) + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditEmbedded + +> SignatureRequestGetResponse signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest) + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditEmbeddedWithTemplate + +> SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); + signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditWithTemplate + +> SignatureRequestGetResponse signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest) + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); + signatureRequestEditWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditWithTemplateRequest.testMode(true); + signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditWithTemplateRequest.signers(signers); + signatureRequestEditWithTemplateRequest.ccs(ccs); + signatureRequestEditWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + ## signatureRequestFiles > File signatureRequestFiles(signatureRequestId, fileType) @@ -545,33 +1157,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - File result = signatureRequestApi.signatureRequestFiles(signatureRequestId, "pdf"); - result.renameTo(new File("file_response.pdf")); +public class SignatureRequestFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf" // fileType + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -623,32 +1242,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - FileResponseDataUri result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -699,32 +1326,41 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1 // forceDownload + ); - try { - FileResponse result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -774,32 +1410,40 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestGet(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -850,40 +1494,43 @@ Take a look at our [search guide](/api/reference/search/) to learn more about qu ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var accountId = "accountId"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - SignatureRequestListResponse result = signatureRequestApi.signatureRequestList( - accountId, - page, - pageSize, - query +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestList( + null, // accountId + 1, // page + 20, // pageSize + null // query ); - System.out.println(result); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -935,32 +1582,40 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +public class SignatureRequestReleaseHoldExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1011,35 +1666,44 @@ Sends an email to the signer reminding them to sign the signature request. You c ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var data = new SignatureRequestRemindRequest() - .emailAddress("john@example.com"); +public class SignatureRequestRemindExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); + signatureRequestRemindRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1093,30 +1757,37 @@ Unlike /signature_request/cancel, this endpoint is synchronous and your access w ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - signatureRequestApi.signatureRequestRemove(signatureRequestId); +public class SignatureRequestRemoveExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new SignatureRequestApi(config).signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1165,66 +1836,87 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new SignatureRequestSendRequest() - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(signingOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSend(data); - System.out.println(result); +public class SignatureRequestSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1273,64 +1965,86 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .emailAddress("george@example.com") - .name("George"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@emaple.com"); - - var customField1 = new SubCustomField() - .name("Cost") - .value("$20,000") - .editor("Client") - .required(true); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .ccs(List.of(cc1)) - .customFields(List.of(customField1)) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSendWithTemplate(data); - System.out.println(result); +public class SignatureRequestSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); + signatureRequestSendWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestSendWithTemplateRequest.testMode(true); + signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); + signatureRequestSendWithTemplateRequest.signers(signers); + signatureRequestSendWithTemplateRequest.ccs(ccs); + signatureRequestSendWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1383,36 +2097,45 @@ Updating the email address of a signer will generate a new `signature_id` value. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var data = new SignatureRequestUpdateRequest() - .emailAddress("john@example.com") - .signatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); +public class SignatureRequestUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); + signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); + signatureRequestUpdateRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..dd8b06061 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,37 @@ + + +# SignatureRequestEditEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..3cc3dee72 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,28 @@ + + +# SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditRequest.md b/sdks/java-v1/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..7fa3aca65 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditRequest.md @@ -0,0 +1,38 @@ + + +# SignatureRequestEditRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..d079524b1 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,29 @@ + + +# SignatureRequestEditWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldRuleAction.md b/sdks/java-v1/docs/SubFormFieldRuleAction.md index 6a2d43481..16928736e 100644 --- a/sdks/java-v1/docs/SubFormFieldRuleAction.md +++ b/sdks/java-v1/docs/SubFormFieldRuleAction.md @@ -19,8 +19,8 @@ | Name | Value | ---- | ----- -| FIELD_VISIBILITY | "change-field-visibility" | -| GROUP_VISIBILITY | "change-group-visibility" | +| CHANGE_FIELD_VISIBILITY | "change-field-visibility" | +| CHANGE_GROUP_VISIBILITY | "change-group-visibility" | diff --git a/sdks/java-v1/docs/TeamApi.md b/sdks/java-v1/docs/TeamApi.md index b35b40ea8..abb3f1ee0 100644 --- a/sdks/java-v1/docs/TeamApi.md +++ b/sdks/java-v1/docs/TeamApi.md @@ -28,35 +28,44 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamAddMemberRequest() - .emailAddress("george@example.com"); - - String teamId = null; - - try { - TeamGetResponse result = teamApi.teamAddMember(data, teamId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamAddMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -106,33 +115,43 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamCreateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -181,28 +200,36 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - teamApi.teamDelete(); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TeamApi(config).teamDelete(); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -248,30 +275,38 @@ Returns information about your Team as well as a list of its members. If you do ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetResponse result = teamApi.teamGet(); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamGet(); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -317,28 +352,38 @@ Provides information about a team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetInfoResponse result = teamApi.teamInfo(); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInfoExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamInfo"); System.err.println("Status code: " + e.getCode()); @@ -389,32 +434,40 @@ Provides a list of team invites (and their roles). ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var emailAddress = "user@dropboxsign.com"; - - try { - TeamInvitesResponse result = teamApi.teamInvites(emailAddress); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInvitesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInvites( + null // emailAddress + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); + System.err.println("Exception when calling TeamApi#teamInvites"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -463,32 +516,40 @@ Provides a paginated list of members (and their roles) that belong to a given te ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamMembersResponse result = teamApi.teamMembers(teamId, page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamMembersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamMembers"); System.err.println("Status code: " + e.getCode()); @@ -541,34 +602,44 @@ Removes the provided user Account from your Team. If the Account had an outstand ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamRemoveMemberRequest() - .emailAddress("teammate@dropboxsign.com") - .newOwnerEmailAddress("new_teammate@dropboxsign.com"); - - try { - TeamGetResponse result = teamApi.teamRemoveMember(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamRemoveMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -617,32 +688,40 @@ Provides a paginated list of sub teams that belong to a given team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamSubTeamsResponse result = teamApi.teamSubTeams(teamId, page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamSubTeamsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamSubTeams"); System.err.println("Status code: " + e.getCode()); @@ -695,33 +774,43 @@ Updates the name of your Team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamUpdateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamUpdate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md index e6c7d1745..dd470487b 100644 --- a/sdks/java-v1/docs/TemplateApi.md +++ b/sdks/java-v1/docs/TemplateApi.md @@ -29,35 +29,44 @@ Gives the specified Account access to the specified Template. The specified Acco ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateAddUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateAddUser(templateId, data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateAddUserRequest = new TemplateAddUserRequest(); + templateAddUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateAddUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -107,64 +116,119 @@ Creates a template that can then be used. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateResponse result = templateApi.templateCreate(data); - System.out.println(result); +import java.util.Map; + +public class TemplateCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -213,64 +277,85 @@ The first step in an embedded template workflow. Creates a draft template that c ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateEmbeddedDraftRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateEmbeddedDraftResponse result = templateApi.templateCreateEmbeddedDraft(data); - System.out.println(result); +import java.util.Map; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -319,30 +404,38 @@ Completely deletes the template specified from the account. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - templateApi.templateDelete(templateId); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TemplateApi(config).templateDelete( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -393,33 +486,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - File result = templateApi.templateFiles(templateId, "pdf"); - result.renameTo(new File("file_response.pdf")); +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + null // fileType + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -471,32 +571,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponseDataUri result = templateApi.templateFilesAsDataUri(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -547,32 +655,41 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponse result = templateApi.templateFilesAsFileUrl(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1 // forceDownload + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -622,32 +739,40 @@ Returns the Template specified by the `template_id` parameter. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateGet(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateGet( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -698,35 +823,43 @@ Take a look at our [search guide](/api/reference/search/) to learn more about qu ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var accountId = "f57db65d3f933b5316d398057a36176831451a35"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - TemplateListResponse result = templateApi.templateList(accountId, page, pageSize, query); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -778,35 +911,44 @@ Removes the specified Account's access to the specified Template. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateRemoveUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateGetResponse result = templateApi.templateRemoveUser(templateId, data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateRemoveUserRequest = new TemplateRemoveUserRequest(); + templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateRemoveUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -867,37 +1009,46 @@ If the page orientation or page count is different from the original template do ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateUpdateFilesRequest() - .addFilesItem(new File("example_signature_request.pdf")); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateUpdateFilesResponse result = templateApi.templateUpdateFiles(templateId, data); - System.out.println(result); +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateUpdateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); + templateUpdateFilesRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new TemplateApi(config).templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/docs/UnclaimedDraftApi.md b/sdks/java-v1/docs/UnclaimedDraftApi.md index 4d6d12451..3f4dadabd 100644 --- a/sdks/java-v1/docs/UnclaimedDraftApi.md +++ b/sdks/java-v1/docs/UnclaimedDraftApi.md @@ -22,66 +22,57 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer1 = new SubUnclaimedDraftSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubUnclaimedDraftSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var data = new UnclaimedDraftCreateRequest() - .subject("The NDA we talked about") - .type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE) - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(subSigningOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreate(data); - System.out.println(result); +public class UnclaimedDraftCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signers1 = new SubUnclaimedDraftSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(true); + unclaimedDraftCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + unclaimedDraftCreateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -132,38 +123,48 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .addFilesItem(new File("example_signature_request.pdf")) - .requesterEmailAddress("jack@dropboxsign.com") - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); - System.out.println(result); +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(true); + unclaimedDraftCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -214,49 +215,67 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer = new SubUnclaimedDraftTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new UnclaimedDraftCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .requesterEmailAddress("jack@dropboxsign.com") - .signers(List.of(signer)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@dropboxsign.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signers1 = new SubUnclaimedDraftTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); + unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); + unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); + unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -307,36 +326,45 @@ Creates a new signature request from an embedded request that can be edited prio ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftEditAndResendRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .testMode(true); - - var signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); - System.out.println(result); +public class UnclaimedDraftEditAndResendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); + unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftEditAndResendRequest.testMode(false); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v1/gradle.properties b/sdks/java-v1/gradle.properties index a3f97a126..0619b8830 100644 --- a/sdks/java-v1/gradle.properties +++ b/sdks/java-v1/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=1.8-dev +VERSION_NAME=1.8.1-dev 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/sdks/java-v1/openapi-config.yaml b/sdks/java-v1/openapi-config.yaml index 398867abf..db4935dbf 100644 --- a/sdks/java-v1/openapi-config.yaml +++ b/sdks/java-v1/openapi-config.yaml @@ -16,7 +16,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "1.8-dev" + artifactVersion: "1.8.1-dev" 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 @@ -26,6 +26,7 @@ additionalProperties: licenseUrl: https://www.opensource.org/licenses/mit-license.php useCustomTemplateCode: true licenseCopyrightYear: 2024 + failOnUnknownProperties: false files: dropbox-EventCallbackHelper.mustache: templateType: SupportingFiles diff --git a/sdks/java-v1/pom.xml b/sdks/java-v1/pom.xml index 1c7bc968e..6c2b97c63 100644 --- a/sdks/java-v1/pom.xml +++ b/sdks/java-v1/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.8-dev + 1.8.1-dev 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! @@ -334,6 +334,7 @@ jersey-apache-connector ${jersey-version}
+ org.junit.jupiter @@ -355,6 +356,7 @@ 2.17.1 0.2.6 1.3.5 + 2.0.2 5.10.0 2.21.0 3.12.4 diff --git a/sdks/java-v1/run-build b/sdks/java-v1/run-build index ce4f11eff..99e100a84 100755 --- a/sdks/java-v1/run-build +++ b/sdks/java-v1/run-build @@ -18,7 +18,7 @@ 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 \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -47,6 +47,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index 9a82b95d3..b758f0a9b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java @@ -71,7 +71,7 @@ /** ApiClient class. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiClient extends JavaTimeFormatter { private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); @@ -147,7 +147,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.8-dev/java"); + setUserAgent("OpenAPI-Generator/1.8.1-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); @@ -751,31 +751,11 @@ public Entity serialize( if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()) - .size(file.length()) - .build(); - - // Attempt to probe the content type for the file so that the form part is more - // correctly - // and precisely identified, but fall back to application/octet-stream if that - // fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable) param.getValue()) + .forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart( - new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -826,6 +806,40 @@ public Entity serialize( return entity; } + /** + * Adds the object with the provided key to the MultiPart. Based on the object type sets + * Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = + FormDataContentDisposition.name(key) + .fileName(file.getName()) + .size(file.length()) + .build(); + + // Attempt to probe the content type for the file so that the form part is more + // correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given Content-Type (only JSON, HTTP * form is supported for now). @@ -1136,7 +1150,11 @@ private Response sendRequest( } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java index 28ae24fc6..27476dab3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java @@ -19,7 +19,7 @@ /** API Exception */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java index e2ebcc458..7bdd70522 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java @@ -14,11 +14,11 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class Configuration { - public static final String VERSION = "1.8-dev"; + public static final String VERSION = "1.8.1-dev"; - private static ApiClient defaultApiClient = new ApiClient(); + private static volatile ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API instances without providing diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java index aa9ef43a8..8d65b8708 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java @@ -19,7 +19,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class EventCallbackHelper { public static final String EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java index 5bcb4733e..cd4a199ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java @@ -12,7 +12,6 @@ package com.dropbox.sign; -import com.dropbox.sign.model.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; @@ -27,7 +26,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class JSON implements ContextResolver { private ObjectMapper mapper; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java index caf886acd..806b9b146 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java @@ -23,7 +23,7 @@ */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class JavaTimeFormatter { private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java index d653856fe..0f3d10c47 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java @@ -14,7 +14,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class Pair { private String name = ""; private String value = ""; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java index ae19756ea..3334a5843 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java @@ -23,7 +23,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class RFC3339DateFormat extends DateFormat { private static final long serialVersionUID = 1L; private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java index dca021db6..8d3d8b18c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java @@ -17,7 +17,7 @@ /** Representing a Server configuration. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ServerConfiguration { public String URL; public String description; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java index 4a32ae659..4af52f41e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java @@ -17,7 +17,7 @@ /** Representing a Server Variable for server URL template substitution. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java index 00a83e83e..bcc8a0371 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java @@ -17,7 +17,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java index f460b4737..836bd4bf4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class AccountApi { private ApiClient apiClient; @@ -51,14 +51,15 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified + * Create Account Creates a new Dropbox Sign Account that is associated with the specified * `email_address`. * * @param accountCreateRequest (required) * @return AccountCreateResponse * @throws ApiException if fails to make API call * @http.response.details - * + *
+ * * * * @@ -70,14 +71,15 @@ public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateReq } /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified + * Create Account Creates a new Dropbox Sign Account that is associated with the specified * `email_address`. * * @param accountCreateRequest (required) * @return ApiResponse<AccountCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -122,7 +124,7 @@ public ApiResponse accountCreateWithHttpInfo( } /** - * Get Account. Returns the properties and settings of your Account. + * Get Account Returns the properties and settings of your Account. * * @param accountId `account_id` or `email_address` is required. If both are * provided, the account id prevails. The ID of the Account. (optional) @@ -131,7 +133,8 @@ public ApiResponse accountCreateWithHttpInfo( * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -182,7 +185,7 @@ public ApiResponse accountGetWithHttpInfo(String accountId) } /** - * Get Account. Returns the properties and settings of your Account. + * Get Account Returns the properties and settings of your Account. * * @param accountId `account_id` or `email_address` is required. If both are * provided, the account id prevails. The ID of the Account. (optional) @@ -191,7 +194,8 @@ public ApiResponse accountGetWithHttpInfo(String accountId) * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -231,14 +235,15 @@ public ApiResponse accountGetWithHttpInfo( } /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * Update Account Updates the properties and settings of your Account. Currently only allows for + * updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * * @param accountUpdateRequest (required) * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -250,14 +255,15 @@ public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateReques } /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * Update Account Updates the properties and settings of your Account. Currently only allows for + * updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * * @param accountUpdateRequest (required) * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -302,13 +308,14 @@ public ApiResponse accountUpdateWithHttpInfo( } /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. + * Verify Account Verifies whether an Dropbox Sign Account exists for the given email address. * * @param accountVerifyRequest (required) * @return AccountVerifyResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -320,13 +327,14 @@ public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyReq } /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. + * Verify Account Verifies whether an Dropbox Sign Account exists for the given email address. * * @param accountVerifyRequest (required) * @return ApiResponse<AccountVerifyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java index 2c5ed4492..b74007e35 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java @@ -18,7 +18,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiAppApi { private ApiClient apiClient; @@ -49,13 +49,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create API App. Creates a new API App. + * Create API App Creates a new API App. * * @param apiAppCreateRequest (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -67,13 +68,14 @@ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) } /** - * Create API App. Creates a new API App. + * Create API App Creates a new API App. * * @param apiAppCreateRequest (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -118,12 +120,13 @@ public ApiResponse apiAppCreateWithHttpInfo( } /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. + * Delete API App Deletes an API App. Can only be invoked for apps you own. * * @param clientId The client id of the API App to delete. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -134,13 +137,14 @@ public void apiAppDelete(String clientId) throws ApiException { } /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. + * Delete API App Deletes an API App. Can only be invoked for apps you own. * * @param clientId The client id of the API App to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -183,13 +187,14 @@ public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiExc } /** - * Get API App. Returns an object with information about an API App. + * Get API App Returns an object with information about an API App. * * @param clientId The client id of the API App to retrieve. (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -200,13 +205,14 @@ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { } /** - * Get API App. Returns an object with information about an API App. + * Get API App Returns an object with information about an API App. * * @param clientId The client id of the API App to retrieve. (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -251,7 +257,7 @@ public ApiResponse apiAppGetWithHttpInfo(String clientId) } /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team + * List API Apps Returns a list of API Apps that are accessible by you. If you are on a team * with an Admin or Developer role, this list will include apps owned by teammates. * * @param page Which page number of the API App List to return. Defaults to `1`. @@ -261,7 +267,8 @@ public ApiResponse apiAppGetWithHttpInfo(String clientId) * @return ApiAppListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -311,7 +318,7 @@ public ApiResponse apiAppListWithHttpInfo(Integer page) } /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team + * List API Apps Returns a list of API Apps that are accessible by you. If you are on a team * with an Admin or Developer role, this list will include apps owned by teammates. * * @param page Which page number of the API App List to return. Defaults to `1`. @@ -321,7 +328,8 @@ public ApiResponse apiAppListWithHttpInfo(Integer page) * @return ApiResponse<ApiAppListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -367,7 +375,7 @@ public ApiResponse apiAppListWithHttpInfo(Integer page, Inte } /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the + * Update API App Updates an existing API App. Can only be invoked for apps you own. Only the * fields you provide will be updated. If you wish to clear an existing optional field, provide * an empty string. * @@ -376,7 +384,8 @@ public ApiResponse apiAppListWithHttpInfo(Integer page, Inte * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -388,7 +397,7 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp } /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the + * Update API App Updates an existing API App. Can only be invoked for apps you own. Only the * fields you provide will be updated. If you wish to clear an existing optional field, provide * an empty string. * @@ -397,7 +406,8 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java index 07cbd6af3..f928d5c26 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java @@ -16,7 +16,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class BulkSendJobApi { private ApiClient apiClient; @@ -47,7 +47,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified + * Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified * by the `bulk_send_job_id` parameter. * * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) @@ -58,7 +58,8 @@ public void setApiClient(ApiClient apiClient) { * @return BulkSendJobGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -111,7 +112,7 @@ public ApiResponse bulkSendJobGetWithHttpInfo( } /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified + * Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified * by the `bulk_send_job_id` parameter. * * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) @@ -122,7 +123,8 @@ public ApiResponse bulkSendJobGetWithHttpInfo( * @return ApiResponse<BulkSendJobGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -182,7 +184,7 @@ public ApiResponse bulkSendJobGetWithHttpInfo( } /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. + * List Bulk Send Jobs Returns a list of BulkSendJob that you can access. * * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. * (optional, default to 1) @@ -191,7 +193,8 @@ public ApiResponse bulkSendJobGetWithHttpInfo( * @return BulkSendJobListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -242,7 +245,7 @@ public ApiResponse bulkSendJobListWithHttpInfo(Integer } /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. + * List Bulk Send Jobs Returns a list of BulkSendJob that you can access. * * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. * (optional, default to 1) @@ -251,7 +254,8 @@ public ApiResponse bulkSendJobListWithHttpInfo(Integer * @return ApiResponse<BulkSendJobListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java index fd04f5b2b..e89671c3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java @@ -15,7 +15,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class EmbeddedApi { private ApiClient apiClient; @@ -46,7 +46,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that + * Get Embedded Template Edit URL Retrieves an embedded object containing a template url that * can be opened in an iFrame. Note that only templates created via the embedded template * process are available to be edited with this endpoint. * @@ -55,7 +55,8 @@ public void setApiClient(ApiClient apiClient) { * @return EmbeddedEditUrlResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -67,7 +68,7 @@ public EmbeddedEditUrlResponse embeddedEditUrl( } /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that + * Get Embedded Template Edit URL Retrieves an embedded object containing a template url that * can be opened in an iFrame. Note that only templates created via the embedded template * process are available to be edited with this endpoint. * @@ -76,7 +77,8 @@ public EmbeddedEditUrlResponse embeddedEditUrl( * @return ApiResponse<EmbeddedEditUrlResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -132,7 +134,7 @@ public ApiResponse embeddedEditUrlWithHttpInfo( } /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be + * Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be * opened in an iFrame. Note that templates created via the embedded template process will only * be accessible through the API. * @@ -140,7 +142,8 @@ public ApiResponse embeddedEditUrlWithHttpInfo( * @return EmbeddedSignUrlResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -151,7 +154,7 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc } /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be + * Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be * opened in an iFrame. Note that templates created via the embedded template process will only * be accessible through the API. * @@ -159,7 +162,8 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc * @return ApiResponse<EmbeddedSignUrlResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java index ce101cc84..259f1117d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -18,7 +18,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class FaxApi { private ApiClient apiClient; @@ -49,12 +49,13 @@ public void setApiClient(ApiClient apiClient) { } /** - * Delete Fax. Deletes the specified Fax from the system. + * 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 - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -65,13 +66,14 @@ public void faxDelete(String faxId) throws ApiException { } /** - * Delete Fax. Deletes the specified Fax from the system. + * 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 - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -113,13 +115,14 @@ public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException } /** - * List Fax Files. Returns list of fax files + * Download Fax Files Downloads files associated with a Fax * * @param faxId Fax ID (required) * @return File * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -130,13 +133,14 @@ public File faxFiles(String faxId) throws ApiException { } /** - * List Fax Files. Returns list of fax files + * Download Fax Files Downloads files associated with a Fax * * @param faxId Fax ID (required) * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -180,13 +184,14 @@ public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException } /** - * Get Fax. Returns information about fax + * Get Fax Returns information about a Fax * * @param faxId Fax ID (required) * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -197,13 +202,14 @@ public FaxGetResponse faxGet(String faxId) throws ApiException { } /** - * Get Fax. Returns information about fax + * Get Fax Returns information about a Fax * * @param faxId Fax ID (required) * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -246,14 +252,17 @@ public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiEx } /** - * Lists Faxes. Returns properties of multiple faxes + * Lists Faxes Returns properties of multiple Faxes * - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) + * @param page Which page number of the Fax List to return. Defaults to `1`. + * (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and + * `100`. Default is `20`. (optional, default to 20) * @return FaxListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -302,14 +311,17 @@ public ApiResponse faxListWithHttpInfo(Integer page) throws Api } /** - * Lists Faxes. Returns properties of multiple faxes + * Lists Faxes Returns properties of multiple Faxes * - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) + * @param page Which page number of the Fax List to return. Defaults to `1`. + * (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and + * `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<FaxListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -354,13 +366,14 @@ public ApiResponse faxListWithHttpInfo(Integer page, Integer pa } /** - * Send Fax. Action to prepare and send a fax + * Send Fax Creates and sends a new Fax with the submitted file(s) * * @param faxSendRequest (required) * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -371,13 +384,14 @@ public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException } /** - * Send Fax. Action to prepare and send a fax + * Send Fax Creates and sends a new Fax with the submitted file(s) * * @param faxSendRequest (required) * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java index 8d67ba4f1..346232fe7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -21,7 +21,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class FaxLineApi { private ApiClient apiClient; @@ -52,13 +52,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Fax Line User. Grants a user access to the specified Fax Line. + * Add Fax Line User Grants a user access to the specified Fax Line. * * @param faxLineAddUserRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -70,13 +71,14 @@ public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserReques } /** - * Add Fax Line User. Grants a user access to the specified Fax Line. + * Add Fax Line User Grants a user access to the specified Fax Line. * * @param faxLineAddUserRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -120,17 +122,18 @@ public ApiResponse faxLineAddUserWithHttpInfo( } /** - * Get Available Fax Line Area Codes. Returns a response with the area codes available for a - * given state/provice and city. + * Get Available Fax Line Area Codes Returns a list of available area codes for a given + * state/province and city * - * @param country Filter area codes by country. (required) - * @param state Filter area codes by state. (optional) - * @param province Filter area codes by province. (optional) - * @param city Filter area codes by city. (optional) + * @param country Filter area codes by country (required) + * @param state Filter area codes by state (optional) + * @param province Filter area codes by province (optional) + * @param city Filter area codes by city (optional) * @return FaxLineAreaCodeGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -207,17 +210,18 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( } /** - * Get Available Fax Line Area Codes. Returns a response with the area codes available for a - * given state/provice and city. + * Get Available Fax Line Area Codes Returns a list of available area codes for a given + * state/province and city * - * @param country Filter area codes by country. (required) - * @param state Filter area codes by state. (optional) - * @param province Filter area codes by province. (optional) - * @param city Filter area codes by city. (optional) + * @param country Filter area codes by country (required) + * @param state Filter area codes by state (optional) + * @param province Filter area codes by province (optional) + * @param city Filter area codes by city (optional) * @return ApiResponse<FaxLineAreaCodeGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -266,13 +270,14 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( } /** - * Purchase Fax Line. Purchases a new Fax Line. + * Purchase Fax Line Purchases a new Fax Line * * @param faxLineCreateRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -284,13 +289,14 @@ public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) } /** - * Purchase Fax Line. Purchases a new Fax Line. + * Purchase Fax Line Purchases a new Fax Line * * @param faxLineCreateRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -334,12 +340,13 @@ public ApiResponse faxLineCreateWithHttpInfo( } /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. + * Delete Fax Line Deletes the specified Fax Line from the subscription. * * @param faxLineDeleteRequest (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -350,13 +357,14 @@ public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiE } /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. + * Delete Fax Line Deletes the specified Fax Line from the subscription. * * @param faxLineDeleteRequest (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -399,13 +407,14 @@ public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineD } /** - * Get Fax Line. Returns the properties and settings of a Fax Line. + * Get Fax Line Returns the properties and settings of a Fax Line. * - * @param number The Fax Line number. (required) + * @param number The Fax Line number (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -416,13 +425,14 @@ public FaxLineResponse faxLineGet(String number) throws ApiException { } /** - * Get Fax Line. Returns the properties and settings of a Fax Line. + * Get Fax Line Returns the properties and settings of a Fax Line. * - * @param number The Fax Line number. (required) + * @param number The Fax Line number (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -465,16 +475,19 @@ public ApiResponse faxLineGetWithHttpInfo(String number) throws } /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. + * List Fax Lines Returns the properties and settings of multiple Fax Lines. * * @param accountId Account ID (optional) - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) - * @param showTeamLines Show team lines (optional) + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and + * `100`. Default is `20`. (optional, default to 20) + * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) * @return FaxLineListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -575,16 +588,19 @@ public ApiResponse faxLineListWithHttpInfo( } /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. + * List Fax Lines Returns the properties and settings of multiple Fax Lines. * * @param accountId Account ID (optional) - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) - * @param showTeamLines Show team lines (optional) + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and + * `100`. Default is `20`. (optional, default to 20) + * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) * @return ApiResponse<FaxLineListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -634,13 +650,14 @@ public ApiResponse faxLineListWithHttpInfo( } /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line. + * Remove Fax Line Access Removes a user's access to the specified Fax Line * * @param faxLineRemoveUserRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -652,13 +669,14 @@ public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveU } /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line. + * Remove Fax Line Access Removes a user's access to the specified Fax Line * * @param faxLineRemoveUserRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java index db4fbb10c..4286c030c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -14,7 +14,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class OAuthApi { private ApiClient apiClient; @@ -45,14 +45,15 @@ public void setApiClient(ApiClient apiClient) { } /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need + * OAuth Token Generate Once you have retrieved the code from the user callback, you will need * to exchange it for an access token via a backend call. * * @param oauthTokenGenerateRequest (required) * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -64,14 +65,15 @@ public OAuthTokenResponse oauthTokenGenerate( } /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need + * OAuth Token Generate Once you have retrieved the code from the user callback, you will need * to exchange it for an access token via a backend call. * * @param oauthTokenGenerateRequest (required) * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -115,7 +117,7 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( } /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one + * OAuth Token Refresh Access tokens are only valid for a given period of time (typically one * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see * `expires_in`), along with a refresh token that can be used to acquire a new access * token after the current one has expired. @@ -124,7 +126,8 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -136,7 +139,7 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR } /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one + * OAuth Token Refresh Access tokens are only valid for a given period of time (typically one * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see * `expires_in`), along with a refresh token that can be used to acquire a new access * token after the current one has expired. @@ -145,7 +148,8 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java index 5fa6c0f95..32c6bea91 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java @@ -13,7 +13,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ReportApi { private ApiClient apiClient; @@ -44,7 +44,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been + * Create Report Request the creation of one or more report(s). When the report(s) have been * generated, you will receive an email (one per requested report type) containing a link to * download the report as a CSV file. The requested date range may be up to 12 months in * duration, and `start_date` must not be more than 10 years in the past. @@ -53,7 +53,8 @@ public void setApiClient(ApiClient apiClient) { * @return ReportCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -65,7 +66,7 @@ public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest } /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been + * Create Report Request the creation of one or more report(s). When the report(s) have been * generated, you will receive an email (one per requested report type) containing a link to * download the report as a CSV file. The requested date range may be up to 12 months in * duration, and `start_date` must not be more than 10 years in the past. @@ -74,7 +75,8 @@ public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest * @return ApiResponse<ReportCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java index 8474ef706..e8e83e549 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java @@ -12,6 +12,10 @@ import com.dropbox.sign.model.SignatureRequestBulkSendWithTemplateRequest; import com.dropbox.sign.model.SignatureRequestCreateEmbeddedRequest; import com.dropbox.sign.model.SignatureRequestCreateEmbeddedWithTemplateRequest; +import com.dropbox.sign.model.SignatureRequestEditEmbeddedRequest; +import com.dropbox.sign.model.SignatureRequestEditEmbeddedWithTemplateRequest; +import com.dropbox.sign.model.SignatureRequestEditRequest; +import com.dropbox.sign.model.SignatureRequestEditWithTemplateRequest; import com.dropbox.sign.model.SignatureRequestGetResponse; import com.dropbox.sign.model.SignatureRequestListResponse; import com.dropbox.sign.model.SignatureRequestRemindRequest; @@ -28,7 +32,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class SignatureRequestApi { private ApiClient apiClient; @@ -59,7 +63,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests + * Embedded Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests * in bulk based off of the provided Template(s) specified with the `template_ids` * parameter to be signed in an embedded iFrame. These embedded signature requests can only be * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox @@ -69,7 +73,8 @@ public void setApiClient(ApiClient apiClient) { * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -85,7 +90,7 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( } /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests + * Embedded Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests * in bulk based off of the provided Template(s) specified with the `template_ids` * parameter to be signed in an embedded iFrame. These embedded signature requests can only be * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox @@ -95,7 +100,8 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -145,7 +151,7 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( } /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk + * Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests in bulk * based off of the provided Template(s) specified with the `template_ids` parameter. * **NOTE:** Only available for Standard plan and higher. * @@ -153,7 +159,8 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -168,7 +175,7 @@ public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate( } /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk + * Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests in bulk * based off of the provided Template(s) specified with the `template_ids` parameter. * **NOTE:** Only available for Standard plan and higher. * @@ -176,7 +183,8 @@ public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate( * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -223,7 +231,7 @@ public ApiResponse signatureRequestBulkSendWithTemplate } /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is + * Cancel Incomplete Signature Request 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 @@ -245,7 +253,8 @@ public ApiResponse signatureRequestBulkSendWithTemplate * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -256,7 +265,7 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio } /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is + * Cancel Incomplete Signature Request 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 @@ -279,7 +288,8 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -327,18 +337,19 @@ public ApiResponse signatureRequestCancelWithHttpInfo(String signatureRequ } /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. + * Create Embedded Signature Request Creates a new SignatureRequest with the submitted documents + * to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature + * page will be affixed where all signers will be required to add their signature, signifying + * their agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. * * @param signatureRequestCreateEmbeddedRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -352,18 +363,19 @@ public SignatureRequestGetResponse signatureRequestCreateEmbedded( } /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. + * Create Embedded Signature Request Creates a new SignatureRequest with the submitted documents + * to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature + * page will be affixed where all signers will be required to add their signature, signifying + * their agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. * * @param signatureRequestCreateEmbeddedRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -410,7 +422,7 @@ public ApiResponse signatureRequestCreateEmbeddedWi } /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the + * Create Embedded Signature Request with Template Creates a new SignatureRequest based on the * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests * can only be signed in embedded iFrames whereas normal signature requests can only be signed * on Dropbox Sign. @@ -419,7 +431,8 @@ public ApiResponse signatureRequestCreateEmbeddedWi * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -435,7 +448,7 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( } /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the + * Create Embedded Signature Request with Template Creates a new SignatureRequest based on the * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests * can only be signed in embedded iFrames whereas normal signature requests can only be signed * on Dropbox Sign. @@ -444,7 +457,8 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -494,7 +508,406 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( } /** - * Download Files. Obtain a copy of the current documents specified by the + * Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If + * `form_fields_per_document` is not specified, a signature page will be affixed where + * all signers will be required to add their signature, signifying their agreement to all + * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEdit( + String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) + throws ApiException { + return signatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest) + .getData(); + } + + /** + * Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If + * `form_fields_per_document` is not specified, a signature page will be affixed where + * all signers will be required to add their signature, signifying their agreement to all + * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditWithHttpInfo( + String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) + throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestId' when calling" + + " signatureRequestEdit"); + } + if (signatureRequestEditRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestEditRequest' when calling" + + " signatureRequestEdit"); + } + + // Path parameters + String localVarPath = + "/signature_request/edit/{signature_request_id}" + .replaceAll( + "\\{signature_request_id}", + apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEdit", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be + * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page + * will be affixed where all signers will be required to add their signature, signifying their + * agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditEmbedded( + String signatureRequestId, + SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) + throws ApiException { + return signatureRequestEditEmbeddedWithHttpInfo( + signatureRequestId, signatureRequestEditEmbeddedRequest) + .getData(); + } + + /** + * Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be + * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page + * will be affixed where all signers will be required to add their signature, signifying their + * agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditEmbeddedWithHttpInfo( + String signatureRequestId, + SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) + throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestId' when calling" + + " signatureRequestEditEmbedded"); + } + if (signatureRequestEditEmbeddedRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestEditEmbeddedRequest' when" + + " calling signatureRequestEditEmbedded"); + } + + // Path parameters + String localVarPath = + "/signature_request/edit_embedded/{signature_request_id}" + .replaceAll( + "\\{signature_request_id}", + apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditEmbeddedRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditEmbedded", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditEmbeddedRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given + * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can + * only be signed in embedded iFrames whereas normal signature requests can only be signed on + * Dropbox Sign. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedWithTemplateRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( + String signatureRequestId, + SignatureRequestEditEmbeddedWithTemplateRequest + signatureRequestEditEmbeddedWithTemplateRequest) + throws ApiException { + return signatureRequestEditEmbeddedWithTemplateWithHttpInfo( + signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) + .getData(); + } + + /** + * Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given + * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can + * only be signed in embedded iFrames whereas normal signature requests can only be signed on + * Dropbox Sign. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedWithTemplateRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse + signatureRequestEditEmbeddedWithTemplateWithHttpInfo( + String signatureRequestId, + SignatureRequestEditEmbeddedWithTemplateRequest + signatureRequestEditEmbeddedWithTemplateRequest) + throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestId' when calling" + + " signatureRequestEditEmbeddedWithTemplate"); + } + if (signatureRequestEditEmbeddedWithTemplateRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter" + + " 'signatureRequestEditEmbeddedWithTemplateRequest' when calling" + + " signatureRequestEditEmbeddedWithTemplate"); + } + + // Path parameters + String localVarPath = + "/signature_request/edit_embedded_with_template/{signature_request_id}" + .replaceAll( + "\\{signature_request_id}", + apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditEmbeddedWithTemplateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditEmbeddedWithTemplate", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditEmbeddedWithTemplateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Edit Signature Request With Template Edits and sends a SignatureRequest based off of the + * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not + * deduct your signature request quota. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditWithTemplateRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditWithTemplate( + String signatureRequestId, + SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) + throws ApiException { + return signatureRequestEditWithTemplateWithHttpInfo( + signatureRequestId, signatureRequestEditWithTemplateRequest) + .getData(); + } + + /** + * Edit Signature Request With Template Edits and sends a SignatureRequest based off of the + * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not + * deduct your signature request quota. + * + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditWithTemplateRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditWithTemplateWithHttpInfo( + String signatureRequestId, + SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) + throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestId' when calling" + + " signatureRequestEditWithTemplate"); + } + if (signatureRequestEditWithTemplateRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'signatureRequestEditWithTemplateRequest' when" + + " calling signatureRequestEditWithTemplate"); + } + + // Path parameters + String localVarPath = + "/signature_request/edit_with_template/{signature_request_id}" + .replaceAll( + "\\{signature_request_id}", + apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditWithTemplateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = + new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditWithTemplate", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditWithTemplateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Download Files Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are * currently being prepared, a status code of `409` will be returned instead. * @@ -504,7 +917,8 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( * @return File * @throws ApiException if fails to make API call * @http.response.details - * + *
+ * * * * @@ -535,7 +949,7 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque } /** - * Download Files. Obtain a copy of the current documents specified by the + * Download Files Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are * currently being prepared, a status code of `409` will be returned instead. * @@ -545,7 +959,8 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -603,7 +1018,7 @@ public ApiResponse signatureRequestFilesWithHttpInfo( } /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the + * Download Files as Data Uri Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. @@ -612,7 +1027,8 @@ public ApiResponse signatureRequestFilesWithHttpInfo( * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -624,7 +1040,7 @@ public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureReques } /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the + * Download Files as Data Uri Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. @@ -633,7 +1049,8 @@ public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureReques * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -683,7 +1100,7 @@ public ApiResponse signatureRequestFilesAsDataUriWithHttpIn } /** - * Download Files as File Url. Obtain a copy of the current documents specified by the + * Download Files as File Url Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a url to the file * (PDFs only). If the files are currently being prepared, a status code of `409` will * be returned instead. @@ -695,7 +1112,8 @@ public ApiResponse signatureRequestFilesAsDataUriWithHttpIn * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -729,7 +1147,7 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( } /** - * Download Files as File Url. Obtain a copy of the current documents specified by the + * Download Files as File Url Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a url to the file * (PDFs only). If the files are currently being prepared, a status code of `409` will * be returned instead. @@ -741,7 +1159,8 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -797,14 +1216,15 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( } /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the + * Get Signature Request Returns the status of the SignatureRequest specified by the * `signature_request_id` parameter. * * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -816,14 +1236,15 @@ public SignatureRequestGetResponse signatureRequestGet(String signatureRequestId } /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the + * Get Signature Request Returns the status of the SignatureRequest specified by the * `signature_request_id` parameter. * * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -873,7 +1294,7 @@ public ApiResponse signatureRequestGetWithHttpInfo( } /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This + * List Signature Requests Returns a list of SignatureRequests that you can access. This * includes SignatureRequests you have sent as well as received, but not ones that you have been * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about * querying signature requests. @@ -889,7 +1310,8 @@ public ApiResponse signatureRequestGetWithHttpInfo( * @return SignatureRequestListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -991,7 +1413,7 @@ public ApiResponse signatureRequestListWithHttpInf } /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This + * List Signature Requests Returns a list of SignatureRequests that you can access. This * includes SignatureRequests you have sent as well as received, but not ones that you have been * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about * querying signature requests. @@ -1007,7 +1429,8 @@ public ApiResponse signatureRequestListWithHttpInf * @return ApiResponse<SignatureRequestListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1055,7 +1478,7 @@ public ApiResponse signatureRequestListWithHttpInf } /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and + * Release On-Hold Signature Request Releases a held SignatureRequest that was claimed and * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft * must indicate at Draft creation that the SignatureRequest created from the Draft should be * held. Releasing the SignatureRequest will send requests to all signers. @@ -1064,7 +1487,8 @@ public ApiResponse signatureRequestListWithHttpInf * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1076,7 +1500,7 @@ public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureR } /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and + * Release On-Hold Signature Request Releases a held SignatureRequest that was claimed and * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft * must indicate at Draft creation that the SignatureRequest created from the Draft should be * held. Releasing the SignatureRequest will send requests to all signers. @@ -1085,7 +1509,8 @@ public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureR * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1135,7 +1560,7 @@ public ApiResponse signatureRequestReleaseHoldWithH } /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature + * Send Request Reminder Sends an email to the signer reminding them to sign the signature * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with * embedded signature requests. @@ -1145,7 +1570,8 @@ public ApiResponse signatureRequestReleaseHoldWithH * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1159,7 +1585,7 @@ public SignatureRequestGetResponse signatureRequestRemind( } /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature + * Send Request Reminder Sends an email to the signer reminding them to sign the signature * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with * embedded signature requests. @@ -1169,7 +1595,8 @@ public SignatureRequestGetResponse signatureRequestRemind( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1228,7 +1655,7 @@ public ApiResponse signatureRequestRemindWithHttpIn } /** - * Remove Signature Request Access. Removes your access to a completed signature request. This + * Remove Signature Request Access Removes your access to a completed signature request. This * action is **not reversible**. The signature request must be fully executed by all parties * (signed or declined to sign). Other parties will continue to maintain access to the completed * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous @@ -1238,7 +1665,8 @@ public ApiResponse signatureRequestRemindWithHttpIn * @param signatureRequestId The id of the SignatureRequest to remove. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1249,7 +1677,7 @@ public void signatureRequestRemove(String signatureRequestId) throws ApiExceptio } /** - * Remove Signature Request Access. Removes your access to a completed signature request. This + * Remove Signature Request Access Removes your access to a completed signature request. This * action is **not reversible**. The signature request must be fully executed by all parties * (signed or declined to sign). Other parties will continue to maintain access to the completed * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous @@ -1260,7 +1688,8 @@ public void signatureRequestRemove(String signatureRequestId) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1308,16 +1737,17 @@ public ApiResponse signatureRequestRemoveWithHttpInfo(String signatureRequ } /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. + * Send Signature Request Creates and sends a new SignatureRequest with the submitted documents. + * If `form_fields_per_document` is not specified, a signature page will be affixed + * where all signers will be required to add their signature, signifying their agreement to all + * contained documents. * * @param signatureRequestSendRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1329,16 +1759,17 @@ public SignatureRequestGetResponse signatureRequestSend( } /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. + * Send Signature Request Creates and sends a new SignatureRequest with the submitted documents. + * If `form_fields_per_document` is not specified, a signature page will be affixed + * where all signers will be required to add their signature, signifying their agreement to all + * contained documents. * * @param signatureRequestSendRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1384,14 +1815,15 @@ public ApiResponse signatureRequestSendWithHttpInfo } /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) + * Send with Template Creates and sends a new SignatureRequest based off of the Template(s) * specified with the `template_ids` parameter. * * @param signatureRequestSendWithTemplateRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1405,14 +1837,15 @@ public SignatureRequestGetResponse signatureRequestSendWithTemplate( } /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) + * Send with Template Creates and sends a new SignatureRequest based off of the Template(s) * specified with the `template_ids` parameter. * * @param signatureRequestSendWithTemplateRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1459,7 +1892,7 @@ public ApiResponse signatureRequestSendWithTemplate } /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a + * Update Signature Request Updates the email address and/or the name for a given signer on a * signature request. You can listen for the `signature_request_email_bounce` event on * your app or account to detect bounced emails, and respond with this method. Updating the * email address of a signer will generate a new `signature_id` value. **NOTE:** This @@ -1470,7 +1903,8 @@ public ApiResponse signatureRequestSendWithTemplate * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1484,7 +1918,7 @@ public SignatureRequestGetResponse signatureRequestUpdate( } /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a + * Update Signature Request Updates the email address and/or the name for a given signer on a * signature request. You can listen for the `signature_request_email_bounce` event on * your app or account to detect bounced emails, and respond with this method. Updating the * email address of a signer will generate a new `signature_id` value. **NOTE:** This @@ -1495,7 +1929,8 @@ public SignatureRequestGetResponse signatureRequestUpdate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java index cf3167ab9..7ccffdb6d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -23,7 +23,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class TeamApi { private ApiClient apiClient; @@ -54,7 +54,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to + * Add User to Team Invites a user (specified using the `email_address` parameter) to * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be * created for them. If a user is already a part of another Team, a * `team_invite_failed` error will be returned. @@ -64,7 +64,8 @@ public void setApiClient(ApiClient apiClient) { * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -96,7 +97,7 @@ public ApiResponse teamAddMemberWithHttpInfo( } /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to + * Add User to Team Invites a user (specified using the `email_address` parameter) to * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be * created for them. If a user is already a part of another Team, a * `team_invite_failed` error will be returned. @@ -106,7 +107,8 @@ public ApiResponse teamAddMemberWithHttpInfo( * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -154,14 +156,15 @@ public ApiResponse teamAddMemberWithHttpInfo( } /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a + * Create Team Creates a new Team and makes you a member. You must not currently belong to a * Team to invoke. * * @param teamCreateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -172,14 +175,15 @@ public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws Ap } /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a + * Create Team Creates a new Team and makes you a member. You must not currently belong to a * Team to invoke. * * @param teamCreateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -222,12 +226,13 @@ public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest tea } /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member + * Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member * (yourself). * * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -238,13 +243,14 @@ public void teamDelete() throws ApiException { } /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member + * Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member * (yourself). * * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -276,13 +282,14 @@ public ApiResponse teamDeleteWithHttpInfo() throws ApiException { } /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not + * Get Team Returns information about your Team as well as a list of its members. If you do not * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -293,13 +300,14 @@ public TeamGetResponse teamGet() throws ApiException { } /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not + * Get Team Returns information about your Team as well as a list of its members. If you do not * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -332,13 +340,14 @@ public ApiResponse teamGetWithHttpInfo() throws ApiException { } /** - * Get Team Info. Provides information about a team. + * Get Team Info Provides information about a team. * * @param teamId The id of the team. (optional) * @return TeamGetInfoResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -367,13 +376,14 @@ public ApiResponse teamInfoWithHttpInfo() throws ApiExcepti } /** - * Get Team Info. Provides information about a team. + * Get Team Info Provides information about a team. * * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetInfoResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -412,13 +422,14 @@ public ApiResponse teamInfoWithHttpInfo(String teamId) } /** - * List Team Invites. Provides a list of team invites (and their roles). + * List Team Invites Provides a list of team invites (and their roles). * * @param emailAddress The email address for which to display the team invites. (optional) * @return TeamInvitesResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -447,13 +458,14 @@ public ApiResponse teamInvitesWithHttpInfo() throws ApiExce } /** - * List Team Invites. Provides a list of team invites (and their roles). + * List Team Invites Provides a list of team invites (and their roles). * * @param emailAddress The email address for which to display the team invites. (optional) * @return ApiResponse<TeamInvitesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -492,7 +504,7 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr } /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a + * List Team Members Provides a paginated list of members (and their roles) that belong to a * given team. * * @param teamId The id of the team that a member list is being requested from. (required) @@ -503,7 +515,8 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr * @return TeamMembersResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -555,7 +568,7 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I } /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a + * List Team Members Provides a paginated list of members (and their roles) that belong to a * given team. * * @param teamId The id of the team that a member list is being requested from. (required) @@ -566,7 +579,8 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I * @return ApiResponse<TeamMembersResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -623,8 +637,8 @@ public ApiResponse teamMembersWithHttpInfo( } /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to + * Remove User from Team Removes the provided user Account from your Team. If the Account had an + * outstanding invitation to your Team, the invitation will be expired. If you choose to * transfer documents from the removed Account to an Account provided in the * `new_owner_email_address` parameter (available only for Enterprise plans), the * response status code will be 201, which indicates that your request has been queued but not @@ -634,7 +648,8 @@ public ApiResponse teamMembersWithHttpInfo( * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -646,8 +661,8 @@ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMember } /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to + * Remove User from Team Removes the provided user Account from your Team. If the Account had an + * outstanding invitation to your Team, the invitation will be expired. If you choose to * transfer documents from the removed Account to an Account provided in the * `new_owner_email_address` parameter (available only for Enterprise plans), the * response status code will be 201, which indicates that your request has been queued but not @@ -657,7 +672,8 @@ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMember * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -701,7 +717,7 @@ public ApiResponse teamRemoveMemberWithHttpInfo( } /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. + * List Sub Teams Provides a paginated list of sub teams that belong to a given team. * * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. @@ -711,7 +727,8 @@ public ApiResponse teamRemoveMemberWithHttpInfo( * @return TeamSubTeamsResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -763,7 +780,7 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, } /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. + * List Sub Teams Provides a paginated list of sub teams that belong to a given team. * * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. @@ -773,7 +790,8 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, * @return ApiResponse<TeamSubTeamsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -830,13 +848,14 @@ public ApiResponse teamSubTeamsWithHttpInfo( } /** - * Update Team. Updates the name of your Team. + * Update Team Updates the name of your Team. * * @param teamUpdateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -847,13 +866,14 @@ public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws Ap } /** - * Update Team. Updates the name of your Team. + * Update Team Updates the name of your Team. * * @param teamUpdateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java index bee010c28..14eeae070 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -27,7 +27,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class TemplateApi { private ApiClient apiClient; @@ -58,7 +58,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Template. Gives the specified Account access to the specified Template. The + * Add User to Template Gives the specified Account access to the specified Template. The * specified Account must be a part of your Team. * * @param templateId The id of the Template to give the Account access to. (required) @@ -66,7 +66,8 @@ public void setApiClient(ApiClient apiClient) { * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -78,7 +79,7 @@ public TemplateGetResponse templateAddUser( } /** - * Add User to Template. Gives the specified Account access to the specified Template. The + * Add User to Template Gives the specified Account access to the specified Template. The * specified Account must be a part of your Team. * * @param templateId The id of the Template to give the Account access to. (required) @@ -86,7 +87,8 @@ public TemplateGetResponse templateAddUser( * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -142,13 +144,14 @@ public ApiResponse templateAddUserWithHttpInfo( } /** - * Create Template. Creates a template that can then be used. + * Create Template Creates a template that can then be used. * * @param templateCreateRequest (required) * @return TemplateCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -160,13 +163,14 @@ public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreat } /** - * Create Template. Creates a template that can then be used. + * Create Template Creates a template that can then be used. * * @param templateCreateRequest (required) * @return ApiResponse<TemplateCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -212,14 +216,15 @@ public ApiResponse templateCreateWithHttpInfo( } /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a + * Create Embedded Template Draft The first step in an embedded template workflow. Creates a * draft template that can then be further set up in the template 'edit' stage. * * @param templateCreateEmbeddedDraftRequest (required) * @return TemplateCreateEmbeddedDraftResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -233,14 +238,15 @@ public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft( } /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a + * Create Embedded Template Draft The first step in an embedded template workflow. Creates a * draft template that can then be further set up in the template 'edit' stage. * * @param templateCreateEmbeddedDraftRequest (required) * @return ApiResponse<TemplateCreateEmbeddedDraftResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -287,12 +293,13 @@ public ApiResponse templateCreateEmbeddedDr } /** - * Delete Template. Completely deletes the template specified from the account. + * Delete Template Completely deletes the template specified from the account. * * @param templateId The id of the Template to delete. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -303,13 +310,14 @@ public void templateDelete(String templateId) throws ApiException { } /** - * Delete Template. Completely deletes the template specified from the account. + * Delete Template Completely deletes the template specified from the account. * * @param templateId The id of the Template to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -353,7 +361,7 @@ public ApiResponse templateDeleteWithHttpInfo(String templateId) throws Ap } /** - * Get Template Files. Obtain a copy of the current documents specified by the + * Get Template Files Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently * being prepared, a status code of `409` will be returned instead. In this case * please wait for the `template_created` callback event. @@ -364,7 +372,8 @@ public ApiResponse templateDeleteWithHttpInfo(String templateId) throws Ap * @return File * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -393,7 +402,7 @@ public ApiResponse templateFilesWithHttpInfo(String templateId) throws Api } /** - * Get Template Files. Obtain a copy of the current documents specified by the + * Get Template Files Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently * being prepared, a status code of `409` will be returned instead. In this case * please wait for the `template_created` callback event. @@ -404,7 +413,8 @@ public ApiResponse templateFilesWithHttpInfo(String templateId) throws Api * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -456,7 +466,7 @@ public ApiResponse templateFilesWithHttpInfo(String templateId, String fil } /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the + * Get Template Files as Data Uri Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. In this case please wait for the @@ -466,7 +476,8 @@ public ApiResponse templateFilesWithHttpInfo(String templateId, String fil * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -477,7 +488,7 @@ public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiE } /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the + * Get Template Files as Data Uri Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. In this case please wait for the @@ -487,7 +498,8 @@ public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiE * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -536,7 +548,7 @@ public ApiResponse templateFilesAsDataUriWithHttpInfo(Strin } /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the + * Get Template Files as File Url Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). * If the files are currently being prepared, a status code of `409` will be returned * instead. In this case please wait for the `template_created` callback event. @@ -548,7 +560,8 @@ public ApiResponse templateFilesAsDataUriWithHttpInfo(Strin * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -579,7 +592,7 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ } /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the + * Get Template Files as File Url Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). * If the files are currently being prepared, a status code of `409` will be returned * instead. In this case please wait for the `template_created` callback event. @@ -591,7 +604,8 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -646,13 +660,14 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo( } /** - * Get Template. Returns the Template specified by the `template_id` parameter. + * Get Template Returns the Template specified by the `template_id` parameter. * * @param templateId The id of the Template to retrieve. (required) * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -663,13 +678,14 @@ public TemplateGetResponse templateGet(String templateId) throws ApiException { } /** - * Get Template. Returns the Template specified by the `template_id` parameter. + * Get Template Returns the Template specified by the `template_id` parameter. * * @param templateId The id of the Template to retrieve. (required) * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -716,8 +732,8 @@ public ApiResponse templateGetWithHttpInfo(String templateI } /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. + * List Templates Returns a list of the Templates that are accessible by you. Take a look at our + * [search guide](/api/reference/search/) to learn more about querying templates. * * @param accountId Which account to return Templates for. Must be a team member. Use * `all` to indicate all team members. Defaults to your account. (optional) @@ -730,7 +746,8 @@ public ApiResponse templateGetWithHttpInfo(String templateI * @return TemplateListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -830,8 +847,8 @@ public ApiResponse templateListWithHttpInfo( } /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. + * List Templates Returns a list of the Templates that are accessible by you. Take a look at our + * [search guide](/api/reference/search/) to learn more about querying templates. * * @param accountId Which account to return Templates for. Must be a team member. Use * `all` to indicate all team members. Defaults to your account. (optional) @@ -844,7 +861,8 @@ public ApiResponse templateListWithHttpInfo( * @return ApiResponse<TemplateListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -892,7 +910,7 @@ public ApiResponse templateListWithHttpInfo( } /** - * Remove User from Template. Removes the specified Account's access to the specified + * Remove User from Template Removes the specified Account's access to the specified * Template. * * @param templateId The id of the Template to remove the Account's access to. (required) @@ -900,7 +918,8 @@ public ApiResponse templateListWithHttpInfo( * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -913,7 +932,7 @@ public TemplateGetResponse templateRemoveUser( } /** - * Remove User from Template. Removes the specified Account's access to the specified + * Remove User from Template Removes the specified Account's access to the specified * Template. * * @param templateId The id of the Template to remove the Account's access to. (required) @@ -921,7 +940,8 @@ public TemplateGetResponse templateRemoveUser( * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -978,7 +998,7 @@ public ApiResponse templateRemoveUserWithHttpInfo( } /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new + * Update Template Files Overlays a new file with the overlay of an existing template. The new * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) * being replaced. This will not overwrite or in any way affect the existing template. Both the * existing template and new template will be available for use after executing this endpoint. @@ -998,7 +1018,8 @@ public ApiResponse templateRemoveUserWithHttpInfo( * @return TemplateUpdateFilesResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1011,7 +1032,7 @@ public TemplateUpdateFilesResponse templateUpdateFiles( } /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new + * Update Template Files Overlays a new file with the overlay of an existing template. The new * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) * being replaced. This will not overwrite or in any way affect the existing template. Both the * existing template and new template will be available for use after executing this endpoint. @@ -1031,7 +1052,8 @@ public TemplateUpdateFilesResponse templateUpdateFiles( * @return ApiResponse<TemplateUpdateFilesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java index 6219c4a13..61289c29f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java @@ -16,7 +16,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class UnclaimedDraftApi { private ApiClient apiClient; @@ -47,8 +47,8 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the + * Create Unclaimed Draft Creates a new Draft that can be claimed using the claim URL. The first + * authenticated user to access the URL will claim the Draft and will be shown either the * \"Sign and send\" or the \"Request signature\" page with the Draft * loaded. Subsequent access to the claim URL will result in a 404. * @@ -56,7 +56,8 @@ public void setApiClient(ApiClient apiClient) { * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -68,8 +69,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreate( } /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the + * Create Unclaimed Draft Creates a new Draft that can be claimed using the claim URL. The first + * authenticated user to access the URL will claim the Draft and will be shown either the * \"Sign and send\" or the \"Request signature\" page with the Draft * loaded. Subsequent access to the claim URL will result in a 404. * @@ -77,7 +78,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreate( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -123,7 +125,7 @@ public ApiResponse unclaimedDraftCreateWithHttpInf } /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an + * Create Embedded Unclaimed Draft Creates a new Draft that can be claimed and used in an * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to * the claim URL will result in a `404`. For this embedded endpoint the @@ -135,7 +137,8 @@ public ApiResponse unclaimedDraftCreateWithHttpInf * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -149,7 +152,7 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded( } /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an + * Create Embedded Unclaimed Draft Creates a new Draft that can be claimed and used in an * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to * the claim URL will result in a `404`. For this embedded endpoint the @@ -161,7 +164,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -208,7 +212,7 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit } /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved + * Create Embedded Unclaimed Draft with Template Creates a new Draft with a previously saved * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user * to access the URL will claim the Draft and will be shown the \"Request signature\" * page with the Draft loaded. Subsequent access to the claim URL will result in a @@ -220,7 +224,8 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -236,7 +241,7 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( } /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved + * Create Embedded Unclaimed Draft with Template Creates a new Draft with a previously saved * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user * to access the URL will claim the Draft and will be shown the \"Request signature\" * page with the Draft loaded. Subsequent access to the claim URL will result in a @@ -248,7 +253,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -298,9 +304,9 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( } /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email + * Edit and Resend Unclaimed Draft Creates a new signature request from an embedded request that + * can be edited prior to being sent to the recipients. Parameter `test_mode` can be + * edited prior to request. Signers can be edited in embedded editor. Requester's email * address will remain unchanged if `requester_email_address` parameter is not set. * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal * drafts can be used and accessed on Dropbox Sign. @@ -310,7 +316,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -326,9 +333,9 @@ public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend( } /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email + * Edit and Resend Unclaimed Draft Creates a new signature request from an embedded request that + * can be edited prior to being sent to the recipients. Parameter `test_mode` can be + * edited prior to request. Signers can be edited in embedded editor. Requester's email * address will remain unchanged if `requester_email_address` parameter is not set. * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal * drafts can be used and accessed on Dropbox Sign. @@ -338,7 +345,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
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/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java index b066e1383..9f8742a3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java index d8c229c88..9fd1f753b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java @@ -22,7 +22,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java index 22500f2d5..a77c13eda 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java index 0081f2ada..4e340e3f1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java @@ -20,7 +20,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java index fc3c3081d..9d881c79f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nullable private String clientSecret; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public AccountCreateRequest() {} @@ -63,7 +63,7 @@ public static AccountCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountCreateRequest.class); } - public AccountCreateRequest emailAddress(String emailAddress) { + public AccountCreateRequest emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -82,11 +82,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public AccountCreateRequest clientId(String clientId) { + public AccountCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -105,11 +105,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public AccountCreateRequest clientSecret(String clientSecret) { + public AccountCreateRequest clientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -128,11 +128,11 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } - public AccountCreateRequest locale(String locale) { + public AccountCreateRequest locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -152,7 +152,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java index be4f9500b..328622b72 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_OAUTH_DATA = "oauth_data"; - private OAuthTokenResponse oauthData; + @javax.annotation.Nullable private OAuthTokenResponse oauthData; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountCreateResponse() {} @@ -62,7 +62,7 @@ public static AccountCreateResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountCreateResponse.class); } - public AccountCreateResponse account(AccountResponse account) { + public AccountCreateResponse account(@javax.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -81,11 +81,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountCreateResponse oauthData(OAuthTokenResponse oauthData) { + public AccountCreateResponse oauthData( + @javax.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; return this; } @@ -103,11 +104,12 @@ public OAuthTokenResponse getOauthData() { @JsonProperty(JSON_PROPERTY_OAUTH_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthData(OAuthTokenResponse oauthData) { + public void setOauthData(@javax.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; } - public AccountCreateResponse warnings(List warnings) { + public AccountCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -133,7 +135,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java index 36473bf74..c63b7c4b9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountGetResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountGetResponse() {} @@ -57,7 +57,7 @@ public static AccountGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountGetResponse.class); } - public AccountGetResponse account(AccountResponse account) { + public AccountGetResponse account(@javax.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -76,11 +76,11 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountGetResponse warnings(List warnings) { + public AccountGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java index 541c7f61d..02ee9cf83 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -39,41 +39,41 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; + @javax.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; + @javax.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private AccountResponseQuotas quotas; + @javax.annotation.Nullable private AccountResponseQuotas quotas; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_ROLE_CODE = "role_code"; - private String roleCode; + @javax.annotation.Nullable private String roleCode; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public static final String JSON_PROPERTY_USAGE = "usage"; - private AccountResponseUsage usage; + @javax.annotation.Nullable private AccountResponseUsage usage; public AccountResponse() {} @@ -91,7 +91,7 @@ public static AccountResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountResponse.class); } - public AccountResponse accountId(String accountId) { + public AccountResponse accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -109,11 +109,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountResponse emailAddress(String emailAddress) { + public AccountResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -131,11 +131,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public AccountResponse isLocked(Boolean isLocked) { + public AccountResponse isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -153,11 +153,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public AccountResponse isPaidHs(Boolean isPaidHs) { + public AccountResponse isPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -175,11 +175,11 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public AccountResponse isPaidHf(Boolean isPaidHf) { + public AccountResponse isPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -197,11 +197,11 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public AccountResponse quotas(AccountResponseQuotas quotas) { + public AccountResponse quotas(@javax.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; return this; } @@ -219,11 +219,11 @@ public AccountResponseQuotas getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(AccountResponseQuotas quotas) { + public void setQuotas(@javax.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; } - public AccountResponse callbackUrl(String callbackUrl) { + public AccountResponse callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -241,11 +241,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountResponse roleCode(String roleCode) { + public AccountResponse roleCode(@javax.annotation.Nullable String roleCode) { this.roleCode = roleCode; return this; } @@ -263,11 +263,11 @@ public String getRoleCode() { @JsonProperty(JSON_PROPERTY_ROLE_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoleCode(String roleCode) { + public void setRoleCode(@javax.annotation.Nullable String roleCode) { this.roleCode = roleCode; } - public AccountResponse teamId(String teamId) { + public AccountResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -285,11 +285,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public AccountResponse locale(String locale) { + public AccountResponse locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -309,11 +309,11 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } - public AccountResponse usage(AccountResponseUsage usage) { + public AccountResponse usage(@javax.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; return this; } @@ -331,7 +331,7 @@ public AccountResponseUsage getUsage() { @JsonProperty(JSON_PROPERTY_USAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsage(AccountResponseUsage usage) { + public void setUsage(@javax.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index 584917ff9..9385b863c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -34,27 +34,27 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponseQuotas { public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; + @javax.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; + @javax.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_TEMPLATES_TOTAL = "templates_total"; - private Integer templatesTotal; + @javax.annotation.Nullable private Integer templatesTotal; public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; + @javax.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; + @javax.annotation.Nullable private Integer smsVerificationsLeft; public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; - private Integer numFaxPagesLeft; + @javax.annotation.Nullable private Integer numFaxPagesLeft; public AccountResponseQuotas() {} @@ -73,7 +73,8 @@ public static AccountResponseQuotas init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountResponseQuotas.class); } - public AccountResponseQuotas apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public AccountResponseQuotas apiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -91,11 +92,12 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public AccountResponseQuotas documentsLeft(Integer documentsLeft) { + public AccountResponseQuotas documentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -113,11 +115,11 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public AccountResponseQuotas templatesTotal(Integer templatesTotal) { + public AccountResponseQuotas templatesTotal(@javax.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; return this; } @@ -135,11 +137,11 @@ public Integer getTemplatesTotal() { @JsonProperty(JSON_PROPERTY_TEMPLATES_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesTotal(Integer templatesTotal) { + public void setTemplatesTotal(@javax.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; } - public AccountResponseQuotas templatesLeft(Integer templatesLeft) { + public AccountResponseQuotas templatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -157,11 +159,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public AccountResponseQuotas smsVerificationsLeft(Integer smsVerificationsLeft) { + public AccountResponseQuotas smsVerificationsLeft( + @javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -179,11 +182,12 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } - public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { + public AccountResponseQuotas numFaxPagesLeft( + @javax.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; return this; } @@ -201,7 +205,7 @@ public Integer getNumFaxPagesLeft() { @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { + public void setNumFaxPagesLeft(@javax.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java index daac05931..7906498fe 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponseUsage { public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; - private Integer faxPagesSent; + @javax.annotation.Nullable private Integer faxPagesSent; public AccountResponseUsage() {} @@ -49,7 +49,7 @@ public static AccountResponseUsage init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountResponseUsage.class); } - public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { + public AccountResponseUsage faxPagesSent(@javax.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; return this; } @@ -67,7 +67,7 @@ public Integer getFaxPagesSent() { @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFaxPagesSent(Integer faxPagesSent) { + public void setFaxPagesSent(@javax.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java index 24bc0a80d..547051d2a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountUpdateRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public AccountUpdateRequest() {} @@ -59,7 +59,7 @@ public static AccountUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountUpdateRequest.class); } - public AccountUpdateRequest accountId(String accountId) { + public AccountUpdateRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -77,11 +77,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountUpdateRequest callbackUrl(String callbackUrl) { + public AccountUpdateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -99,11 +99,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountUpdateRequest locale(String locale) { + public AccountUpdateRequest locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -123,7 +123,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java index ffe2f15e4..d484b5052 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({AccountVerifyRequest.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public AccountVerifyRequest() {} @@ -49,7 +49,7 @@ public static AccountVerifyRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountVerifyRequest.class); } - public AccountVerifyRequest emailAddress(String emailAddress) { + public AccountVerifyRequest emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -68,7 +68,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java index bce3d5a4a..d5b7c64bb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountVerifyResponseAccount account; + @javax.annotation.Nullable private AccountVerifyResponseAccount account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountVerifyResponse() {} @@ -58,7 +58,8 @@ public static AccountVerifyResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountVerifyResponse.class); } - public AccountVerifyResponse account(AccountVerifyResponseAccount account) { + public AccountVerifyResponse account( + @javax.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; return this; } @@ -76,11 +77,12 @@ public AccountVerifyResponseAccount getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountVerifyResponseAccount account) { + public void setAccount(@javax.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; } - public AccountVerifyResponse warnings(List warnings) { + public AccountVerifyResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +108,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java index 3a2a2f72f..e8002ca39 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({AccountVerifyResponseAccount.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponseAccount { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public AccountVerifyResponseAccount() {} @@ -51,7 +51,8 @@ public static AccountVerifyResponseAccount init(HashMap data) throws Exception { AccountVerifyResponseAccount.class); } - public AccountVerifyResponseAccount emailAddress(String emailAddress) { + public AccountVerifyResponseAccount emailAddress( + @javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -69,7 +70,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java index ff8e8a71d..40e1c9482 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java @@ -38,29 +38,29 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppCreateRequest { public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = new ArrayList<>(); + @javax.annotation.Nonnull private List domains = new ArrayList<>(); public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; + @javax.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; + @javax.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; + @javax.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppCreateRequest() {} @@ -78,7 +78,7 @@ public static ApiAppCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppCreateRequest.class); } - public ApiAppCreateRequest domains(List domains) { + public ApiAppCreateRequest domains(@javax.annotation.Nonnull List domains) { this.domains = domains; return this; } @@ -105,11 +105,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nonnull List domains) { this.domains = domains; } - public ApiAppCreateRequest name(String name) { + public ApiAppCreateRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -128,11 +128,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public ApiAppCreateRequest callbackUrl(String callbackUrl) { + public ApiAppCreateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -150,11 +150,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppCreateRequest customLogoFile(File customLogoFile) { + public ApiAppCreateRequest customLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -172,11 +172,11 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppCreateRequest oauth(SubOAuth oauth) { + public ApiAppCreateRequest oauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -194,11 +194,11 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppCreateRequest options(SubOptions options) { + public ApiAppCreateRequest options(@javax.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -216,11 +216,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@javax.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppCreateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppCreateRequest whiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -238,7 +239,8 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java index 57bf2b41c..54ce2c4bb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppGetResponse { public static final String JSON_PROPERTY_API_APP = "api_app"; - private ApiAppResponse apiApp; + @javax.annotation.Nonnull private ApiAppResponse apiApp; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ApiAppGetResponse() {} @@ -57,7 +57,7 @@ public static ApiAppGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppGetResponse.class); } - public ApiAppGetResponse apiApp(ApiAppResponse apiApp) { + public ApiAppGetResponse apiApp(@javax.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; return this; } @@ -76,11 +76,11 @@ public ApiAppResponse getApiApp() { @JsonProperty(JSON_PROPERTY_API_APP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApp(ApiAppResponse apiApp) { + public void setApiApp(@javax.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; } - public ApiAppGetResponse warnings(List warnings) { + public ApiAppGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java index 4963459cd..8a50aef37 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppListResponse { public static final String JSON_PROPERTY_API_APPS = "api_apps"; - private List apiApps = new ArrayList<>(); + @javax.annotation.Nonnull private List apiApps = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ApiAppListResponse() {} @@ -61,7 +61,7 @@ public static ApiAppListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppListResponse.class); } - public ApiAppListResponse apiApps(List apiApps) { + public ApiAppListResponse apiApps(@javax.annotation.Nonnull List apiApps) { this.apiApps = apiApps; return this; } @@ -88,11 +88,11 @@ public List getApiApps() { @JsonProperty(JSON_PROPERTY_API_APPS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApps(List apiApps) { + public void setApiApps(@javax.annotation.Nonnull List apiApps) { this.apiApps = apiApps; } - public ApiAppListResponse listInfo(ListInfoResponse listInfo) { + public ApiAppListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +111,11 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public ApiAppListResponse warnings(List warnings) { + public ApiAppListResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +141,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java index 9e5b0073d..913a1e2c3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java @@ -40,38 +40,38 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponse { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; + @javax.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_IS_APPROVED = "is_approved"; - private Boolean isApproved; + @javax.annotation.Nullable private Boolean isApproved; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private ApiAppResponseOAuth oauth; + @javax.annotation.Nullable private ApiAppResponseOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private ApiAppResponseOptions options; + @javax.annotation.Nullable private ApiAppResponseOptions options; public static final String JSON_PROPERTY_OWNER_ACCOUNT = "owner_account"; - private ApiAppResponseOwnerAccount ownerAccount; + @javax.annotation.Nullable private ApiAppResponseOwnerAccount ownerAccount; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; public ApiAppResponse() {} @@ -89,7 +89,7 @@ public static ApiAppResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponse.class); } - public ApiAppResponse callbackUrl(String callbackUrl) { + public ApiAppResponse callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -107,11 +107,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponse clientId(String clientId) { + public ApiAppResponse clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -129,11 +129,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public ApiAppResponse createdAt(Integer createdAt) { + public ApiAppResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -151,11 +151,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public ApiAppResponse domains(List domains) { + public ApiAppResponse domains(@javax.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -181,11 +181,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppResponse name(String name) { + public ApiAppResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -203,11 +203,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ApiAppResponse isApproved(Boolean isApproved) { + public ApiAppResponse isApproved(@javax.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; return this; } @@ -225,11 +225,11 @@ public Boolean getIsApproved() { @JsonProperty(JSON_PROPERTY_IS_APPROVED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsApproved(Boolean isApproved) { + public void setIsApproved(@javax.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; } - public ApiAppResponse oauth(ApiAppResponseOAuth oauth) { + public ApiAppResponse oauth(@javax.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; return this; } @@ -247,11 +247,11 @@ public ApiAppResponseOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(ApiAppResponseOAuth oauth) { + public void setOauth(@javax.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; } - public ApiAppResponse options(ApiAppResponseOptions options) { + public ApiAppResponse options(@javax.annotation.Nullable ApiAppResponseOptions options) { this.options = options; return this; } @@ -269,11 +269,12 @@ public ApiAppResponseOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(ApiAppResponseOptions options) { + public void setOptions(@javax.annotation.Nullable ApiAppResponseOptions options) { this.options = options; } - public ApiAppResponse ownerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public ApiAppResponse ownerAccount( + @javax.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; return this; } @@ -291,12 +292,13 @@ public ApiAppResponseOwnerAccount getOwnerAccount() { @JsonProperty(JSON_PROPERTY_OWNER_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public void setOwnerAccount( + @javax.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; } public ApiAppResponse whiteLabelingOptions( - ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + @javax.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -314,7 +316,8 @@ public ApiAppResponseWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java index 74ba41e86..daf3f0826 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java @@ -37,20 +37,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_SECRET = "secret"; - private String secret; + @javax.annotation.Nullable private String secret; public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; + @javax.annotation.Nullable private List scopes = null; public static final String JSON_PROPERTY_CHARGES_USERS = "charges_users"; - private Boolean chargesUsers; + @javax.annotation.Nullable private Boolean chargesUsers; public ApiAppResponseOAuth() {} @@ -68,7 +68,7 @@ public static ApiAppResponseOAuth init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponseOAuth.class); } - public ApiAppResponseOAuth callbackUrl(String callbackUrl) { + public ApiAppResponseOAuth callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -86,11 +86,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponseOAuth secret(String secret) { + public ApiAppResponseOAuth secret(@javax.annotation.Nullable String secret) { this.secret = secret; return this; } @@ -108,11 +108,11 @@ public String getSecret() { @JsonProperty(JSON_PROPERTY_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecret(String secret) { + public void setSecret(@javax.annotation.Nullable String secret) { this.secret = secret; } - public ApiAppResponseOAuth scopes(List scopes) { + public ApiAppResponseOAuth scopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -138,11 +138,11 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; } - public ApiAppResponseOAuth chargesUsers(Boolean chargesUsers) { + public ApiAppResponseOAuth chargesUsers(@javax.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; return this; } @@ -161,7 +161,7 @@ public Boolean getChargesUsers() { @JsonProperty(JSON_PROPERTY_CHARGES_USERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChargesUsers(Boolean chargesUsers) { + public void setChargesUsers(@javax.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java index e2d672dda..ace145fa9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({ApiAppResponseOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere; + @javax.annotation.Nullable private Boolean canInsertEverywhere; public ApiAppResponseOptions() {} @@ -50,7 +50,8 @@ public static ApiAppResponseOptions init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), ApiAppResponseOptions.class); } - public ApiAppResponseOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public ApiAppResponseOptions canInsertEverywhere( + @javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -69,7 +70,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java index 7107a4329..de840b202 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOwnerAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public ApiAppResponseOwnerAccount() {} @@ -57,7 +57,7 @@ public static ApiAppResponseOwnerAccount init(HashMap data) throws Exception { ApiAppResponseOwnerAccount.class); } - public ApiAppResponseOwnerAccount accountId(String accountId) { + public ApiAppResponseOwnerAccount accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -75,11 +75,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public ApiAppResponseOwnerAccount emailAddress(String emailAddress) { + public ApiAppResponseOwnerAccount emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -97,7 +97,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java index 6efd8fc40..ae9441e24 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java @@ -42,56 +42,56 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor; + @javax.annotation.Nullable private String headerBackgroundColor; public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private String legalVersion; + @javax.annotation.Nullable private String legalVersion; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor; + @javax.annotation.Nullable private String linkColor; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor; + @javax.annotation.Nullable private String pageBackgroundColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor; + @javax.annotation.Nullable private String primaryButtonColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover; + @javax.annotation.Nullable private String primaryButtonColorHover; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor; + @javax.annotation.Nullable private String primaryButtonTextColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover; + @javax.annotation.Nullable private String primaryButtonTextColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor; + @javax.annotation.Nullable private String secondaryButtonColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover; + @javax.annotation.Nullable private String secondaryButtonColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor; + @javax.annotation.Nullable private String secondaryButtonTextColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover; + @javax.annotation.Nullable private String secondaryButtonTextColorHover; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1; + @javax.annotation.Nullable private String textColor1; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2; + @javax.annotation.Nullable private String textColor2; public ApiAppResponseWhiteLabelingOptions() {} @@ -111,7 +111,8 @@ public static ApiAppResponseWhiteLabelingOptions init(HashMap data) throws Excep ApiAppResponseWhiteLabelingOptions.class); } - public ApiAppResponseWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions headerBackgroundColor( + @javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -129,11 +130,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions legalVersion(String legalVersion) { + public ApiAppResponseWhiteLabelingOptions legalVersion( + @javax.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; return this; } @@ -151,11 +153,12 @@ public String getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(String legalVersion) { + public void setLegalVersion(@javax.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; } - public ApiAppResponseWhiteLabelingOptions linkColor(String linkColor) { + public ApiAppResponseWhiteLabelingOptions linkColor( + @javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -173,11 +176,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public ApiAppResponseWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions pageBackgroundColor( + @javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -195,11 +199,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions primaryButtonColor( + @javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -217,12 +222,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } public ApiAppResponseWhiteLabelingOptions primaryButtonColorHover( - String primaryButtonColorHover) { + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -240,12 +245,13 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } public ApiAppResponseWhiteLabelingOptions primaryButtonTextColor( - String primaryButtonTextColor) { + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -263,12 +269,13 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } public ApiAppResponseWhiteLabelingOptions primaryButtonTextColorHover( - String primaryButtonTextColorHover) { + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -286,11 +293,13 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonColor( + @javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -308,12 +317,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } public ApiAppResponseWhiteLabelingOptions secondaryButtonColorHover( - String secondaryButtonColorHover) { + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -331,12 +340,13 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColor( - String secondaryButtonTextColor) { + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -354,12 +364,13 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -377,11 +388,13 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover( + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions textColor1(String textColor1) { + public ApiAppResponseWhiteLabelingOptions textColor1( + @javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -399,11 +412,12 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public ApiAppResponseWhiteLabelingOptions textColor2(String textColor2) { + public ApiAppResponseWhiteLabelingOptions textColor2( + @javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -421,7 +435,7 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java index 04b23fb36..a27dfcd8c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java @@ -38,29 +38,29 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppUpdateRequest { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; + @javax.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; + @javax.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; + @javax.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; + @javax.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppUpdateRequest() {} @@ -78,7 +78,7 @@ public static ApiAppUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppUpdateRequest.class); } - public ApiAppUpdateRequest callbackUrl(String callbackUrl) { + public ApiAppUpdateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -96,11 +96,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppUpdateRequest customLogoFile(File customLogoFile) { + public ApiAppUpdateRequest customLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -118,11 +118,11 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppUpdateRequest domains(List domains) { + public ApiAppUpdateRequest domains(@javax.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -148,11 +148,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppUpdateRequest name(String name) { + public ApiAppUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -170,11 +170,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ApiAppUpdateRequest oauth(SubOAuth oauth) { + public ApiAppUpdateRequest oauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -192,11 +192,11 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppUpdateRequest options(SubOptions options) { + public ApiAppUpdateRequest options(@javax.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -214,11 +214,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@javax.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppUpdateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppUpdateRequest whiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -236,7 +237,8 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java index 27b8be9e6..80ade2f0d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java @@ -34,20 +34,22 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; + @javax.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + + @javax.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobGetResponse() {} @@ -66,7 +68,8 @@ public static BulkSendJobGetResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobGetResponse.class); } - public BulkSendJobGetResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobGetResponse bulkSendJob( + @javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -85,11 +88,11 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobGetResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobGetResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -108,12 +111,13 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } public BulkSendJobGetResponse signatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull + List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -142,11 +146,13 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setSignatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull + List signatureRequests) { this.signatureRequests = signatureRequests; } - public BulkSendJobGetResponse warnings(List warnings) { + public BulkSendJobGetResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -172,7 +178,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java index d96001b5c..dc04b97e4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java @@ -55,83 +55,84 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponseSignatureRequests { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; + @javax.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; + @javax.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; + @javax.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; + @javax.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; + @javax.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; + @javax.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; + @javax.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; + @javax.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public BulkSendJobGetResponseSignatureRequests() {} @@ -152,7 +153,8 @@ public static BulkSendJobGetResponseSignatureRequests init(HashMap data) throws BulkSendJobGetResponseSignatureRequests.class); } - public BulkSendJobGetResponseSignatureRequests testMode(Boolean testMode) { + public BulkSendJobGetResponseSignatureRequests testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -171,11 +173,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public BulkSendJobGetResponseSignatureRequests signatureRequestId(String signatureRequestId) { + public BulkSendJobGetResponseSignatureRequests signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -193,12 +196,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } public BulkSendJobGetResponseSignatureRequests requesterEmailAddress( - String requesterEmailAddress) { + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -216,11 +219,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public BulkSendJobGetResponseSignatureRequests title(String title) { + public BulkSendJobGetResponseSignatureRequests title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -238,11 +241,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public BulkSendJobGetResponseSignatureRequests originalTitle(String originalTitle) { + public BulkSendJobGetResponseSignatureRequests originalTitle( + @javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -260,11 +264,12 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public BulkSendJobGetResponseSignatureRequests subject(String subject) { + public BulkSendJobGetResponseSignatureRequests subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -282,11 +287,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public BulkSendJobGetResponseSignatureRequests message(String message) { + public BulkSendJobGetResponseSignatureRequests message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -304,11 +310,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public BulkSendJobGetResponseSignatureRequests metadata(Map metadata) { + public BulkSendJobGetResponseSignatureRequests metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -335,11 +342,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public BulkSendJobGetResponseSignatureRequests createdAt(Integer createdAt) { + public BulkSendJobGetResponseSignatureRequests createdAt( + @javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -357,11 +365,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public BulkSendJobGetResponseSignatureRequests expiresAt(Integer expiresAt) { + public BulkSendJobGetResponseSignatureRequests expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -381,11 +390,12 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public BulkSendJobGetResponseSignatureRequests isComplete(Boolean isComplete) { + public BulkSendJobGetResponseSignatureRequests isComplete( + @javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -403,11 +413,12 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public BulkSendJobGetResponseSignatureRequests isDeclined(Boolean isDeclined) { + public BulkSendJobGetResponseSignatureRequests isDeclined( + @javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -425,11 +436,12 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public BulkSendJobGetResponseSignatureRequests hasError(Boolean hasError) { + public BulkSendJobGetResponseSignatureRequests hasError( + @javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -448,11 +460,12 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public BulkSendJobGetResponseSignatureRequests filesUrl(String filesUrl) { + public BulkSendJobGetResponseSignatureRequests filesUrl( + @javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -470,11 +483,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public BulkSendJobGetResponseSignatureRequests signingUrl(String signingUrl) { + public BulkSendJobGetResponseSignatureRequests signingUrl( + @javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -494,11 +508,12 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public BulkSendJobGetResponseSignatureRequests detailsUrl(String detailsUrl) { + public BulkSendJobGetResponseSignatureRequests detailsUrl( + @javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -517,11 +532,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public BulkSendJobGetResponseSignatureRequests ccEmailAddresses(List ccEmailAddresses) { + public BulkSendJobGetResponseSignatureRequests ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -549,11 +565,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public BulkSendJobGetResponseSignatureRequests signingRedirectUrl(String signingRedirectUrl) { + public BulkSendJobGetResponseSignatureRequests signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -571,11 +588,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public BulkSendJobGetResponseSignatureRequests finalCopyUri(String finalCopyUri) { + public BulkSendJobGetResponseSignatureRequests finalCopyUri( + @javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -593,11 +611,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public BulkSendJobGetResponseSignatureRequests templateIds(List templateIds) { + public BulkSendJobGetResponseSignatureRequests templateIds( + @javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -623,12 +642,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; } public BulkSendJobGetResponseSignatureRequests customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -657,12 +676,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public BulkSendJobGetResponseSignatureRequests attachments( - List attachments) { + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -689,12 +709,13 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } public BulkSendJobGetResponseSignatureRequests responseData( - List responseData) { + @javax.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -722,12 +743,13 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData( + @javax.annotation.Nullable List responseData) { this.responseData = responseData; } public BulkSendJobGetResponseSignatureRequests signatures( - List signatures) { + @javax.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -754,11 +776,13 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures( + @javax.annotation.Nullable List signatures) { this.signatures = signatures; } - public BulkSendJobGetResponseSignatureRequests bulkSendJobId(String bulkSendJobId) { + public BulkSendJobGetResponseSignatureRequests bulkSendJobId( + @javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -776,7 +800,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java index 3f4c641a5..a47d9a259 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobListResponse { public static final String JSON_PROPERTY_BULK_SEND_JOBS = "bulk_send_jobs"; - private List bulkSendJobs = new ArrayList<>(); + @javax.annotation.Nonnull private List bulkSendJobs = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobListResponse() {} @@ -62,7 +62,8 @@ public static BulkSendJobListResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobListResponse.class); } - public BulkSendJobListResponse bulkSendJobs(List bulkSendJobs) { + public BulkSendJobListResponse bulkSendJobs( + @javax.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; return this; } @@ -89,11 +90,11 @@ public List getBulkSendJobs() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOBS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJobs(List bulkSendJobs) { + public void setBulkSendJobs(@javax.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; } - public BulkSendJobListResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -112,11 +113,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public BulkSendJobListResponse warnings(List warnings) { + public BulkSendJobListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -142,7 +144,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java index bc366fdce..442e2b628 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java @@ -35,20 +35,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public static final String JSON_PROPERTY_TOTAL = "total"; - private Integer total; + @javax.annotation.Nullable private Integer total; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; + @javax.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public BulkSendJobResponse() {} @@ -66,7 +66,7 @@ public static BulkSendJobResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), BulkSendJobResponse.class); } - public BulkSendJobResponse bulkSendJobId(String bulkSendJobId) { + public BulkSendJobResponse bulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -84,11 +84,11 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } - public BulkSendJobResponse total(Integer total) { + public BulkSendJobResponse total(@javax.annotation.Nullable Integer total) { this.total = total; return this; } @@ -106,11 +106,11 @@ public Integer getTotal() { @JsonProperty(JSON_PROPERTY_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotal(Integer total) { + public void setTotal(@javax.annotation.Nullable Integer total) { this.total = total; } - public BulkSendJobResponse isCreator(Boolean isCreator) { + public BulkSendJobResponse isCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -129,11 +129,11 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public BulkSendJobResponse createdAt(Integer createdAt) { + public BulkSendJobResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -151,7 +151,7 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java index 38e273f63..b59c28092 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobSendResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; + @javax.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobSendResponse() {} @@ -58,7 +58,8 @@ public static BulkSendJobSendResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobSendResponse.class); } - public BulkSendJobSendResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobSendResponse bulkSendJob( + @javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -77,11 +78,12 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobSendResponse warnings(List warnings) { + public BulkSendJobSendResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java index 1494bf469..e46d30980 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java @@ -40,38 +40,38 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlRequest { public static final String JSON_PROPERTY_ALLOW_EDIT_CCS = "allow_edit_ccs"; - private Boolean allowEditCcs = false; + @javax.annotation.Nullable private Boolean allowEditCcs = false; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; + @javax.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public EmbeddedEditUrlRequest() {} @@ -90,7 +90,7 @@ public static EmbeddedEditUrlRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlRequest.class); } - public EmbeddedEditUrlRequest allowEditCcs(Boolean allowEditCcs) { + public EmbeddedEditUrlRequest allowEditCcs(@javax.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; return this; } @@ -109,11 +109,11 @@ public Boolean getAllowEditCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditCcs(Boolean allowEditCcs) { + public void setAllowEditCcs(@javax.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; } - public EmbeddedEditUrlRequest ccRoles(List ccRoles) { + public EmbeddedEditUrlRequest ccRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -140,11 +140,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public EmbeddedEditUrlRequest editorOptions(SubEditorOptions editorOptions) { + public EmbeddedEditUrlRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -162,11 +163,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public EmbeddedEditUrlRequest forceSignerRoles(Boolean forceSignerRoles) { + public EmbeddedEditUrlRequest forceSignerRoles( + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -184,11 +186,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public EmbeddedEditUrlRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public EmbeddedEditUrlRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -206,11 +209,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public EmbeddedEditUrlRequest mergeFields(List mergeFields) { + public EmbeddedEditUrlRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -238,11 +242,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public EmbeddedEditUrlRequest previewOnly(Boolean previewOnly) { + public EmbeddedEditUrlRequest previewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -262,11 +266,11 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } - public EmbeddedEditUrlRequest showPreview(Boolean showPreview) { + public EmbeddedEditUrlRequest showPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -284,11 +288,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public EmbeddedEditUrlRequest showProgressStepper(Boolean showProgressStepper) { + public EmbeddedEditUrlRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -307,11 +312,11 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public EmbeddedEditUrlRequest testMode(Boolean testMode) { + public EmbeddedEditUrlRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -330,7 +335,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java index a16cac937..30bd517e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedEditUrlResponseEmbedded embedded; + @javax.annotation.Nonnull private EmbeddedEditUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public EmbeddedEditUrlResponse() {} @@ -58,7 +58,8 @@ public static EmbeddedEditUrlResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlResponse.class); } - public EmbeddedEditUrlResponse embedded(EmbeddedEditUrlResponseEmbedded embedded) { + public EmbeddedEditUrlResponse embedded( + @javax.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -77,11 +78,12 @@ public EmbeddedEditUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedEditUrlResponseEmbedded embedded) { + public void setEmbedded(@javax.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedEditUrlResponse warnings(List warnings) { + public EmbeddedEditUrlResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java index 7ce01e5f1..92ea6cbe0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponseEmbedded { public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; + @javax.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public EmbeddedEditUrlResponseEmbedded() {} @@ -57,7 +57,7 @@ public static EmbeddedEditUrlResponseEmbedded init(HashMap data) throws Exceptio EmbeddedEditUrlResponseEmbedded.class); } - public EmbeddedEditUrlResponseEmbedded editUrl(String editUrl) { + public EmbeddedEditUrlResponseEmbedded editUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -75,11 +75,11 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public EmbeddedEditUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedEditUrlResponseEmbedded expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -97,7 +97,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java index 7e34d2d2d..a49ec4993 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedSignUrlResponseEmbedded embedded; + @javax.annotation.Nonnull private EmbeddedSignUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public EmbeddedSignUrlResponse() {} @@ -58,7 +58,8 @@ public static EmbeddedSignUrlResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedSignUrlResponse.class); } - public EmbeddedSignUrlResponse embedded(EmbeddedSignUrlResponseEmbedded embedded) { + public EmbeddedSignUrlResponse embedded( + @javax.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -77,11 +78,12 @@ public EmbeddedSignUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedSignUrlResponseEmbedded embedded) { + public void setEmbedded(@javax.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedSignUrlResponse warnings(List warnings) { + public EmbeddedSignUrlResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java index 716bd324d..cb4820ae6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponseEmbedded { public static final String JSON_PROPERTY_SIGN_URL = "sign_url"; - private String signUrl; + @javax.annotation.Nullable private String signUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public EmbeddedSignUrlResponseEmbedded() {} @@ -57,7 +57,7 @@ public static EmbeddedSignUrlResponseEmbedded init(HashMap data) throws Exceptio EmbeddedSignUrlResponseEmbedded.class); } - public EmbeddedSignUrlResponseEmbedded signUrl(String signUrl) { + public EmbeddedSignUrlResponseEmbedded signUrl(@javax.annotation.Nullable String signUrl) { this.signUrl = signUrl; return this; } @@ -75,11 +75,11 @@ public String getSignUrl() { @JsonProperty(JSON_PROPERTY_SIGN_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignUrl(String signUrl) { + public void setSignUrl(@javax.annotation.Nullable String signUrl) { this.signUrl = signUrl; } - public EmbeddedSignUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedSignUrlResponseEmbedded expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -97,7 +97,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java index 0536233e0..e8d26b220 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({ErrorResponse.JSON_PROPERTY_ERROR}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponse { public static final String JSON_PROPERTY_ERROR = "error"; - private ErrorResponseError error; + @javax.annotation.Nonnull private ErrorResponseError error; public ErrorResponse() {} @@ -49,7 +49,7 @@ public static ErrorResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponse.class); } - public ErrorResponse error(ErrorResponseError error) { + public ErrorResponse error(@javax.annotation.Nonnull ErrorResponseError error) { this.error = error; return this; } @@ -68,7 +68,7 @@ public ErrorResponseError getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(ErrorResponseError error) { + public void setError(@javax.annotation.Nonnull ErrorResponseError error) { this.error = error; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index 613016529..e9624c65f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponseError { public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; - private String errorMsg; + @javax.annotation.Nonnull private String errorMsg; public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - private String errorName; + @javax.annotation.Nonnull private String errorName; public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; - private String errorPath; + @javax.annotation.Nullable private String errorPath; public ErrorResponseError() {} @@ -59,7 +59,7 @@ public static ErrorResponseError init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponseError.class); } - public ErrorResponseError errorMsg(String errorMsg) { + public ErrorResponseError errorMsg(@javax.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; return this; } @@ -78,11 +78,11 @@ public String getErrorMsg() { @JsonProperty(JSON_PROPERTY_ERROR_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(String errorMsg) { + public void setErrorMsg(@javax.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; } - public ErrorResponseError errorName(String errorName) { + public ErrorResponseError errorName(@javax.annotation.Nonnull String errorName) { this.errorName = errorName; return this; } @@ -101,11 +101,11 @@ public String getErrorName() { @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(String errorName) { + public void setErrorName(@javax.annotation.Nonnull String errorName) { this.errorName = errorName; } - public ErrorResponseError errorPath(String errorPath) { + public ErrorResponseError errorPath(@javax.annotation.Nullable String errorPath) { this.errorPath = errorPath; return this; } @@ -123,7 +123,7 @@ public String getErrorPath() { @JsonProperty(JSON_PROPERTY_ERROR_PATH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorPath(String errorPath) { + public void setErrorPath(@javax.annotation.Nullable String errorPath) { this.errorPath = errorPath; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java index 54c98461f..a7c7f100e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequest { public static final String JSON_PROPERTY_EVENT = "event"; - private EventCallbackRequestEvent event; + @javax.annotation.Nonnull private EventCallbackRequestEvent event; public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nullable private AccountResponse account; public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; + @javax.annotation.Nullable private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; + @javax.annotation.Nullable private TemplateResponse template; public EventCallbackRequest() {} @@ -63,7 +63,7 @@ public static EventCallbackRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), EventCallbackRequest.class); } - public EventCallbackRequest event(EventCallbackRequestEvent event) { + public EventCallbackRequest event(@javax.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; return this; } @@ -82,11 +82,11 @@ public EventCallbackRequestEvent getEvent() { @JsonProperty(JSON_PROPERTY_EVENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEvent(EventCallbackRequestEvent event) { + public void setEvent(@javax.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; } - public EventCallbackRequest account(AccountResponse account) { + public EventCallbackRequest account(@javax.annotation.Nullable AccountResponse account) { this.account = account; return this; } @@ -104,11 +104,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nullable AccountResponse account) { this.account = account; } - public EventCallbackRequest signatureRequest(SignatureRequestResponse signatureRequest) { + public EventCallbackRequest signatureRequest( + @javax.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -126,11 +127,12 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest( + @javax.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public EventCallbackRequest template(TemplateResponse template) { + public EventCallbackRequest template(@javax.annotation.Nullable TemplateResponse template) { this.template = template; return this; } @@ -148,7 +150,7 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@javax.annotation.Nullable TemplateResponse template) { this.template = template; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java index a7462562f..a3e999816 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java @@ -34,59 +34,59 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEvent { public static final String JSON_PROPERTY_EVENT_TIME = "event_time"; - private String eventTime; + @javax.annotation.Nonnull private String eventTime; /** Type of callback event that was triggered. */ public enum EventTypeEnum { - ACCOUNT_CONFIRMED("account_confirmed"), + ACCOUNT_CONFIRMED(String.valueOf("account_confirmed")), - UNKNOWN_ERROR("unknown_error"), + UNKNOWN_ERROR(String.valueOf("unknown_error")), - FILE_ERROR("file_error"), + FILE_ERROR(String.valueOf("file_error")), - SIGN_URL_INVALID("sign_url_invalid"), + SIGN_URL_INVALID(String.valueOf("sign_url_invalid")), - SIGNATURE_REQUEST_VIEWED("signature_request_viewed"), + SIGNATURE_REQUEST_VIEWED(String.valueOf("signature_request_viewed")), - SIGNATURE_REQUEST_SIGNED("signature_request_signed"), + SIGNATURE_REQUEST_SIGNED(String.valueOf("signature_request_signed")), - SIGNATURE_REQUEST_SENT("signature_request_sent"), + SIGNATURE_REQUEST_SENT(String.valueOf("signature_request_sent")), - SIGNATURE_REQUEST_ALL_SIGNED("signature_request_all_signed"), + SIGNATURE_REQUEST_ALL_SIGNED(String.valueOf("signature_request_all_signed")), - SIGNATURE_REQUEST_EMAIL_BOUNCE("signature_request_email_bounce"), + SIGNATURE_REQUEST_EMAIL_BOUNCE(String.valueOf("signature_request_email_bounce")), - SIGNATURE_REQUEST_REMIND("signature_request_remind"), + SIGNATURE_REQUEST_REMIND(String.valueOf("signature_request_remind")), - SIGNATURE_REQUEST_INCOMPLETE_QES("signature_request_incomplete_qes"), + SIGNATURE_REQUEST_INCOMPLETE_QES(String.valueOf("signature_request_incomplete_qes")), - SIGNATURE_REQUEST_DESTROYED("signature_request_destroyed"), + SIGNATURE_REQUEST_DESTROYED(String.valueOf("signature_request_destroyed")), - SIGNATURE_REQUEST_CANCELED("signature_request_canceled"), + SIGNATURE_REQUEST_CANCELED(String.valueOf("signature_request_canceled")), - SIGNATURE_REQUEST_DOWNLOADABLE("signature_request_downloadable"), + SIGNATURE_REQUEST_DOWNLOADABLE(String.valueOf("signature_request_downloadable")), - SIGNATURE_REQUEST_DECLINED("signature_request_declined"), + SIGNATURE_REQUEST_DECLINED(String.valueOf("signature_request_declined")), - SIGNATURE_REQUEST_REASSIGNED("signature_request_reassigned"), + SIGNATURE_REQUEST_REASSIGNED(String.valueOf("signature_request_reassigned")), - SIGNATURE_REQUEST_INVALID("signature_request_invalid"), + SIGNATURE_REQUEST_INVALID(String.valueOf("signature_request_invalid")), - SIGNATURE_REQUEST_PREPARED("signature_request_prepared"), + SIGNATURE_REQUEST_PREPARED(String.valueOf("signature_request_prepared")), - SIGNATURE_REQUEST_EXPIRED("signature_request_expired"), + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), - TEMPLATE_CREATED("template_created"), + TEMPLATE_CREATED(String.valueOf("template_created")), - TEMPLATE_ERROR("template_error"), + TEMPLATE_ERROR(String.valueOf("template_error")), - CALLBACK_TEST("callback_test"), + CALLBACK_TEST(String.valueOf("callback_test")), - SIGNATURE_REQUEST_SIGNER_REMOVED("signature_request_signer_removed"); + SIGNATURE_REQUEST_SIGNER_REMOVED(String.valueOf("signature_request_signer_removed")); private String value; @@ -116,13 +116,13 @@ public static EventTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; - private EventTypeEnum eventType; + @javax.annotation.Nonnull private EventTypeEnum eventType; public static final String JSON_PROPERTY_EVENT_HASH = "event_hash"; - private String eventHash; + @javax.annotation.Nonnull private String eventHash; public static final String JSON_PROPERTY_EVENT_METADATA = "event_metadata"; - private EventCallbackRequestEventMetadata eventMetadata; + @javax.annotation.Nullable private EventCallbackRequestEventMetadata eventMetadata; public EventCallbackRequestEvent() {} @@ -142,7 +142,7 @@ public static EventCallbackRequestEvent init(HashMap data) throws Exception { EventCallbackRequestEvent.class); } - public EventCallbackRequestEvent eventTime(String eventTime) { + public EventCallbackRequestEvent eventTime(@javax.annotation.Nonnull String eventTime) { this.eventTime = eventTime; return this; } @@ -161,11 +161,11 @@ public String getEventTime() { @JsonProperty(JSON_PROPERTY_EVENT_TIME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventTime(String eventTime) { + public void setEventTime(@javax.annotation.Nonnull String eventTime) { this.eventTime = eventTime; } - public EventCallbackRequestEvent eventType(EventTypeEnum eventType) { + public EventCallbackRequestEvent eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; return this; } @@ -184,11 +184,11 @@ public EventTypeEnum getEventType() { @JsonProperty(JSON_PROPERTY_EVENT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventType(EventTypeEnum eventType) { + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; } - public EventCallbackRequestEvent eventHash(String eventHash) { + public EventCallbackRequestEvent eventHash(@javax.annotation.Nonnull String eventHash) { this.eventHash = eventHash; return this; } @@ -207,12 +207,12 @@ public String getEventHash() { @JsonProperty(JSON_PROPERTY_EVENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventHash(String eventHash) { + public void setEventHash(@javax.annotation.Nonnull String eventHash) { this.eventHash = eventHash; } public EventCallbackRequestEvent eventMetadata( - EventCallbackRequestEventMetadata eventMetadata) { + @javax.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; return this; } @@ -230,7 +230,8 @@ public EventCallbackRequestEventMetadata getEventMetadata() { @JsonProperty(JSON_PROPERTY_EVENT_METADATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMetadata(EventCallbackRequestEventMetadata eventMetadata) { + public void setEventMetadata( + @javax.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java index e92975e77..453c6a291 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEventMetadata { public static final String JSON_PROPERTY_RELATED_SIGNATURE_ID = "related_signature_id"; - private String relatedSignatureId; + @javax.annotation.Nullable private String relatedSignatureId; public static final String JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID = "reported_for_account_id"; - private String reportedForAccountId; + @javax.annotation.Nullable private String reportedForAccountId; public static final String JSON_PROPERTY_REPORTED_FOR_APP_ID = "reported_for_app_id"; - private String reportedForAppId; + @javax.annotation.Nullable private String reportedForAppId; public static final String JSON_PROPERTY_EVENT_MESSAGE = "event_message"; - private String eventMessage; + @javax.annotation.Nullable private String eventMessage; public EventCallbackRequestEventMetadata() {} @@ -65,7 +65,8 @@ public static EventCallbackRequestEventMetadata init(HashMap data) throws Except EventCallbackRequestEventMetadata.class); } - public EventCallbackRequestEventMetadata relatedSignatureId(String relatedSignatureId) { + public EventCallbackRequestEventMetadata relatedSignatureId( + @javax.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; return this; } @@ -84,11 +85,12 @@ public String getRelatedSignatureId() { @JsonProperty(JSON_PROPERTY_RELATED_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelatedSignatureId(String relatedSignatureId) { + public void setRelatedSignatureId(@javax.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; } - public EventCallbackRequestEventMetadata reportedForAccountId(String reportedForAccountId) { + public EventCallbackRequestEventMetadata reportedForAccountId( + @javax.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; return this; } @@ -106,11 +108,12 @@ public String getReportedForAccountId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAccountId(String reportedForAccountId) { + public void setReportedForAccountId(@javax.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; } - public EventCallbackRequestEventMetadata reportedForAppId(String reportedForAppId) { + public EventCallbackRequestEventMetadata reportedForAppId( + @javax.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; return this; } @@ -128,11 +131,12 @@ public String getReportedForAppId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_APP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAppId(String reportedForAppId) { + public void setReportedForAppId(@javax.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; } - public EventCallbackRequestEventMetadata eventMessage(String eventMessage) { + public EventCallbackRequestEventMetadata eventMessage( + @javax.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; return this; } @@ -150,7 +154,7 @@ public String getEventMessage() { @JsonProperty(JSON_PROPERTY_EVENT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMessage(String eventMessage) { + public void setEventMessage(@javax.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java index c4f86dd50..8d018468f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -29,14 +29,14 @@ @JsonPropertyOrder({FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxGetResponse { public static final String JSON_PROPERTY_FAX = "fax"; - private FaxResponse fax; + @javax.annotation.Nonnull private FaxResponse fax; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public FaxGetResponse() {} @@ -54,7 +54,7 @@ public static FaxGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxGetResponse.class); } - public FaxGetResponse fax(FaxResponse fax) { + public FaxGetResponse fax(@javax.annotation.Nonnull FaxResponse fax) { this.fax = fax; return this; } @@ -73,11 +73,11 @@ public FaxResponse getFax() { @JsonProperty(JSON_PROPERTY_FAX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFax(FaxResponse fax) { + public void setFax(@javax.annotation.Nonnull FaxResponse fax) { this.fax = fax; } - public FaxGetResponse warnings(List warnings) { + public FaxGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -103,7 +103,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java index f1d852493..c8163b3a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAddUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public FaxLineAddUserRequest() {} @@ -60,13 +60,13 @@ public static FaxLineAddUserRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxLineAddUserRequest.class); } - public FaxLineAddUserRequest number(String number) { + public FaxLineAddUserRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * * @return number */ @@ -79,11 +79,11 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } - public FaxLineAddUserRequest accountId(String accountId) { + public FaxLineAddUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -101,11 +101,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineAddUserRequest emailAddress(String emailAddress) { + public FaxLineAddUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -123,7 +123,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java index 54674a76b..bdf27b0cc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -29,11 +29,11 @@ @JsonPropertyOrder({FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAreaCodeGetResponse { public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; - private List areaCodes = new ArrayList<>(); + @javax.annotation.Nonnull private List areaCodes = new ArrayList<>(); public FaxLineAreaCodeGetResponse() {} @@ -53,7 +53,7 @@ public static FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { FaxLineAreaCodeGetResponse.class); } - public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { + public FaxLineAreaCodeGetResponse areaCodes(@javax.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; return this; } @@ -80,7 +80,7 @@ public List getAreaCodes() { @JsonProperty(JSON_PROPERTY_AREA_CODES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCodes(List areaCodes) { + public void setAreaCodes(@javax.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java index 7f18d7bc7..66c469623 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -34,19 +34,19 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineCreateRequest { public static final String JSON_PROPERTY_AREA_CODE = "area_code"; - private Integer areaCode; + @javax.annotation.Nonnull private Integer areaCode; - /** Country */ + /** Country of the area code */ public enum CountryEnum { - CA("CA"), + CA(String.valueOf("CA")), - US("US"), + US(String.valueOf("US")), - UK("UK"); + UK(String.valueOf("UK")); private String value; @@ -76,13 +76,13 @@ public static CountryEnum fromValue(String value) { } public static final String JSON_PROPERTY_COUNTRY = "country"; - private CountryEnum country; + @javax.annotation.Nonnull private CountryEnum country; public static final String JSON_PROPERTY_CITY = "city"; - private String city; + @javax.annotation.Nullable private String city; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public FaxLineCreateRequest() {} @@ -100,13 +100,13 @@ public static FaxLineCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineCreateRequest.class); } - public FaxLineCreateRequest areaCode(Integer areaCode) { + public FaxLineCreateRequest areaCode(@javax.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; return this; } /** - * Area code + * Area code of the new Fax Line * * @return areaCode */ @@ -119,17 +119,17 @@ public Integer getAreaCode() { @JsonProperty(JSON_PROPERTY_AREA_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCode(Integer areaCode) { + public void setAreaCode(@javax.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; } - public FaxLineCreateRequest country(CountryEnum country) { + public FaxLineCreateRequest country(@javax.annotation.Nonnull CountryEnum country) { this.country = country; return this; } /** - * Country + * Country of the area code * * @return country */ @@ -142,17 +142,17 @@ public CountryEnum getCountry() { @JsonProperty(JSON_PROPERTY_COUNTRY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCountry(CountryEnum country) { + public void setCountry(@javax.annotation.Nonnull CountryEnum country) { this.country = country; } - public FaxLineCreateRequest city(String city) { + public FaxLineCreateRequest city(@javax.annotation.Nullable String city) { this.city = city; return this; } /** - * City + * City of the area code * * @return city */ @@ -164,17 +164,17 @@ public String getCity() { @JsonProperty(JSON_PROPERTY_CITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCity(String city) { + public void setCity(@javax.annotation.Nullable String city) { this.city = city; } - public FaxLineCreateRequest accountId(String accountId) { + public FaxLineCreateRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } /** - * Account ID + * Account ID of the account that will be assigned this new Fax Line * * @return accountId */ @@ -186,7 +186,7 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java index 7a7bfdd5f..37873d146 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({FaxLineDeleteRequest.JSON_PROPERTY_NUMBER}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineDeleteRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public FaxLineDeleteRequest() {} @@ -49,13 +49,13 @@ public static FaxLineDeleteRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineDeleteRequest.class); } - public FaxLineDeleteRequest number(String number) { + public FaxLineDeleteRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * * @return number */ @@ -68,7 +68,7 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java index 9ad984747..9aaf96bdb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineListResponse { public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; - private List faxLines = new ArrayList<>(); + @javax.annotation.Nonnull private List faxLines = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; + @javax.annotation.Nullable private WarningResponse warnings; public FaxLineListResponse() {} @@ -61,7 +61,7 @@ public static FaxLineListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineListResponse.class); } - public FaxLineListResponse listInfo(ListInfoResponse listInfo) { + public FaxLineListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -80,11 +80,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public FaxLineListResponse faxLines(List faxLines) { + public FaxLineListResponse faxLines( + @javax.annotation.Nonnull List faxLines) { this.faxLines = faxLines; return this; } @@ -111,11 +112,11 @@ public List getFaxLines() { @JsonProperty(JSON_PROPERTY_FAX_LINES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLines(List faxLines) { + public void setFaxLines(@javax.annotation.Nonnull List faxLines) { this.faxLines = faxLines; } - public FaxLineListResponse warnings(WarningResponse warnings) { + public FaxLineListResponse warnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -133,7 +134,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java index 0347f5886..9faabb1bf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineRemoveUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public FaxLineRemoveUserRequest() {} @@ -61,13 +61,13 @@ public static FaxLineRemoveUserRequest init(HashMap data) throws Exception { FaxLineRemoveUserRequest.class); } - public FaxLineRemoveUserRequest number(String number) { + public FaxLineRemoveUserRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * * @return number */ @@ -80,17 +80,17 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } - public FaxLineRemoveUserRequest accountId(String accountId) { + public FaxLineRemoveUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } /** - * Account ID + * Account ID of the user to remove access * * @return accountId */ @@ -102,17 +102,17 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineRemoveUserRequest emailAddress(String emailAddress) { + public FaxLineRemoveUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } /** - * Email address + * Email address of the user to remove access * * @return emailAddress */ @@ -124,7 +124,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java index 24837c26f..c982b16ec 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -27,14 +27,14 @@ @JsonPropertyOrder({FaxLineResponse.JSON_PROPERTY_FAX_LINE, FaxLineResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponse { public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; - private FaxLineResponseFaxLine faxLine; + @javax.annotation.Nonnull private FaxLineResponseFaxLine faxLine; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; + @javax.annotation.Nullable private WarningResponse warnings; public FaxLineResponse() {} @@ -52,7 +52,7 @@ public static FaxLineResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineResponse.class); } - public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { + public FaxLineResponse faxLine(@javax.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; return this; } @@ -71,11 +71,11 @@ public FaxLineResponseFaxLine getFaxLine() { @JsonProperty(JSON_PROPERTY_FAX_LINE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLine(FaxLineResponseFaxLine faxLine) { + public void setFaxLine(@javax.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; } - public FaxLineResponse warnings(WarningResponse warnings) { + public FaxLineResponse warnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -93,7 +93,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java index 63ef50b37..79e0d943e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -34,20 +34,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponseFaxLine { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nullable private String number; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; + @javax.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public FaxLineResponseFaxLine() {} @@ -66,7 +66,7 @@ public static FaxLineResponseFaxLine init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxLineResponseFaxLine.class); } - public FaxLineResponseFaxLine number(String number) { + public FaxLineResponseFaxLine number(@javax.annotation.Nullable String number) { this.number = number; return this; } @@ -84,11 +84,11 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nullable String number) { this.number = number; } - public FaxLineResponseFaxLine createdAt(Integer createdAt) { + public FaxLineResponseFaxLine createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -106,11 +106,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { + public FaxLineResponseFaxLine updatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -128,11 +128,12 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public FaxLineResponseFaxLine accounts(List accounts) { + public FaxLineResponseFaxLine accounts( + @javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -158,7 +159,7 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java index 7da2189b9..a8f6296b9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -29,14 +29,14 @@ @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") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxListResponse { public static final String JSON_PROPERTY_FAXES = "faxes"; - private List faxes = new ArrayList<>(); + @javax.annotation.Nonnull private List faxes = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public FaxListResponse() {} @@ -54,7 +54,7 @@ public static FaxListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxListResponse.class); } - public FaxListResponse faxes(List faxes) { + public FaxListResponse faxes(@javax.annotation.Nonnull List faxes) { this.faxes = faxes; return this; } @@ -81,11 +81,11 @@ public List getFaxes() { @JsonProperty(JSON_PROPERTY_FAXES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxes(List faxes) { + public void setFaxes(@javax.annotation.Nonnull List faxes) { this.faxes = faxes; } - public FaxListResponse listInfo(ListInfoResponse listInfo) { + public FaxListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -104,7 +104,7 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java index ebe69e4dc..7ef24b5cc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -41,41 +41,43 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponse { public static final String JSON_PROPERTY_FAX_ID = "fax_id"; - private String faxId; + @javax.annotation.Nonnull private String faxId; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nonnull private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nonnull private String originalTitle; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = new HashMap<>(); + @javax.annotation.Nonnull private Map metadata = new HashMap<>(); public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nonnull private Integer createdAt; public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; + @javax.annotation.Nonnull private String sender; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nonnull private String filesUrl; public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + + @javax.annotation.Nonnull private List transmissions = new ArrayList<>(); public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public FaxResponse() {} @@ -93,7 +95,7 @@ public static FaxResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxResponse.class); } - public FaxResponse faxId(String faxId) { + public FaxResponse faxId(@javax.annotation.Nonnull String faxId) { this.faxId = faxId; return this; } @@ -112,11 +114,11 @@ public String getFaxId() { @JsonProperty(JSON_PROPERTY_FAX_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxId(String faxId) { + public void setFaxId(@javax.annotation.Nonnull String faxId) { this.faxId = faxId; } - public FaxResponse title(String title) { + public FaxResponse title(@javax.annotation.Nonnull String title) { this.title = title; return this; } @@ -135,11 +137,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public FaxResponse originalTitle(String originalTitle) { + public FaxResponse originalTitle(@javax.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -158,11 +160,11 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; } - public FaxResponse metadata(Map metadata) { + public FaxResponse metadata(@javax.annotation.Nonnull Map metadata) { this.metadata = metadata; return this; } @@ -189,11 +191,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nonnull Map metadata) { this.metadata = metadata; } - public FaxResponse createdAt(Integer createdAt) { + public FaxResponse createdAt(@javax.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; return this; } @@ -212,11 +214,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; } - public FaxResponse sender(String sender) { + public FaxResponse sender(@javax.annotation.Nonnull String sender) { this.sender = sender; return this; } @@ -235,11 +237,11 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSender(String sender) { + public void setSender(@javax.annotation.Nonnull String sender) { this.sender = sender; } - public FaxResponse filesUrl(String filesUrl) { + public FaxResponse filesUrl(@javax.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -258,11 +260,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; } - public FaxResponse transmissions(List transmissions) { + public FaxResponse transmissions( + @javax.annotation.Nonnull List transmissions) { this.transmissions = transmissions; return this; } @@ -289,11 +292,12 @@ public List getTransmissions() { @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTransmissions(List transmissions) { + public void setTransmissions( + @javax.annotation.Nonnull List transmissions) { this.transmissions = transmissions; } - public FaxResponse subject(String subject) { + public FaxResponse subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -311,11 +315,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public FaxResponse message(String message) { + public FaxResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -333,11 +337,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public FaxResponse finalCopyUri(String finalCopyUri) { + public FaxResponse finalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -355,7 +359,7 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java index 684e2ba86..133bde289 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -33,29 +33,29 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponseTransmission { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; + @javax.annotation.Nonnull private String recipient; /** Fax Transmission Status Code */ public enum StatusCodeEnum { - SUCCESS("success"), + SUCCESS(String.valueOf("success")), - TRANSMITTING("transmitting"), + TRANSMITTING(String.valueOf("transmitting")), - ERROR_COULD_NOT_FAX("error_could_not_fax"), + ERROR_COULD_NOT_FAX(String.valueOf("error_could_not_fax")), - ERROR_UNKNOWN("error_unknown"), + ERROR_UNKNOWN(String.valueOf("error_unknown")), - ERROR_BUSY("error_busy"), + ERROR_BUSY(String.valueOf("error_busy")), - ERROR_NO_ANSWER("error_no_answer"), + ERROR_NO_ANSWER(String.valueOf("error_no_answer")), - ERROR_DISCONNECTED("error_disconnected"), + ERROR_DISCONNECTED(String.valueOf("error_disconnected")), - ERROR_BAD_DESTINATION("error_bad_destination"); + ERROR_BAD_DESTINATION(String.valueOf("error_bad_destination")); private String value; @@ -85,10 +85,10 @@ public static StatusCodeEnum fromValue(String value) { } public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private StatusCodeEnum statusCode; + @javax.annotation.Nonnull private StatusCodeEnum statusCode; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; + @javax.annotation.Nullable private Integer sentAt; public FaxResponseTransmission() {} @@ -107,7 +107,7 @@ public static FaxResponseTransmission init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxResponseTransmission.class); } - public FaxResponseTransmission recipient(String recipient) { + public FaxResponseTransmission recipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } @@ -126,11 +126,11 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + public FaxResponseTransmission statusCode(@javax.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; return this; } @@ -149,11 +149,11 @@ public StatusCodeEnum getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatusCode(StatusCodeEnum statusCode) { + public void setStatusCode(@javax.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; } - public FaxResponseTransmission sentAt(Integer sentAt) { + public FaxResponseTransmission sentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -171,7 +171,7 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java index 571ba92f8..27975b0d3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -40,35 +40,35 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxSendRequest { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; + @javax.annotation.Nonnull private String recipient; public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; + @javax.annotation.Nullable private String sender; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; - private String coverPageTo; + @javax.annotation.Nullable private String coverPageTo; public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; - private String coverPageFrom; + @javax.annotation.Nullable private String coverPageFrom; public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; - private String coverPageMessage; + @javax.annotation.Nullable private String coverPageMessage; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public FaxSendRequest() {} @@ -86,13 +86,13 @@ public static FaxSendRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxSendRequest.class); } - public FaxSendRequest recipient(String recipient) { + public FaxSendRequest recipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } /** - * Fax Send To Recipient + * Recipient of the fax Can be a phone number in E.164 format or email address * * @return recipient */ @@ -105,11 +105,11 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxSendRequest sender(String sender) { + public FaxSendRequest sender(@javax.annotation.Nullable String sender) { this.sender = sender; return this; } @@ -127,11 +127,11 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSender(String sender) { + public void setSender(@javax.annotation.Nullable String sender) { this.sender = sender; } - public FaxSendRequest files(List files) { + public FaxSendRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -145,7 +145,8 @@ public FaxSendRequest addFilesItem(File filesItem) { } /** - * Fax File to Send + * Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either + * **files** or **file_urls[]**, but not both. * * @return files */ @@ -157,11 +158,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public FaxSendRequest fileUrls(List fileUrls) { + public FaxSendRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -175,7 +176,8 @@ public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { } /** - * Fax File URL to Send + * Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint + * requires either **files** or **file_urls[]**, but not both. * * @return fileUrls */ @@ -187,11 +189,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public FaxSendRequest testMode(Boolean testMode) { + public FaxSendRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -209,17 +211,17 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public FaxSendRequest coverPageTo(String coverPageTo) { + public FaxSendRequest coverPageTo(@javax.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; return this; } /** - * Fax Cover Page for Recipient + * Fax cover page recipient information * * @return coverPageTo */ @@ -231,17 +233,17 @@ public String getCoverPageTo() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageTo(String coverPageTo) { + public void setCoverPageTo(@javax.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; } - public FaxSendRequest coverPageFrom(String coverPageFrom) { + public FaxSendRequest coverPageFrom(@javax.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; return this; } /** - * Fax Cover Page for Sender + * Fax cover page sender information * * @return coverPageFrom */ @@ -253,11 +255,11 @@ public String getCoverPageFrom() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageFrom(String coverPageFrom) { + public void setCoverPageFrom(@javax.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; } - public FaxSendRequest coverPageMessage(String coverPageMessage) { + public FaxSendRequest coverPageMessage(@javax.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; return this; } @@ -275,11 +277,11 @@ public String getCoverPageMessage() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageMessage(String coverPageMessage) { + public void setCoverPageMessage(@javax.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; } - public FaxSendRequest title(String title) { + public FaxSendRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -297,7 +299,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java index 15282d488..c03740895 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java @@ -27,14 +27,14 @@ @JsonPropertyOrder({FileResponse.JSON_PROPERTY_FILE_URL, FileResponse.JSON_PROPERTY_EXPIRES_AT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponse { public static final String JSON_PROPERTY_FILE_URL = "file_url"; - private String fileUrl; + @javax.annotation.Nonnull private String fileUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nonnull private Integer expiresAt; public FileResponse() {} @@ -52,7 +52,7 @@ public static FileResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FileResponse.class); } - public FileResponse fileUrl(String fileUrl) { + public FileResponse fileUrl(@javax.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; return this; } @@ -71,11 +71,11 @@ public String getFileUrl() { @JsonProperty(JSON_PROPERTY_FILE_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFileUrl(String fileUrl) { + public void setFileUrl(@javax.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; } - public FileResponse expiresAt(Integer expiresAt) { + public FileResponse expiresAt(@javax.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -94,7 +94,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java index 995fca5c7..2a27822eb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({FileResponseDataUri.JSON_PROPERTY_DATA_URI}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponseDataUri { public static final String JSON_PROPERTY_DATA_URI = "data_uri"; - private String dataUri; + @javax.annotation.Nonnull private String dataUri; public FileResponseDataUri() {} @@ -49,7 +49,7 @@ public static FileResponseDataUri init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FileResponseDataUri.class); } - public FileResponseDataUri dataUri(String dataUri) { + public FileResponseDataUri dataUri(@javax.annotation.Nonnull String dataUri) { this.dataUri = dataUri; return this; } @@ -68,7 +68,7 @@ public String getDataUri() { @JsonProperty(JSON_PROPERTY_DATA_URI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDataUri(String dataUri) { + public void setDataUri(@javax.annotation.Nonnull String dataUri) { this.dataUri = dataUri; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java index f8647d314..3ed8ddfe5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ListInfoResponse { public static final String JSON_PROPERTY_NUM_PAGES = "num_pages"; - private Integer numPages; + @javax.annotation.Nullable private Integer numPages; public static final String JSON_PROPERTY_NUM_RESULTS = "num_results"; - private Integer numResults; + @javax.annotation.Nullable private Integer numResults; public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; + @javax.annotation.Nullable private Integer page; public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; - private Integer pageSize; + @javax.annotation.Nullable private Integer pageSize; public ListInfoResponse() {} @@ -63,7 +63,7 @@ public static ListInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ListInfoResponse.class); } - public ListInfoResponse numPages(Integer numPages) { + public ListInfoResponse numPages(@javax.annotation.Nullable Integer numPages) { this.numPages = numPages; return this; } @@ -81,11 +81,11 @@ public Integer getNumPages() { @JsonProperty(JSON_PROPERTY_NUM_PAGES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumPages(Integer numPages) { + public void setNumPages(@javax.annotation.Nullable Integer numPages) { this.numPages = numPages; } - public ListInfoResponse numResults(Integer numResults) { + public ListInfoResponse numResults(@javax.annotation.Nullable Integer numResults) { this.numResults = numResults; return this; } @@ -103,11 +103,11 @@ public Integer getNumResults() { @JsonProperty(JSON_PROPERTY_NUM_RESULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumResults(Integer numResults) { + public void setNumResults(@javax.annotation.Nullable Integer numResults) { this.numResults = numResults; } - public ListInfoResponse page(Integer page) { + public ListInfoResponse page(@javax.annotation.Nullable Integer page) { this.page = page; return this; } @@ -125,11 +125,11 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@javax.annotation.Nullable Integer page) { this.page = page; } - public ListInfoResponse pageSize(Integer pageSize) { + public ListInfoResponse pageSize(@javax.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; return this; } @@ -147,7 +147,7 @@ public Integer getPageSize() { @JsonProperty(JSON_PROPERTY_PAGE_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(Integer pageSize) { + public void setPageSize(@javax.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java index b3dd4a140..5ef1cb685 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java @@ -33,23 +33,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenGenerateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nonnull private String clientSecret; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + @javax.annotation.Nonnull private String code; public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "authorization_code"; + @javax.annotation.Nonnull private String grantType = "authorization_code"; public static final String JSON_PROPERTY_STATE = "state"; - private String state; + @javax.annotation.Nonnull private String state; public OAuthTokenGenerateRequest() {} @@ -69,7 +69,7 @@ public static OAuthTokenGenerateRequest init(HashMap data) throws Exception { OAuthTokenGenerateRequest.class); } - public OAuthTokenGenerateRequest clientId(String clientId) { + public OAuthTokenGenerateRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -88,11 +88,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public OAuthTokenGenerateRequest clientSecret(String clientSecret) { + public OAuthTokenGenerateRequest clientSecret(@javax.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -111,11 +111,11 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; } - public OAuthTokenGenerateRequest code(String code) { + public OAuthTokenGenerateRequest code(@javax.annotation.Nonnull String code) { this.code = code; return this; } @@ -134,11 +134,11 @@ public String getCode() { @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } - public OAuthTokenGenerateRequest grantType(String grantType) { + public OAuthTokenGenerateRequest grantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -157,11 +157,11 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenGenerateRequest state(String state) { + public OAuthTokenGenerateRequest state(@javax.annotation.Nonnull String state) { this.state = state; return this; } @@ -180,7 +180,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java index 75979827e..d8226d6a7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "refresh_token"; + @javax.annotation.Nonnull private String grantType = "refresh_token"; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; + @javax.annotation.Nonnull private String refreshToken; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nullable private String clientSecret; public OAuthTokenRefreshRequest() {} @@ -65,7 +65,7 @@ public static OAuthTokenRefreshRequest init(HashMap data) throws Exception { OAuthTokenRefreshRequest.class); } - public OAuthTokenRefreshRequest grantType(String grantType) { + public OAuthTokenRefreshRequest grantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -84,11 +84,11 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenRefreshRequest refreshToken(String refreshToken) { + public OAuthTokenRefreshRequest refreshToken(@javax.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -107,11 +107,11 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@javax.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenRefreshRequest clientId(String clientId) { + public OAuthTokenRefreshRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -131,11 +131,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + public OAuthTokenRefreshRequest clientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -155,7 +155,7 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java index f7392f322..278d62579 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java @@ -33,23 +33,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenResponse { public static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token"; - private String accessToken; + @javax.annotation.Nullable private String accessToken; public static final String JSON_PROPERTY_TOKEN_TYPE = "token_type"; - private String tokenType; + @javax.annotation.Nullable private String tokenType; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; + @javax.annotation.Nullable private String refreshToken; public static final String JSON_PROPERTY_EXPIRES_IN = "expires_in"; - private Integer expiresIn; + @javax.annotation.Nullable private Integer expiresIn; public static final String JSON_PROPERTY_STATE = "state"; - private String state; + @javax.annotation.Nullable private String state; public OAuthTokenResponse() {} @@ -67,7 +67,7 @@ public static OAuthTokenResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), OAuthTokenResponse.class); } - public OAuthTokenResponse accessToken(String accessToken) { + public OAuthTokenResponse accessToken(@javax.annotation.Nullable String accessToken) { this.accessToken = accessToken; return this; } @@ -85,11 +85,11 @@ public String getAccessToken() { @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccessToken(String accessToken) { + public void setAccessToken(@javax.annotation.Nullable String accessToken) { this.accessToken = accessToken; } - public OAuthTokenResponse tokenType(String tokenType) { + public OAuthTokenResponse tokenType(@javax.annotation.Nullable String tokenType) { this.tokenType = tokenType; return this; } @@ -107,11 +107,11 @@ public String getTokenType() { @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenType(String tokenType) { + public void setTokenType(@javax.annotation.Nullable String tokenType) { this.tokenType = tokenType; } - public OAuthTokenResponse refreshToken(String refreshToken) { + public OAuthTokenResponse refreshToken(@javax.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -129,11 +129,11 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@javax.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenResponse expiresIn(Integer expiresIn) { + public OAuthTokenResponse expiresIn(@javax.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; return this; } @@ -151,11 +151,11 @@ public Integer getExpiresIn() { @JsonProperty(JSON_PROPERTY_EXPIRES_IN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresIn(Integer expiresIn) { + public void setExpiresIn(@javax.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; } - public OAuthTokenResponse state(String state) { + public OAuthTokenResponse state(@javax.annotation.Nullable String state) { this.state = state; return this; } @@ -173,7 +173,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setState(String state) { + public void setState(@javax.annotation.Nullable String state) { this.state = state; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java index 293fd1568..c5c3fd88f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java @@ -35,17 +35,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateRequest { public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; + @javax.annotation.Nonnull private String endDate; /** Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -75,10 +75,10 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = new ArrayList<>(); + @javax.annotation.Nonnull private List reportType = new ArrayList<>(); public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; + @javax.annotation.Nonnull private String startDate; public ReportCreateRequest() {} @@ -96,7 +96,7 @@ public static ReportCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateRequest.class); } - public ReportCreateRequest endDate(String endDate) { + public ReportCreateRequest endDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; return this; } @@ -115,11 +115,12 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEndDate(String endDate) { + public void setEndDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; } - public ReportCreateRequest reportType(List reportType) { + public ReportCreateRequest reportType( + @javax.annotation.Nonnull List reportType) { this.reportType = reportType; return this; } @@ -149,11 +150,11 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReportType(List reportType) { + public void setReportType(@javax.annotation.Nonnull List reportType) { this.reportType = reportType; } - public ReportCreateRequest startDate(String startDate) { + public ReportCreateRequest startDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; return this; } @@ -172,7 +173,7 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStartDate(String startDate) { + public void setStartDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java index 526daf04a..70af485a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateResponse { public static final String JSON_PROPERTY_REPORT = "report"; - private ReportResponse report; + @javax.annotation.Nonnull private ReportResponse report; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ReportCreateResponse() {} @@ -57,7 +57,7 @@ public static ReportCreateResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateResponse.class); } - public ReportCreateResponse report(ReportResponse report) { + public ReportCreateResponse report(@javax.annotation.Nonnull ReportResponse report) { this.report = report; return this; } @@ -76,11 +76,12 @@ public ReportResponse getReport() { @JsonProperty(JSON_PROPERTY_REPORT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReport(ReportResponse report) { + public void setReport(@javax.annotation.Nonnull ReportResponse report) { this.report = report; } - public ReportCreateResponse warnings(List warnings) { + public ReportCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +107,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java index aec19023a..29d5b88cf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java @@ -36,23 +36,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportResponse { public static final String JSON_PROPERTY_SUCCESS = "success"; - private String success; + @javax.annotation.Nullable private String success; public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; + @javax.annotation.Nullable private String startDate; public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; + @javax.annotation.Nullable private String endDate; /** Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -82,7 +82,7 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = null; + @javax.annotation.Nullable private List reportType = null; public ReportResponse() {} @@ -100,7 +100,7 @@ public static ReportResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportResponse.class); } - public ReportResponse success(String success) { + public ReportResponse success(@javax.annotation.Nullable String success) { this.success = success; return this; } @@ -118,11 +118,11 @@ public String getSuccess() { @JsonProperty(JSON_PROPERTY_SUCCESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(String success) { + public void setSuccess(@javax.annotation.Nullable String success) { this.success = success; } - public ReportResponse startDate(String startDate) { + public ReportResponse startDate(@javax.annotation.Nullable String startDate) { this.startDate = startDate; return this; } @@ -140,11 +140,11 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartDate(String startDate) { + public void setStartDate(@javax.annotation.Nullable String startDate) { this.startDate = startDate; } - public ReportResponse endDate(String endDate) { + public ReportResponse endDate(@javax.annotation.Nullable String endDate) { this.endDate = endDate; return this; } @@ -162,11 +162,11 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndDate(String endDate) { + public void setEndDate(@javax.annotation.Nullable String endDate) { this.endDate = endDate; } - public ReportResponse reportType(List reportType) { + public ReportResponse reportType(@javax.annotation.Nullable List reportType) { this.reportType = reportType; return this; } @@ -195,7 +195,7 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportType(List reportType) { + public void setReportType(@javax.annotation.Nullable List reportType) { this.reportType = reportType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index d1d74538d..fda33d504 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -44,47 +44,47 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; + @javax.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; + @javax.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestBulkCreateEmbeddedWithTemplateRequest() {} @@ -108,7 +108,7 @@ public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest init(HashMap } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest templateIds( - List templateIds) { + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -137,11 +137,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -161,11 +162,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile( + @javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -200,12 +202,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerList( - List signerList) { + @javax.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -233,12 +235,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@javax.annotation.Nullable List signerList) { this.signerList = signerList; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest allowDecline( - Boolean allowDecline) { + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -257,11 +259,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -287,12 +290,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -329,11 +332,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -351,12 +355,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -387,12 +391,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -410,11 +414,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -432,11 +437,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -455,11 +461,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -477,7 +484,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index 0d61875e3..67ab53ea1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -44,47 +44,47 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; + @javax.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; + @javax.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestBulkSendWithTemplateRequest() {} @@ -106,7 +106,8 @@ public static SignatureRequestBulkSendWithTemplateRequest init(HashMap data) thr SignatureRequestBulkSendWithTemplateRequest.class); } - public SignatureRequestBulkSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestBulkSendWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -134,11 +135,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkSendWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkSendWithTemplateRequest signerFile( + @javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -173,12 +175,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; } public SignatureRequestBulkSendWithTemplateRequest signerList( - List signerList) { + @javax.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -206,11 +208,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@javax.annotation.Nullable List signerList) { this.signerList = signerList; } - public SignatureRequestBulkSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestBulkSendWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -229,11 +232,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkSendWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -259,11 +263,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestBulkSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkSendWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -282,12 +287,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } public SignatureRequestBulkSendWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -324,11 +329,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkSendWithTemplateRequest message(String message) { + public SignatureRequestBulkSendWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -346,11 +352,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestBulkSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestBulkSendWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -381,12 +388,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestBulkSendWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -404,11 +411,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkSendWithTemplateRequest subject(String subject) { + public SignatureRequestBulkSendWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -426,11 +434,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkSendWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -449,11 +458,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkSendWithTemplateRequest title(String title) { + public SignatureRequestBulkSendWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -471,7 +481,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java index 6652702fb..8e1987c37 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java @@ -55,81 +55,83 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestCreateEmbeddedRequest() {} @@ -149,7 +151,8 @@ public static SignatureRequestCreateEmbeddedRequest init(HashMap data) throws Ex SignatureRequestCreateEmbeddedRequest.class); } - public SignatureRequestCreateEmbeddedRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,11 +172,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestCreateEmbeddedRequest files(List files) { + public SignatureRequestCreateEmbeddedRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -200,11 +204,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -231,11 +236,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedRequest signers(List signers) { + public SignatureRequestCreateEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -263,12 +269,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestCreateEmbeddedRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -296,11 +302,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -319,11 +327,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public SignatureRequestCreateEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -342,11 +351,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestCreateEmbeddedRequest attachments(List attachments) { + public SignatureRequestCreateEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -372,11 +382,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestCreateEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -403,11 +414,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestCreateEmbeddedRequest customFields(List customFields) { + public SignatureRequestCreateEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -444,11 +456,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestCreateEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -466,12 +479,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } public SignatureRequestCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -501,12 +514,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public SignatureRequestCreateEmbeddedRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -533,12 +547,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -580,11 +595,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestCreateEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -606,11 +623,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public SignatureRequestCreateEmbeddedRequest message(String message) { + public SignatureRequestCreateEmbeddedRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -628,11 +646,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestCreateEmbeddedRequest metadata(Map metadata) { + public SignatureRequestCreateEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -662,11 +681,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestCreateEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -684,11 +704,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedRequest subject(String subject) { + public SignatureRequestCreateEmbeddedRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -706,11 +727,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -729,11 +751,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedRequest title(String title) { + public SignatureRequestCreateEmbeddedRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -751,11 +773,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public SignatureRequestCreateEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -775,12 +798,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } public SignatureRequestCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -802,11 +825,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public SignatureRequestCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public SignatureRequestCreateEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -826,7 +851,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java index 7769adeab..a6b8c00ec 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java @@ -46,54 +46,56 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public SignatureRequestCreateEmbeddedWithTemplateRequest() {} @@ -116,7 +118,8 @@ public static SignatureRequestCreateEmbeddedWithTemplateRequest init(HashMap dat SignatureRequestCreateEmbeddedWithTemplateRequest.class); } - public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -145,11 +148,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,12 +173,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } public SignatureRequestCreateEmbeddedWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -202,11 +206,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -225,11 +231,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -255,12 +262,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public SignatureRequestCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -288,11 +295,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedWithTemplateRequest files(List files) { + public SignatureRequestCreateEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -319,11 +327,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -350,11 +359,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -372,12 +382,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } public SignatureRequestCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -408,12 +418,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -431,11 +441,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -453,11 +464,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -476,11 +488,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -498,12 +511,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } public SignatureRequestCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -525,7 +538,8 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java new file mode 100644 index 000000000..752946426 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java @@ -0,0 +1,1492 @@ +/* + * 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; + +/** SignatureRequestEditEmbeddedRequest */ +@JsonPropertyOrder({ + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_GROUPED_SIGNERS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_REASSIGN, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ATTACHMENTS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FIELD_OPTIONS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_RULES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_USE_TEXT_TAGS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SignatureRequestEditEmbeddedRequest { + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @javax.annotation.Nonnull private String clientId; + + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nullable private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @javax.annotation.Nullable private List fileUrls = null; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @javax.annotation.Nullable private List signers = null; + + public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + + @javax.annotation.Nullable private List groupedSigners = null; + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @javax.annotation.Nullable private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @javax.annotation.Nullable private Boolean allowReassign = false; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @javax.annotation.Nullable private List attachments = null; + + public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @javax.annotation.Nullable private List ccEmailAddresses = null; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @javax.annotation.Nullable private List customFields = null; + + public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; + + public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @javax.annotation.Nullable private List formFieldGroups = null; + + public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @javax.annotation.Nullable private List formFieldRules = null; + + public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; + + public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @javax.annotation.Nullable private Boolean hideTextTags = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @javax.annotation.Nullable private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @javax.annotation.Nullable private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @javax.annotation.Nullable private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable private String title; + + public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @javax.annotation.Nullable private Boolean useTextTags = false; + + public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = + "populate_auto_fill_fields"; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @javax.annotation.Nullable private Integer expiresAt; + + public SignatureRequestEditEmbeddedRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SignatureRequestEditEmbeddedRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditEmbeddedRequest.class); + } + + public static SignatureRequestEditEmbeddedRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditEmbeddedRequest.class); + } + + public SignatureRequestEditEmbeddedRequest clientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app you're using to create this embedded signature request. Used for + * security purposes. + * + * @return clientId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public SignatureRequestEditEmbeddedRequest files(@javax.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint + * requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List files) { + this.files = files; + } + + public SignatureRequestEditEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + * This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + public SignatureRequestEditEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditEmbeddedRequest addSignersItem( + SubSignatureRequestSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or + * **grouped_signers**, but not both. + * + * @return signers + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSigners() { + return signers; + } + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigners(@javax.annotation.Nullable List signers) { + this.signers = signers; + } + + public SignatureRequestEditEmbeddedRequest groupedSigners( + @javax.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + return this; + } + + public SignatureRequestEditEmbeddedRequest addGroupedSignersItem( + SubSignatureRequestGroupedSigners groupedSignersItem) { + if (this.groupedSigners == null) { + this.groupedSigners = new ArrayList<>(); + } + this.groupedSigners.add(groupedSignersItem); + return this; + } + + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or + * **grouped_signers**, but not both. + * + * @return groupedSigners + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupedSigners() { + return groupedSigners; + } + + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + } + + public SignatureRequestEditEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to + * `false`. + * + * @return allowDecline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowDecline() { + return allowDecline; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + public SignatureRequestEditEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + return this; + } + + /** + * Allows signers to reassign their signature requests to other signers if set to + * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + * + * @return allowReassign + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowReassign() { + return allowReassign; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + } + + public SignatureRequestEditEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { + this.attachments = attachments; + return this; + } + + public SignatureRequestEditEmbeddedRequest addAttachmentsItem(SubAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * A list describing the 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(@javax.annotation.Nullable List attachments) { + this.attachments = attachments; + } + + public SignatureRequestEditEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + return this; + } + + public SignatureRequestEditEmbeddedRequest addCcEmailAddressesItem( + String ccEmailAddressesItem) { + if (this.ccEmailAddresses == null) { + this.ccEmailAddresses = new ArrayList<>(); + } + this.ccEmailAddresses.add(ccEmailAddressesItem); + return this; + } + + /** + * The email addresses that should be CCed. + * + * @return ccEmailAddresses + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCcEmailAddresses() { + return ccEmailAddresses; + } + + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + } + + public SignatureRequestEditEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditEmbeddedRequest addCustomFieldsItem( + SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * When used together with merge fields, `custom_fields` allows users to add + * pre-filled data to their signature requests. Pre-filled data can be used with + * \"send-once\" signature requests by adding merge fields with + * `form_fields_per_document` or [Text + * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values + * back with `custom_fields` together in one API call. For using pre-filled on + * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or + * by calling + * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and + * then passing `custom_fields` on subsequent signature requests referencing that + * template. + * + * @return customFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@javax.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public SignatureRequestEditEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + return this; + } + + /** + * Get fieldOptions + * + * @return fieldOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubFieldOptions getFieldOptions() { + return fieldOptions; + } + + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + } + + public SignatureRequestEditEmbeddedRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldGroupsItem( + SubFormFieldGroup formFieldGroupsItem) { + if (this.formFieldGroups == null) { + this.formFieldGroups = new ArrayList<>(); + } + this.formFieldGroups.add(formFieldGroupsItem); + return this; + } + + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed + * JSON array with `group_label` and `requirement` keys. + * `form_fields_per_document` must contain fields referencing a group defined in + * `form_field_groups`. + * + * @return formFieldGroups + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldGroups() { + return formFieldGroups; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + } + + public SignatureRequestEditEmbeddedRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldRulesItem( + SubFormFieldRule formFieldRulesItem) { + if (this.formFieldRules == null) { + this.formFieldRules = new ArrayList<>(); + } + this.formFieldRules.add(formFieldRulesItem); + return this; + } + + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + * + * @return formFieldRules + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldRules() { + return formFieldRules; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + } + + public SignatureRequestEditEmbeddedRequest formFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldsPerDocumentItem( + SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { + if (this.formFieldsPerDocument == null) { + this.formFieldsPerDocument = new ArrayList<>(); + } + this.formFieldsPerDocument.add(formFieldsPerDocumentItem); + return this; + } + + /** + * The fields that should appear on the document, expressed as an array of objects. (For more + * details you can read about it here: [Using Form Fields per + * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, + * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and + * optional parameters. Check out the list of [additional + * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text + * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use + * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use + * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use + * `SubFormFieldsPerDocumentCheckbox` * Radio Field use + * `SubFormFieldsPerDocumentRadio` * Signature Field use + * `SubFormFieldsPerDocumentSignature` * Date Signed Field use + * `SubFormFieldsPerDocumentDateSigned` * Initials Field use + * `SubFormFieldsPerDocumentInitials` * Text Merge Field use + * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use + * `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return formFieldsPerDocument + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldsPerDocument() { + return formFieldsPerDocument; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + } + + public SignatureRequestEditEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + return this; + } + + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way + * can cause unwanted clipping. We recommend leaving this setting on `false` and + * instead hiding your text tags using white text or a similar approach. See the [Text Tags + * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more + * information. + * + * @return hideTextTags + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideTextTags() { + return hideTextTags; + } + + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + } + + public SignatureRequestEditEmbeddedRequest message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * + * @return message + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + public SignatureRequestEditEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditEmbeddedRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in + * all API responses and events involving the signature request. For example, use the metadata + * field to store a signer's order number for look up when receiving events for the + * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata + * keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return metadata + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + public SignatureRequestEditEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * + * @return signingOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + public SignatureRequestEditEmbeddedRequest subject(@javax.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * + * @return subject + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@javax.annotation.Nullable String subject) { + this.subject = subject; + } + + public SignatureRequestEditEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to + * `true`. Defaults to `false`. + * + * @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(@javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + public SignatureRequestEditEmbeddedRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * + * @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(@javax.annotation.Nullable String title) { + this.title = title; + } + + public SignatureRequestEditEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [Text + * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your + * document. Defaults to disabled, or `false`. + * + * @return useTextTags + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseTextTags() { + return useTextTags; + } + + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + } + + public SignatureRequestEditEmbeddedRequest populateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + return this; + } + + /** + * Controls whether [auto fill + * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can + * automatically populate a signer's information during signing. **NOTE:** Keep your + * signer's information safe by ensuring that the _signer on your signature request is the + * intended party_ before using this feature. + * + * @return populateAutoFillFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPopulateAutoFillFields() { + return populateAutoFillFields; + } + + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + } + + public SignatureRequestEditEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired + * status, and no longer signable. See [Signature Request Expiration + * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return expiresAt + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this SignatureRequestEditEmbeddedRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest = + (SignatureRequestEditEmbeddedRequest) o; + return Objects.equals(this.clientId, signatureRequestEditEmbeddedRequest.clientId) + && Objects.equals(this.files, signatureRequestEditEmbeddedRequest.files) + && Objects.equals(this.fileUrls, signatureRequestEditEmbeddedRequest.fileUrls) + && Objects.equals(this.signers, signatureRequestEditEmbeddedRequest.signers) + && Objects.equals( + this.groupedSigners, signatureRequestEditEmbeddedRequest.groupedSigners) + && Objects.equals( + this.allowDecline, signatureRequestEditEmbeddedRequest.allowDecline) + && Objects.equals( + this.allowReassign, signatureRequestEditEmbeddedRequest.allowReassign) + && Objects.equals(this.attachments, signatureRequestEditEmbeddedRequest.attachments) + && Objects.equals( + this.ccEmailAddresses, signatureRequestEditEmbeddedRequest.ccEmailAddresses) + && Objects.equals( + this.customFields, signatureRequestEditEmbeddedRequest.customFields) + && Objects.equals( + this.fieldOptions, signatureRequestEditEmbeddedRequest.fieldOptions) + && Objects.equals( + this.formFieldGroups, signatureRequestEditEmbeddedRequest.formFieldGroups) + && Objects.equals( + this.formFieldRules, signatureRequestEditEmbeddedRequest.formFieldRules) + && Objects.equals( + this.formFieldsPerDocument, + signatureRequestEditEmbeddedRequest.formFieldsPerDocument) + && Objects.equals( + this.hideTextTags, signatureRequestEditEmbeddedRequest.hideTextTags) + && Objects.equals(this.message, signatureRequestEditEmbeddedRequest.message) + && Objects.equals(this.metadata, signatureRequestEditEmbeddedRequest.metadata) + && Objects.equals( + this.signingOptions, signatureRequestEditEmbeddedRequest.signingOptions) + && Objects.equals(this.subject, signatureRequestEditEmbeddedRequest.subject) + && Objects.equals(this.testMode, signatureRequestEditEmbeddedRequest.testMode) + && Objects.equals(this.title, signatureRequestEditEmbeddedRequest.title) + && Objects.equals(this.useTextTags, signatureRequestEditEmbeddedRequest.useTextTags) + && Objects.equals( + this.populateAutoFillFields, + signatureRequestEditEmbeddedRequest.populateAutoFillFields) + && Objects.equals(this.expiresAt, signatureRequestEditEmbeddedRequest.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash( + clientId, + files, + fileUrls, + signers, + groupedSigners, + allowDecline, + allowReassign, + attachments, + ccEmailAddresses, + customFields, + fieldOptions, + formFieldGroups, + formFieldRules, + formFieldsPerDocument, + hideTextTags, + message, + metadata, + signingOptions, + subject, + testMode, + title, + useTextTags, + populateAutoFillFields, + expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditEmbeddedRequest {\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); + sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); + sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); + sb.append(" formFieldsPerDocument: ") + .append(toIndentedString(formFieldsPerDocument)) + .append("\n"); + sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); + sb.append(" populateAutoFillFields: ") + .append(toIndentedString(populateAutoFillFields)) + .append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + 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 (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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) + || signers.getClass().equals(Integer.class) + || signers.getClass().equals(String.class) + || signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for (int i = 0; i < getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (groupedSigners != null) { + if (isFileTypeOrListOfFiles(groupedSigners)) { + fileTypeFound = true; + } + + if (groupedSigners.getClass().equals(java.io.File.class) + || groupedSigners.getClass().equals(Integer.class) + || groupedSigners.getClass().equals(String.class) + || groupedSigners.getClass().isEnum()) { + map.put("grouped_signers", groupedSigners); + } else if (isListOfFile(groupedSigners)) { + for (int i = 0; i < getListSize(groupedSigners); i++) { + map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); + } + } else { + map.put( + "grouped_signers", + JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) + || allowDecline.getClass().equals(Integer.class) + || allowDecline.getClass().equals(String.class) + || allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for (int i = 0; i < getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } else { + map.put( + "allow_decline", + JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (allowReassign != null) { + if (isFileTypeOrListOfFiles(allowReassign)) { + fileTypeFound = true; + } + + if (allowReassign.getClass().equals(java.io.File.class) + || allowReassign.getClass().equals(Integer.class) + || allowReassign.getClass().equals(String.class) + || allowReassign.getClass().isEnum()) { + map.put("allow_reassign", allowReassign); + } else if (isListOfFile(allowReassign)) { + for (int i = 0; i < getListSize(allowReassign); i++) { + map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); + } + } else { + map.put( + "allow_reassign", + JSON.getDefault().getMapper().writeValueAsString(allowReassign)); + } + } + 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)); + } + } + if (ccEmailAddresses != null) { + if (isFileTypeOrListOfFiles(ccEmailAddresses)) { + fileTypeFound = true; + } + + if (ccEmailAddresses.getClass().equals(java.io.File.class) + || ccEmailAddresses.getClass().equals(Integer.class) + || ccEmailAddresses.getClass().equals(String.class) + || ccEmailAddresses.getClass().isEnum()) { + map.put("cc_email_addresses", ccEmailAddresses); + } else if (isListOfFile(ccEmailAddresses)) { + for (int i = 0; i < getListSize(ccEmailAddresses); i++) { + map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); + } + } else { + map.put( + "cc_email_addresses", + JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); + } + } + if (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) + || customFields.getClass().equals(Integer.class) + || customFields.getClass().equals(String.class) + || customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for (int i = 0; i < getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } else { + map.put( + "custom_fields", + JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + if (fieldOptions != null) { + if (isFileTypeOrListOfFiles(fieldOptions)) { + fileTypeFound = true; + } + + if (fieldOptions.getClass().equals(java.io.File.class) + || fieldOptions.getClass().equals(Integer.class) + || fieldOptions.getClass().equals(String.class) + || fieldOptions.getClass().isEnum()) { + map.put("field_options", fieldOptions); + } else if (isListOfFile(fieldOptions)) { + for (int i = 0; i < getListSize(fieldOptions); i++) { + map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); + } + } else { + map.put( + "field_options", + JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); + } + } + if (formFieldGroups != null) { + if (isFileTypeOrListOfFiles(formFieldGroups)) { + fileTypeFound = true; + } + + if (formFieldGroups.getClass().equals(java.io.File.class) + || formFieldGroups.getClass().equals(Integer.class) + || formFieldGroups.getClass().equals(String.class) + || formFieldGroups.getClass().isEnum()) { + map.put("form_field_groups", formFieldGroups); + } else if (isListOfFile(formFieldGroups)) { + for (int i = 0; i < getListSize(formFieldGroups); i++) { + map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); + } + } else { + map.put( + "form_field_groups", + JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); + } + } + if (formFieldRules != null) { + if (isFileTypeOrListOfFiles(formFieldRules)) { + fileTypeFound = true; + } + + if (formFieldRules.getClass().equals(java.io.File.class) + || formFieldRules.getClass().equals(Integer.class) + || formFieldRules.getClass().equals(String.class) + || formFieldRules.getClass().isEnum()) { + map.put("form_field_rules", formFieldRules); + } else if (isListOfFile(formFieldRules)) { + for (int i = 0; i < getListSize(formFieldRules); i++) { + map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); + } + } else { + map.put( + "form_field_rules", + JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); + } + } + if (formFieldsPerDocument != null) { + if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { + fileTypeFound = true; + } + + if (formFieldsPerDocument.getClass().equals(java.io.File.class) + || formFieldsPerDocument.getClass().equals(Integer.class) + || formFieldsPerDocument.getClass().equals(String.class) + || formFieldsPerDocument.getClass().isEnum()) { + map.put("form_fields_per_document", formFieldsPerDocument); + } else if (isListOfFile(formFieldsPerDocument)) { + for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { + map.put( + "form_fields_per_document[" + i + "]", + getFromList(formFieldsPerDocument, i)); + } + } else { + map.put( + "form_fields_per_document", + JSON.getDefault() + .getMapper() + .writeValueAsString(formFieldsPerDocument)); + } + } + if (hideTextTags != null) { + if (isFileTypeOrListOfFiles(hideTextTags)) { + fileTypeFound = true; + } + + if (hideTextTags.getClass().equals(java.io.File.class) + || hideTextTags.getClass().equals(Integer.class) + || hideTextTags.getClass().equals(String.class) + || hideTextTags.getClass().isEnum()) { + map.put("hide_text_tags", hideTextTags); + } else if (isListOfFile(hideTextTags)) { + for (int i = 0; i < getListSize(hideTextTags); i++) { + map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); + } + } else { + map.put( + "hide_text_tags", + JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) + || signingOptions.getClass().equals(Integer.class) + || signingOptions.getClass().equals(String.class) + || signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for (int i = 0; i < getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } else { + map.put( + "signing_options", + JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + 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 (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 (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 (useTextTags != null) { + if (isFileTypeOrListOfFiles(useTextTags)) { + fileTypeFound = true; + } + + if (useTextTags.getClass().equals(java.io.File.class) + || useTextTags.getClass().equals(Integer.class) + || useTextTags.getClass().equals(String.class) + || useTextTags.getClass().isEnum()) { + map.put("use_text_tags", useTextTags); + } else if (isListOfFile(useTextTags)) { + for (int i = 0; i < getListSize(useTextTags); i++) { + map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); + } + } else { + map.put( + "use_text_tags", + JSON.getDefault().getMapper().writeValueAsString(useTextTags)); + } + } + if (populateAutoFillFields != null) { + if (isFileTypeOrListOfFiles(populateAutoFillFields)) { + fileTypeFound = true; + } + + if (populateAutoFillFields.getClass().equals(java.io.File.class) + || populateAutoFillFields.getClass().equals(Integer.class) + || populateAutoFillFields.getClass().equals(String.class) + || populateAutoFillFields.getClass().isEnum()) { + map.put("populate_auto_fill_fields", populateAutoFillFields); + } else if (isListOfFile(populateAutoFillFields)) { + for (int i = 0; i < getListSize(populateAutoFillFields); i++) { + map.put( + "populate_auto_fill_fields[" + i + "]", + getFromList(populateAutoFillFields, i)); + } + } else { + map.put( + "populate_auto_fill_fields", + JSON.getDefault() + .getMapper() + .writeValueAsString(populateAutoFillFields)); + } + } + if (expiresAt != null) { + if (isFileTypeOrListOfFiles(expiresAt)) { + fileTypeFound = true; + } + + if (expiresAt.getClass().equals(java.io.File.class) + || expiresAt.getClass().equals(Integer.class) + || expiresAt.getClass().equals(String.class) + || expiresAt.getClass().isEnum()) { + map.put("expires_at", expiresAt); + } else if (isListOfFile(expiresAt)) { + for (int i = 0; i < getListSize(expiresAt); i++) { + map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); + } + } else { + map.put( + "expires_at", + JSON.getDefault().getMapper().writeValueAsString(expiresAt)); + } + } + } 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/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java new file mode 100644 index 000000000..6cd3dbed4 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java @@ -0,0 +1,973 @@ +/* + * 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; + +/** SignatureRequestEditEmbeddedWithTemplateRequest */ +@JsonPropertyOrder({ + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILES, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SignatureRequestEditEmbeddedWithTemplateRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @javax.annotation.Nonnull private String clientId; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull + private List signers = new ArrayList<>(); + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @javax.annotation.Nullable private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_CCS = "ccs"; + @javax.annotation.Nullable private List ccs = null; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @javax.annotation.Nullable private List customFields = null; + + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nullable private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @javax.annotation.Nullable private List fileUrls = null; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @javax.annotation.Nullable private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @javax.annotation.Nullable private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @javax.annotation.Nullable private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable private String title; + + public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = + "populate_auto_fill_fields"; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; + + public SignatureRequestEditEmbeddedWithTemplateRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SignatureRequestEditEmbeddedWithTemplateRequest init(String jsonData) + throws Exception { + return new ObjectMapper() + .readValue(jsonData, SignatureRequestEditEmbeddedWithTemplateRequest.class); + } + + public static SignatureRequestEditEmbeddedWithTemplateRequest init(HashMap data) + throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditEmbeddedWithTemplateRequest.class); + } + + public SignatureRequestEditEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addTemplateIdsItem( + String templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the + * order in which the template will be used. + * + * @return templateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateIds() { + return templateIds; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app you're using to create this embedded signature request. Used for + * security purposes. + * + * @return clientId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@javax.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest signers( + @javax.annotation.Nonnull List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addSignersItem( + SubSignatureRequestTemplateSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Templated-based Signature Request. + * + * @return signers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSigners() { + return signers; + } + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigners( + @javax.annotation.Nonnull List signers) { + this.signers = signers; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to + * `false`. + * + * @return allowDecline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowDecline() { + return allowDecline; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { + this.ccs = ccs; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { + if (this.ccs == null) { + this.ccs = new ArrayList<>(); + } + this.ccs.add(ccsItem); + return this; + } + + /** + * Add CC email recipients. Required when a CC role exists for the Template. + * + * @return ccs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCcs() { + return ccs; + } + + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcs(@javax.annotation.Nullable List ccs) { + this.ccs = ccs; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest customFields( + @javax.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addCustomFieldsItem( + SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * An array defining values and options for custom fields. Required when a custom field exists + * in the Template. + * + * @return customFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@javax.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint + * requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List files) { + this.files = files; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + * This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * + * @return message + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest putMetadataItem( + String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in + * all API responses and events involving the signature request. For example, use the metadata + * field to store a signer's order number for look up when receiving events for the + * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata + * keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return metadata + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * + * @return signingOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * + * @return subject + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@javax.annotation.Nullable String subject) { + this.subject = subject; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to + * `true`. Defaults to `false`. + * + * @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(@javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * + * @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(@javax.annotation.Nullable String title) { + this.title = title; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest populateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + return this; + } + + /** + * Controls whether [auto fill + * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can + * automatically populate a signer's information during signing. **NOTE:** Keep your + * signer's information safe by ensuring that the _signer on your signature request is the + * intended party_ before using this feature. + * + * @return populateAutoFillFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPopulateAutoFillFields() { + return populateAutoFillFields; + } + + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + } + + /** Return true if this SignatureRequestEditEmbeddedWithTemplateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditEmbeddedWithTemplateRequest + signatureRequestEditEmbeddedWithTemplateRequest = + (SignatureRequestEditEmbeddedWithTemplateRequest) o; + return Objects.equals( + this.templateIds, + signatureRequestEditEmbeddedWithTemplateRequest.templateIds) + && Objects.equals( + this.clientId, signatureRequestEditEmbeddedWithTemplateRequest.clientId) + && Objects.equals( + this.signers, signatureRequestEditEmbeddedWithTemplateRequest.signers) + && Objects.equals( + this.allowDecline, + signatureRequestEditEmbeddedWithTemplateRequest.allowDecline) + && Objects.equals(this.ccs, signatureRequestEditEmbeddedWithTemplateRequest.ccs) + && Objects.equals( + this.customFields, + signatureRequestEditEmbeddedWithTemplateRequest.customFields) + && Objects.equals(this.files, signatureRequestEditEmbeddedWithTemplateRequest.files) + && Objects.equals( + this.fileUrls, signatureRequestEditEmbeddedWithTemplateRequest.fileUrls) + && Objects.equals( + this.message, signatureRequestEditEmbeddedWithTemplateRequest.message) + && Objects.equals( + this.metadata, signatureRequestEditEmbeddedWithTemplateRequest.metadata) + && Objects.equals( + this.signingOptions, + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions) + && Objects.equals( + this.subject, signatureRequestEditEmbeddedWithTemplateRequest.subject) + && Objects.equals( + this.testMode, signatureRequestEditEmbeddedWithTemplateRequest.testMode) + && Objects.equals(this.title, signatureRequestEditEmbeddedWithTemplateRequest.title) + && Objects.equals( + this.populateAutoFillFields, + signatureRequestEditEmbeddedWithTemplateRequest.populateAutoFillFields); + } + + @Override + public int hashCode() { + return Objects.hash( + templateIds, + clientId, + signers, + allowDecline, + ccs, + customFields, + files, + fileUrls, + message, + metadata, + signingOptions, + subject, + testMode, + title, + populateAutoFillFields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditEmbeddedWithTemplateRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" populateAutoFillFields: ") + .append(toIndentedString(populateAutoFillFields)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (templateIds != null) { + if (isFileTypeOrListOfFiles(templateIds)) { + fileTypeFound = true; + } + + if (templateIds.getClass().equals(java.io.File.class) + || templateIds.getClass().equals(Integer.class) + || templateIds.getClass().equals(String.class) + || templateIds.getClass().isEnum()) { + map.put("template_ids", templateIds); + } else if (isListOfFile(templateIds)) { + for (int i = 0; i < getListSize(templateIds); i++) { + map.put("template_ids[" + i + "]", getFromList(templateIds, i)); + } + } else { + map.put( + "template_ids", + JSON.getDefault().getMapper().writeValueAsString(templateIds)); + } + } + 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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) + || signers.getClass().equals(Integer.class) + || signers.getClass().equals(String.class) + || signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for (int i = 0; i < getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) + || allowDecline.getClass().equals(Integer.class) + || allowDecline.getClass().equals(String.class) + || allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for (int i = 0; i < getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } else { + map.put( + "allow_decline", + JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (ccs != null) { + if (isFileTypeOrListOfFiles(ccs)) { + fileTypeFound = true; + } + + if (ccs.getClass().equals(java.io.File.class) + || ccs.getClass().equals(Integer.class) + || ccs.getClass().equals(String.class) + || ccs.getClass().isEnum()) { + map.put("ccs", ccs); + } else if (isListOfFile(ccs)) { + for (int i = 0; i < getListSize(ccs); i++) { + map.put("ccs[" + i + "]", getFromList(ccs, i)); + } + } else { + map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); + } + } + if (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) + || customFields.getClass().equals(Integer.class) + || customFields.getClass().equals(String.class) + || customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for (int i = 0; i < getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } else { + map.put( + "custom_fields", + JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + 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 (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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) + || signingOptions.getClass().equals(Integer.class) + || signingOptions.getClass().equals(String.class) + || signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for (int i = 0; i < getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } else { + map.put( + "signing_options", + JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + 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 (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 (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 (populateAutoFillFields != null) { + if (isFileTypeOrListOfFiles(populateAutoFillFields)) { + fileTypeFound = true; + } + + if (populateAutoFillFields.getClass().equals(java.io.File.class) + || populateAutoFillFields.getClass().equals(Integer.class) + || populateAutoFillFields.getClass().equals(String.class) + || populateAutoFillFields.getClass().isEnum()) { + map.put("populate_auto_fill_fields", populateAutoFillFields); + } else if (isListOfFile(populateAutoFillFields)) { + for (int i = 0; i < getListSize(populateAutoFillFields); i++) { + map.put( + "populate_auto_fill_fields[" + i + "]", + getFromList(populateAutoFillFields, i)); + } + } else { + map.put( + "populate_auto_fill_fields", + JSON.getDefault() + .getMapper() + .writeValueAsString(populateAutoFillFields)); + } + } + } 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/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java new file mode 100644 index 000000000..0173d32e5 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java @@ -0,0 +1,1516 @@ +/* + * 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; + +/** SignatureRequestEditRequest */ +@JsonPropertyOrder({ + SignatureRequestEditRequest.JSON_PROPERTY_FILES, + SignatureRequestEditRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditRequest.JSON_PROPERTY_GROUPED_SIGNERS, + SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_REASSIGN, + SignatureRequestEditRequest.JSON_PROPERTY_ATTACHMENTS, + SignatureRequestEditRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, + SignatureRequestEditRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditRequest.JSON_PROPERTY_FIELD_OPTIONS, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_RULES, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, + SignatureRequestEditRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, + SignatureRequestEditRequest.JSON_PROPERTY_IS_EID, + SignatureRequestEditRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, + SignatureRequestEditRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditRequest.JSON_PROPERTY_USE_TEXT_TAGS, + SignatureRequestEditRequest.JSON_PROPERTY_EXPIRES_AT +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SignatureRequestEditRequest { + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nullable private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @javax.annotation.Nullable private List fileUrls = null; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @javax.annotation.Nullable private List signers = null; + + public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + + @javax.annotation.Nullable private List groupedSigners = null; + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @javax.annotation.Nullable private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @javax.annotation.Nullable private Boolean allowReassign = false; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @javax.annotation.Nullable private List attachments = null; + + public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @javax.annotation.Nullable private List ccEmailAddresses = null; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @javax.annotation.Nullable private String clientId; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @javax.annotation.Nullable private List customFields = null; + + public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; + + public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @javax.annotation.Nullable private List formFieldGroups = null; + + public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @javax.annotation.Nullable private List formFieldRules = null; + + public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; + + public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @javax.annotation.Nullable private Boolean hideTextTags = false; + + public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @javax.annotation.Nullable private Boolean isEid = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @javax.annotation.Nullable private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @javax.annotation.Nullable private String signingRedirectUrl; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @javax.annotation.Nullable private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @javax.annotation.Nullable private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable private String title; + + public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @javax.annotation.Nullable private Boolean useTextTags = false; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @javax.annotation.Nullable private Integer expiresAt; + + public SignatureRequestEditRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SignatureRequestEditRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditRequest.class); + } + + public static SignatureRequestEditRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditRequest.class); + } + + public SignatureRequestEditRequest files(@javax.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint + * requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List files) { + this.files = files; + } + + public SignatureRequestEditRequest fileUrls(@javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + * This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + public SignatureRequestEditRequest signers( + @javax.annotation.Nullable List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditRequest addSignersItem(SubSignatureRequestSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or + * **grouped_signers**, but not both. + * + * @return signers + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSigners() { + return signers; + } + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigners(@javax.annotation.Nullable List signers) { + this.signers = signers; + } + + public SignatureRequestEditRequest groupedSigners( + @javax.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + return this; + } + + public SignatureRequestEditRequest addGroupedSignersItem( + SubSignatureRequestGroupedSigners groupedSignersItem) { + if (this.groupedSigners == null) { + this.groupedSigners = new ArrayList<>(); + } + this.groupedSigners.add(groupedSignersItem); + return this; + } + + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or + * **grouped_signers**, but not both. + * + * @return groupedSigners + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGroupedSigners() { + return groupedSigners; + } + + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + } + + public SignatureRequestEditRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to + * `false`. + * + * @return allowDecline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowDecline() { + return allowDecline; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + public SignatureRequestEditRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + return this; + } + + /** + * Allows signers to reassign their signature requests to other signers if set to + * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan + * and higher. + * + * @return allowReassign + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowReassign() { + return allowReassign; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + } + + public SignatureRequestEditRequest attachments( + @javax.annotation.Nullable List attachments) { + this.attachments = attachments; + return this; + } + + public SignatureRequestEditRequest addAttachmentsItem(SubAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * A list describing the 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(@javax.annotation.Nullable List attachments) { + this.attachments = attachments; + } + + public SignatureRequestEditRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + return this; + } + + public SignatureRequestEditRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { + if (this.ccEmailAddresses == null) { + this.ccEmailAddresses = new ArrayList<>(); + } + this.ccEmailAddresses.add(ccEmailAddressesItem); + return this; + } + + /** + * The email addresses that should be CCed. + * + * @return ccEmailAddresses + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCcEmailAddresses() { + return ccEmailAddresses; + } + + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + } + + public SignatureRequestEditRequest clientId(@javax.annotation.Nullable String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The client id of the API App you want to associate with this request. Used to apply the + * branding and callback url defined for the app. + * + * @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(@javax.annotation.Nullable String clientId) { + this.clientId = clientId; + } + + public SignatureRequestEditRequest customFields( + @javax.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditRequest addCustomFieldsItem(SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * When used together with merge fields, `custom_fields` allows users to add + * pre-filled data to their signature requests. Pre-filled data can be used with + * \"send-once\" signature requests by adding merge fields with + * `form_fields_per_document` or [Text + * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values + * back with `custom_fields` together in one API call. For using pre-filled on + * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or + * by calling + * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and + * then passing `custom_fields` on subsequent signature requests referencing that + * template. + * + * @return customFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@javax.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public SignatureRequestEditRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + return this; + } + + /** + * Get fieldOptions + * + * @return fieldOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubFieldOptions getFieldOptions() { + return fieldOptions; + } + + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + } + + public SignatureRequestEditRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + return this; + } + + public SignatureRequestEditRequest addFormFieldGroupsItem( + SubFormFieldGroup formFieldGroupsItem) { + if (this.formFieldGroups == null) { + this.formFieldGroups = new ArrayList<>(); + } + this.formFieldGroups.add(formFieldGroupsItem); + return this; + } + + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed + * JSON array with `group_label` and `requirement` keys. + * `form_fields_per_document` must contain fields referencing a group defined in + * `form_field_groups`. + * + * @return formFieldGroups + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldGroups() { + return formFieldGroups; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + } + + public SignatureRequestEditRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + return this; + } + + public SignatureRequestEditRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { + if (this.formFieldRules == null) { + this.formFieldRules = new ArrayList<>(); + } + this.formFieldRules.add(formFieldRulesItem); + return this; + } + + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + * + * @return formFieldRules + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldRules() { + return formFieldRules; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + } + + public SignatureRequestEditRequest formFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + return this; + } + + public SignatureRequestEditRequest addFormFieldsPerDocumentItem( + SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { + if (this.formFieldsPerDocument == null) { + this.formFieldsPerDocument = new ArrayList<>(); + } + this.formFieldsPerDocument.add(formFieldsPerDocumentItem); + return this; + } + + /** + * The fields that should appear on the document, expressed as an array of objects. (For more + * details you can read about it here: [Using Form Fields per + * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, + * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and + * optional parameters. Check out the list of [additional + * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text + * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use + * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use + * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use + * `SubFormFieldsPerDocumentCheckbox` * Radio Field use + * `SubFormFieldsPerDocumentRadio` * Signature Field use + * `SubFormFieldsPerDocumentSignature` * Date Signed Field use + * `SubFormFieldsPerDocumentDateSigned` * Initials Field use + * `SubFormFieldsPerDocumentInitials` * Text Merge Field use + * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use + * `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return formFieldsPerDocument + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFieldsPerDocument() { + return formFieldsPerDocument; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + } + + public SignatureRequestEditRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + return this; + } + + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way + * can cause unwanted clipping. We recommend leaving this setting on `false` and + * instead hiding your text tags using white text or a similar approach. See the [Text Tags + * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more + * information. + * + * @return hideTextTags + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideTextTags() { + return hideTextTags; + } + + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + } + + public SignatureRequestEditRequest isEid(@javax.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [electronic identification + * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify + * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only + * available on the Premium API plan. Cannot be used in `test_mode`. Only works on + * requests with one signer. + * + * @return isEid + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEid() { + return isEid; + } + + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + } + + public SignatureRequestEditRequest message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * + * @return message + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + public SignatureRequestEditRequest metadata( + @javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in + * all API responses and events involving the signature request. For example, use the metadata + * field to store a signer's order number for look up when receiving events for the + * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata + * keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return metadata + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + public SignatureRequestEditRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * + * @return signingOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + public SignatureRequestEditRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + return this; + } + + /** + * The URL you want signers redirected to after they successfully sign. + * + * @return signingRedirectUrl + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSigningRedirectUrl() { + return signingRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + } + + public SignatureRequestEditRequest subject(@javax.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * + * @return subject + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@javax.annotation.Nullable String subject) { + this.subject = subject; + } + + public SignatureRequestEditRequest testMode(@javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to + * `true`. Defaults to `false`. + * + * @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(@javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + public SignatureRequestEditRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * + * @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(@javax.annotation.Nullable String title) { + this.title = title; + } + + public SignatureRequestEditRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [Text + * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your + * document. Defaults to disabled, or `false`. + * + * @return useTextTags + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseTextTags() { + return useTextTags; + } + + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + } + + public SignatureRequestEditRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired + * status, and no longer signable. See [Signature Request Expiration + * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return expiresAt + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this SignatureRequestEditRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditRequest signatureRequestEditRequest = (SignatureRequestEditRequest) o; + return Objects.equals(this.files, signatureRequestEditRequest.files) + && Objects.equals(this.fileUrls, signatureRequestEditRequest.fileUrls) + && Objects.equals(this.signers, signatureRequestEditRequest.signers) + && Objects.equals(this.groupedSigners, signatureRequestEditRequest.groupedSigners) + && Objects.equals(this.allowDecline, signatureRequestEditRequest.allowDecline) + && Objects.equals(this.allowReassign, signatureRequestEditRequest.allowReassign) + && Objects.equals(this.attachments, signatureRequestEditRequest.attachments) + && Objects.equals( + this.ccEmailAddresses, signatureRequestEditRequest.ccEmailAddresses) + && Objects.equals(this.clientId, signatureRequestEditRequest.clientId) + && Objects.equals(this.customFields, signatureRequestEditRequest.customFields) + && Objects.equals(this.fieldOptions, signatureRequestEditRequest.fieldOptions) + && Objects.equals(this.formFieldGroups, signatureRequestEditRequest.formFieldGroups) + && Objects.equals(this.formFieldRules, signatureRequestEditRequest.formFieldRules) + && Objects.equals( + this.formFieldsPerDocument, + signatureRequestEditRequest.formFieldsPerDocument) + && Objects.equals(this.hideTextTags, signatureRequestEditRequest.hideTextTags) + && Objects.equals(this.isEid, signatureRequestEditRequest.isEid) + && Objects.equals(this.message, signatureRequestEditRequest.message) + && Objects.equals(this.metadata, signatureRequestEditRequest.metadata) + && Objects.equals(this.signingOptions, signatureRequestEditRequest.signingOptions) + && Objects.equals( + this.signingRedirectUrl, signatureRequestEditRequest.signingRedirectUrl) + && Objects.equals(this.subject, signatureRequestEditRequest.subject) + && Objects.equals(this.testMode, signatureRequestEditRequest.testMode) + && Objects.equals(this.title, signatureRequestEditRequest.title) + && Objects.equals(this.useTextTags, signatureRequestEditRequest.useTextTags) + && Objects.equals(this.expiresAt, signatureRequestEditRequest.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash( + files, + fileUrls, + signers, + groupedSigners, + allowDecline, + allowReassign, + attachments, + ccEmailAddresses, + clientId, + customFields, + fieldOptions, + formFieldGroups, + formFieldRules, + formFieldsPerDocument, + hideTextTags, + isEid, + message, + metadata, + signingOptions, + signingRedirectUrl, + subject, + testMode, + title, + useTextTags, + expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditRequest {\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); + sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); + sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); + sb.append(" formFieldsPerDocument: ") + .append(toIndentedString(formFieldsPerDocument)) + .append("\n"); + sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); + sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" signingRedirectUrl: ") + .append(toIndentedString(signingRedirectUrl)) + .append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + 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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) + || signers.getClass().equals(Integer.class) + || signers.getClass().equals(String.class) + || signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for (int i = 0; i < getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (groupedSigners != null) { + if (isFileTypeOrListOfFiles(groupedSigners)) { + fileTypeFound = true; + } + + if (groupedSigners.getClass().equals(java.io.File.class) + || groupedSigners.getClass().equals(Integer.class) + || groupedSigners.getClass().equals(String.class) + || groupedSigners.getClass().isEnum()) { + map.put("grouped_signers", groupedSigners); + } else if (isListOfFile(groupedSigners)) { + for (int i = 0; i < getListSize(groupedSigners); i++) { + map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); + } + } else { + map.put( + "grouped_signers", + JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) + || allowDecline.getClass().equals(Integer.class) + || allowDecline.getClass().equals(String.class) + || allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for (int i = 0; i < getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } else { + map.put( + "allow_decline", + JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (allowReassign != null) { + if (isFileTypeOrListOfFiles(allowReassign)) { + fileTypeFound = true; + } + + if (allowReassign.getClass().equals(java.io.File.class) + || allowReassign.getClass().equals(Integer.class) + || allowReassign.getClass().equals(String.class) + || allowReassign.getClass().isEnum()) { + map.put("allow_reassign", allowReassign); + } else if (isListOfFile(allowReassign)) { + for (int i = 0; i < getListSize(allowReassign); i++) { + map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); + } + } else { + map.put( + "allow_reassign", + JSON.getDefault().getMapper().writeValueAsString(allowReassign)); + } + } + 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)); + } + } + if (ccEmailAddresses != null) { + if (isFileTypeOrListOfFiles(ccEmailAddresses)) { + fileTypeFound = true; + } + + if (ccEmailAddresses.getClass().equals(java.io.File.class) + || ccEmailAddresses.getClass().equals(Integer.class) + || ccEmailAddresses.getClass().equals(String.class) + || ccEmailAddresses.getClass().isEnum()) { + map.put("cc_email_addresses", ccEmailAddresses); + } else if (isListOfFile(ccEmailAddresses)) { + for (int i = 0; i < getListSize(ccEmailAddresses); i++) { + map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); + } + } else { + map.put( + "cc_email_addresses", + JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); + } + } + 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 (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) + || customFields.getClass().equals(Integer.class) + || customFields.getClass().equals(String.class) + || customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for (int i = 0; i < getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } else { + map.put( + "custom_fields", + JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + if (fieldOptions != null) { + if (isFileTypeOrListOfFiles(fieldOptions)) { + fileTypeFound = true; + } + + if (fieldOptions.getClass().equals(java.io.File.class) + || fieldOptions.getClass().equals(Integer.class) + || fieldOptions.getClass().equals(String.class) + || fieldOptions.getClass().isEnum()) { + map.put("field_options", fieldOptions); + } else if (isListOfFile(fieldOptions)) { + for (int i = 0; i < getListSize(fieldOptions); i++) { + map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); + } + } else { + map.put( + "field_options", + JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); + } + } + if (formFieldGroups != null) { + if (isFileTypeOrListOfFiles(formFieldGroups)) { + fileTypeFound = true; + } + + if (formFieldGroups.getClass().equals(java.io.File.class) + || formFieldGroups.getClass().equals(Integer.class) + || formFieldGroups.getClass().equals(String.class) + || formFieldGroups.getClass().isEnum()) { + map.put("form_field_groups", formFieldGroups); + } else if (isListOfFile(formFieldGroups)) { + for (int i = 0; i < getListSize(formFieldGroups); i++) { + map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); + } + } else { + map.put( + "form_field_groups", + JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); + } + } + if (formFieldRules != null) { + if (isFileTypeOrListOfFiles(formFieldRules)) { + fileTypeFound = true; + } + + if (formFieldRules.getClass().equals(java.io.File.class) + || formFieldRules.getClass().equals(Integer.class) + || formFieldRules.getClass().equals(String.class) + || formFieldRules.getClass().isEnum()) { + map.put("form_field_rules", formFieldRules); + } else if (isListOfFile(formFieldRules)) { + for (int i = 0; i < getListSize(formFieldRules); i++) { + map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); + } + } else { + map.put( + "form_field_rules", + JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); + } + } + if (formFieldsPerDocument != null) { + if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { + fileTypeFound = true; + } + + if (formFieldsPerDocument.getClass().equals(java.io.File.class) + || formFieldsPerDocument.getClass().equals(Integer.class) + || formFieldsPerDocument.getClass().equals(String.class) + || formFieldsPerDocument.getClass().isEnum()) { + map.put("form_fields_per_document", formFieldsPerDocument); + } else if (isListOfFile(formFieldsPerDocument)) { + for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { + map.put( + "form_fields_per_document[" + i + "]", + getFromList(formFieldsPerDocument, i)); + } + } else { + map.put( + "form_fields_per_document", + JSON.getDefault() + .getMapper() + .writeValueAsString(formFieldsPerDocument)); + } + } + if (hideTextTags != null) { + if (isFileTypeOrListOfFiles(hideTextTags)) { + fileTypeFound = true; + } + + if (hideTextTags.getClass().equals(java.io.File.class) + || hideTextTags.getClass().equals(Integer.class) + || hideTextTags.getClass().equals(String.class) + || hideTextTags.getClass().isEnum()) { + map.put("hide_text_tags", hideTextTags); + } else if (isListOfFile(hideTextTags)) { + for (int i = 0; i < getListSize(hideTextTags); i++) { + map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); + } + } else { + map.put( + "hide_text_tags", + JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); + } + } + if (isEid != null) { + if (isFileTypeOrListOfFiles(isEid)) { + fileTypeFound = true; + } + + if (isEid.getClass().equals(java.io.File.class) + || isEid.getClass().equals(Integer.class) + || isEid.getClass().equals(String.class) + || isEid.getClass().isEnum()) { + map.put("is_eid", isEid); + } else if (isListOfFile(isEid)) { + for (int i = 0; i < getListSize(isEid); i++) { + map.put("is_eid[" + i + "]", getFromList(isEid, i)); + } + } else { + map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) + || signingOptions.getClass().equals(Integer.class) + || signingOptions.getClass().equals(String.class) + || signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for (int i = 0; i < getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } else { + map.put( + "signing_options", + JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + if (signingRedirectUrl != null) { + if (isFileTypeOrListOfFiles(signingRedirectUrl)) { + fileTypeFound = true; + } + + if (signingRedirectUrl.getClass().equals(java.io.File.class) + || signingRedirectUrl.getClass().equals(Integer.class) + || signingRedirectUrl.getClass().equals(String.class) + || signingRedirectUrl.getClass().isEnum()) { + map.put("signing_redirect_url", signingRedirectUrl); + } else if (isListOfFile(signingRedirectUrl)) { + for (int i = 0; i < getListSize(signingRedirectUrl); i++) { + map.put( + "signing_redirect_url[" + i + "]", + getFromList(signingRedirectUrl, i)); + } + } else { + map.put( + "signing_redirect_url", + JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); + } + } + 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 (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 (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 (useTextTags != null) { + if (isFileTypeOrListOfFiles(useTextTags)) { + fileTypeFound = true; + } + + if (useTextTags.getClass().equals(java.io.File.class) + || useTextTags.getClass().equals(Integer.class) + || useTextTags.getClass().equals(String.class) + || useTextTags.getClass().isEnum()) { + map.put("use_text_tags", useTextTags); + } else if (isListOfFile(useTextTags)) { + for (int i = 0; i < getListSize(useTextTags); i++) { + map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); + } + } else { + map.put( + "use_text_tags", + JSON.getDefault().getMapper().writeValueAsString(useTextTags)); + } + } + if (expiresAt != null) { + if (isFileTypeOrListOfFiles(expiresAt)) { + fileTypeFound = true; + } + + if (expiresAt.getClass().equals(java.io.File.class) + || expiresAt.getClass().equals(Integer.class) + || expiresAt.getClass().equals(String.class) + || expiresAt.getClass().isEnum()) { + map.put("expires_at", expiresAt); + } else if (isListOfFile(expiresAt)) { + for (int i = 0; i < getListSize(expiresAt); i++) { + map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); + } + } else { + map.put( + "expires_at", + JSON.getDefault().getMapper().writeValueAsString(expiresAt)); + } + } + } 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/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java new file mode 100644 index 000000000..c49c66ff3 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java @@ -0,0 +1,997 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CCS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILES, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_IS_EID, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TITLE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SignatureRequestEditWithTemplateRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull + private List signers = new ArrayList<>(); + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @javax.annotation.Nullable private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_CCS = "ccs"; + @javax.annotation.Nullable private List ccs = null; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @javax.annotation.Nullable private String clientId; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @javax.annotation.Nullable private List customFields = null; + + public static final String JSON_PROPERTY_FILES = "files"; + @javax.annotation.Nullable private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @javax.annotation.Nullable private List fileUrls = null; + + public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @javax.annotation.Nullable private Boolean isEid = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @javax.annotation.Nullable private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @javax.annotation.Nullable private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @javax.annotation.Nullable private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @javax.annotation.Nullable private String signingRedirectUrl; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @javax.annotation.Nullable private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @javax.annotation.Nullable private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @javax.annotation.Nullable private String title; + + public SignatureRequestEditWithTemplateRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SignatureRequestEditWithTemplateRequest init(String jsonData) throws Exception { + return new ObjectMapper() + .readValue(jsonData, SignatureRequestEditWithTemplateRequest.class); + } + + public static SignatureRequestEditWithTemplateRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditWithTemplateRequest.class); + } + + public SignatureRequestEditWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public SignatureRequestEditWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the + * order in which the template will be used. + * + * @return templateIds + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateIds() { + return templateIds; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + public SignatureRequestEditWithTemplateRequest signers( + @javax.annotation.Nonnull List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditWithTemplateRequest addSignersItem( + SubSignatureRequestTemplateSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Templated-based Signature Request. + * + * @return signers + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSigners() { + return signers; + } + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigners( + @javax.annotation.Nonnull List signers) { + this.signers = signers; + } + + public SignatureRequestEditWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to + * `false`. + * + * @return allowDecline + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowDecline() { + return allowDecline; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + public SignatureRequestEditWithTemplateRequest ccs(@javax.annotation.Nullable List ccs) { + this.ccs = ccs; + return this; + } + + public SignatureRequestEditWithTemplateRequest addCcsItem(SubCC ccsItem) { + if (this.ccs == null) { + this.ccs = new ArrayList<>(); + } + this.ccs.add(ccsItem); + return this; + } + + /** + * Add CC email recipients. Required when a CC role exists for the Template. + * + * @return ccs + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCcs() { + return ccs; + } + + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcs(@javax.annotation.Nullable List ccs) { + this.ccs = ccs; + } + + public SignatureRequestEditWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app to associate with the signature request. Used to apply the branding and + * callback url defined for the app. + * + * @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(@javax.annotation.Nullable String clientId) { + this.clientId = clientId; + } + + public SignatureRequestEditWithTemplateRequest customFields( + @javax.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditWithTemplateRequest addCustomFieldsItem( + SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * An array defining values and options for custom fields. Required when a custom field exists + * in the Template. + * + * @return customFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@javax.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public SignatureRequestEditWithTemplateRequest files( + @javax.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditWithTemplateRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint + * requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List files) { + this.files = files; + } + + public SignatureRequestEditWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + * This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @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(@javax.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + public SignatureRequestEditWithTemplateRequest isEid(@javax.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [electronic identification + * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify + * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only + * available on the Premium API plan. Cannot be used in `test_mode`. Only works on + * requests with one signer. + * + * @return isEid + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsEid() { + return isEid; + } + + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + } + + public SignatureRequestEditWithTemplateRequest message( + @javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * + * @return message + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + public SignatureRequestEditWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditWithTemplateRequest putMetadataItem( + String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in + * all API responses and events involving the signature request. For example, use the metadata + * field to store a signer's order number for look up when receiving events for the + * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata + * keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return metadata + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@javax.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + public SignatureRequestEditWithTemplateRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * + * @return signingOptions + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + public SignatureRequestEditWithTemplateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + return this; + } + + /** + * The URL you want signers redirected to after they successfully sign. + * + * @return signingRedirectUrl + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSigningRedirectUrl() { + return signingRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + } + + public SignatureRequestEditWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * + * @return subject + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@javax.annotation.Nullable String subject) { + this.subject = subject; + } + + public SignatureRequestEditWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to + * `true`. Defaults to `false`. + * + * @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(@javax.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + public SignatureRequestEditWithTemplateRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * + * @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(@javax.annotation.Nullable String title) { + this.title = title; + } + + /** Return true if this SignatureRequestEditWithTemplateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest = + (SignatureRequestEditWithTemplateRequest) o; + return Objects.equals(this.templateIds, signatureRequestEditWithTemplateRequest.templateIds) + && Objects.equals(this.signers, signatureRequestEditWithTemplateRequest.signers) + && Objects.equals( + this.allowDecline, signatureRequestEditWithTemplateRequest.allowDecline) + && Objects.equals(this.ccs, signatureRequestEditWithTemplateRequest.ccs) + && Objects.equals(this.clientId, signatureRequestEditWithTemplateRequest.clientId) + && Objects.equals( + this.customFields, signatureRequestEditWithTemplateRequest.customFields) + && Objects.equals(this.files, signatureRequestEditWithTemplateRequest.files) + && Objects.equals(this.fileUrls, signatureRequestEditWithTemplateRequest.fileUrls) + && Objects.equals(this.isEid, signatureRequestEditWithTemplateRequest.isEid) + && Objects.equals(this.message, signatureRequestEditWithTemplateRequest.message) + && Objects.equals(this.metadata, signatureRequestEditWithTemplateRequest.metadata) + && Objects.equals( + this.signingOptions, signatureRequestEditWithTemplateRequest.signingOptions) + && Objects.equals( + this.signingRedirectUrl, + signatureRequestEditWithTemplateRequest.signingRedirectUrl) + && Objects.equals(this.subject, signatureRequestEditWithTemplateRequest.subject) + && Objects.equals(this.testMode, signatureRequestEditWithTemplateRequest.testMode) + && Objects.equals(this.title, signatureRequestEditWithTemplateRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash( + templateIds, + signers, + allowDecline, + ccs, + clientId, + customFields, + files, + fileUrls, + isEid, + message, + metadata, + signingOptions, + signingRedirectUrl, + subject, + testMode, + title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditWithTemplateRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" signingRedirectUrl: ") + .append(toIndentedString(signingRedirectUrl)) + .append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).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 (templateIds != null) { + if (isFileTypeOrListOfFiles(templateIds)) { + fileTypeFound = true; + } + + if (templateIds.getClass().equals(java.io.File.class) + || templateIds.getClass().equals(Integer.class) + || templateIds.getClass().equals(String.class) + || templateIds.getClass().isEnum()) { + map.put("template_ids", templateIds); + } else if (isListOfFile(templateIds)) { + for (int i = 0; i < getListSize(templateIds); i++) { + map.put("template_ids[" + i + "]", getFromList(templateIds, i)); + } + } else { + map.put( + "template_ids", + JSON.getDefault().getMapper().writeValueAsString(templateIds)); + } + } + if (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) + || signers.getClass().equals(Integer.class) + || signers.getClass().equals(String.class) + || signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for (int i = 0; i < getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) + || allowDecline.getClass().equals(Integer.class) + || allowDecline.getClass().equals(String.class) + || allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for (int i = 0; i < getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } else { + map.put( + "allow_decline", + JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (ccs != null) { + if (isFileTypeOrListOfFiles(ccs)) { + fileTypeFound = true; + } + + if (ccs.getClass().equals(java.io.File.class) + || ccs.getClass().equals(Integer.class) + || ccs.getClass().equals(String.class) + || ccs.getClass().isEnum()) { + map.put("ccs", ccs); + } else if (isListOfFile(ccs)) { + for (int i = 0; i < getListSize(ccs); i++) { + map.put("ccs[" + i + "]", getFromList(ccs, i)); + } + } else { + map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); + } + } + 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 (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) + || customFields.getClass().equals(Integer.class) + || customFields.getClass().equals(String.class) + || customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for (int i = 0; i < getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } else { + map.put( + "custom_fields", + JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + 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 (isEid != null) { + if (isFileTypeOrListOfFiles(isEid)) { + fileTypeFound = true; + } + + if (isEid.getClass().equals(java.io.File.class) + || isEid.getClass().equals(Integer.class) + || isEid.getClass().equals(String.class) + || isEid.getClass().isEnum()) { + map.put("is_eid", isEid); + } else if (isListOfFile(isEid)) { + for (int i = 0; i < getListSize(isEid); i++) { + map.put("is_eid[" + i + "]", getFromList(isEid, i)); + } + } else { + map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) + || signingOptions.getClass().equals(Integer.class) + || signingOptions.getClass().equals(String.class) + || signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for (int i = 0; i < getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } else { + map.put( + "signing_options", + JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + if (signingRedirectUrl != null) { + if (isFileTypeOrListOfFiles(signingRedirectUrl)) { + fileTypeFound = true; + } + + if (signingRedirectUrl.getClass().equals(java.io.File.class) + || signingRedirectUrl.getClass().equals(Integer.class) + || signingRedirectUrl.getClass().equals(String.class) + || signingRedirectUrl.getClass().isEnum()) { + map.put("signing_redirect_url", signingRedirectUrl); + } else if (isListOfFile(signingRedirectUrl)) { + for (int i = 0; i < getListSize(signingRedirectUrl); i++) { + map.put( + "signing_redirect_url[" + i + "]", + getFromList(signingRedirectUrl, i)); + } + } else { + map.put( + "signing_redirect_url", + JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); + } + } + 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 (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 (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/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java index 3e7064c63..713db0586 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestGetResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; + @javax.annotation.Nonnull private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public SignatureRequestGetResponse() {} @@ -59,7 +59,8 @@ public static SignatureRequestGetResponse init(HashMap data) throws Exception { SignatureRequestGetResponse.class); } - public SignatureRequestGetResponse signatureRequest(SignatureRequestResponse signatureRequest) { + public SignatureRequestGetResponse signatureRequest( + @javax.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -78,11 +79,13 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest( + @javax.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public SignatureRequestGetResponse warnings(List warnings) { + public SignatureRequestGetResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -108,7 +111,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java index 4ae97121d..2829c0ded 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java @@ -33,17 +33,19 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestListResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + + @javax.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public SignatureRequestListResponse() {} @@ -64,7 +66,7 @@ public static SignatureRequestListResponse init(HashMap data) throws Exception { } public SignatureRequestListResponse signatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -92,11 +94,13 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests(List signatureRequests) { + public void setSignatureRequests( + @javax.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; } - public SignatureRequestListResponse listInfo(ListInfoResponse listInfo) { + public SignatureRequestListResponse listInfo( + @javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -115,11 +119,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public SignatureRequestListResponse warnings(List warnings) { + public SignatureRequestListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -145,7 +150,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java index b4343b7b3..ee3fae591 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestRemindRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public SignatureRequestRemindRequest() {} @@ -57,7 +57,8 @@ public static SignatureRequestRemindRequest init(HashMap data) throws Exception SignatureRequestRemindRequest.class); } - public SignatureRequestRemindRequest emailAddress(String emailAddress) { + public SignatureRequestRemindRequest emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -76,11 +77,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestRemindRequest name(String name) { + public SignatureRequestRemindRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -99,7 +100,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java index ed78327dc..85da7fb61 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java @@ -55,83 +55,84 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponse { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; + @javax.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; + @javax.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; + @javax.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; + @javax.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; + @javax.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; + @javax.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; + @javax.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; + @javax.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public SignatureRequestResponse() {} @@ -151,7 +152,7 @@ public static SignatureRequestResponse init(HashMap data) throws Exception { SignatureRequestResponse.class); } - public SignatureRequestResponse testMode(Boolean testMode) { + public SignatureRequestResponse testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -170,11 +171,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestResponse signatureRequestId(String signatureRequestId) { + public SignatureRequestResponse signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -192,11 +194,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public SignatureRequestResponse requesterEmailAddress(String requesterEmailAddress) { + public SignatureRequestResponse requesterEmailAddress( + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -214,11 +217,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public SignatureRequestResponse title(String title) { + public SignatureRequestResponse title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -236,11 +239,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestResponse originalTitle(String originalTitle) { + public SignatureRequestResponse originalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -258,11 +261,11 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public SignatureRequestResponse subject(String subject) { + public SignatureRequestResponse subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -280,11 +283,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestResponse message(String message) { + public SignatureRequestResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -302,11 +305,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestResponse metadata(Map metadata) { + public SignatureRequestResponse metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -332,11 +336,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestResponse createdAt(Integer createdAt) { + public SignatureRequestResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -354,11 +358,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public SignatureRequestResponse expiresAt(Integer expiresAt) { + public SignatureRequestResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -378,11 +382,11 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public SignatureRequestResponse isComplete(Boolean isComplete) { + public SignatureRequestResponse isComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -400,11 +404,11 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public SignatureRequestResponse isDeclined(Boolean isDeclined) { + public SignatureRequestResponse isDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -422,11 +426,11 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public SignatureRequestResponse hasError(Boolean hasError) { + public SignatureRequestResponse hasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -445,11 +449,11 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public SignatureRequestResponse filesUrl(String filesUrl) { + public SignatureRequestResponse filesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -467,11 +471,11 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public SignatureRequestResponse signingUrl(String signingUrl) { + public SignatureRequestResponse signingUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -491,11 +495,11 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public SignatureRequestResponse detailsUrl(String detailsUrl) { + public SignatureRequestResponse detailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -514,11 +518,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public SignatureRequestResponse ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestResponse ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -545,11 +550,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestResponse signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestResponse signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -567,11 +573,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestResponse finalCopyUri(String finalCopyUri) { + public SignatureRequestResponse finalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -589,11 +595,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public SignatureRequestResponse templateIds(List templateIds) { + public SignatureRequestResponse templateIds( + @javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -619,12 +626,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; } public SignatureRequestResponse customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -653,12 +660,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public SignatureRequestResponse attachments( - List attachments) { + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -685,12 +693,13 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } public SignatureRequestResponse responseData( - List responseData) { + @javax.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -718,12 +727,13 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData( + @javax.annotation.Nullable List responseData) { this.responseData = responseData; } public SignatureRequestResponse signatures( - List signatures) { + @javax.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -750,11 +760,12 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures( + @javax.annotation.Nullable List signatures) { this.signatures = signatures; } - public SignatureRequestResponse bulkSendJobId(String bulkSendJobId) { + public SignatureRequestResponse bulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -772,7 +783,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java index 8d4e942e3..8c0486a26 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java @@ -34,26 +34,26 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseAttachment { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; + @javax.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_UPLOADED_AT = "uploaded_at"; - private Integer uploadedAt; + @javax.annotation.Nullable private Integer uploadedAt; public SignatureRequestResponseAttachment() {} @@ -73,7 +73,7 @@ public static SignatureRequestResponseAttachment init(HashMap data) throws Excep SignatureRequestResponseAttachment.class); } - public SignatureRequestResponseAttachment id(String id) { + public SignatureRequestResponseAttachment id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -92,11 +92,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SignatureRequestResponseAttachment signer(String signer) { + public SignatureRequestResponseAttachment signer(@javax.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -120,7 +120,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nonnull String signer) { this.signer = signer; } @@ -128,7 +128,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public SignatureRequestResponseAttachment name(String name) { + public SignatureRequestResponseAttachment name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -147,11 +147,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseAttachment required(Boolean required) { + public SignatureRequestResponseAttachment required(@javax.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -170,11 +170,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nonnull Boolean required) { this.required = required; } - public SignatureRequestResponseAttachment instructions(String instructions) { + public SignatureRequestResponseAttachment instructions( + @javax.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -192,11 +193,12 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; } - public SignatureRequestResponseAttachment uploadedAt(Integer uploadedAt) { + public SignatureRequestResponseAttachment uploadedAt( + @javax.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; return this; } @@ -214,7 +216,7 @@ public Integer getUploadedAt() { @JsonProperty(JSON_PROPERTY_UPLOADED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUploadedAt(Integer uploadedAt) { + public void setUploadedAt(@javax.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java index eff161450..4eb96aa4d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -56,19 +56,19 @@ }) public class SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; + @javax.annotation.Nullable private String editor; public SignatureRequestResponseCustomFieldBase() {} @@ -89,7 +89,7 @@ public static SignatureRequestResponseCustomFieldBase init(HashMap data) throws SignatureRequestResponseCustomFieldBase.class); } - public SignatureRequestResponseCustomFieldBase type(String type) { + public SignatureRequestResponseCustomFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -109,11 +109,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldBase name(String name) { + public SignatureRequestResponseCustomFieldBase name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -132,11 +132,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseCustomFieldBase required(Boolean required) { + public SignatureRequestResponseCustomFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -154,11 +155,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseCustomFieldBase apiId(String apiId) { + public SignatureRequestResponseCustomFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -176,11 +177,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseCustomFieldBase editor(String editor) { + public SignatureRequestResponseCustomFieldBase editor( + @javax.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -198,7 +200,7 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@javax.annotation.Nullable String editor) { this.editor = editor; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java index f2f207ebf..8e0952e3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseCustomFieldCheckbox() {} @@ -68,7 +68,7 @@ public static SignatureRequestResponseCustomFieldCheckbox init(HashMap data) thr SignatureRequestResponseCustomFieldCheckbox.class); } - public SignatureRequestResponseCustomFieldCheckbox type(String type) { + public SignatureRequestResponseCustomFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldCheckbox value(Boolean value) { + public SignatureRequestResponseCustomFieldCheckbox value( + @javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -110,7 +111,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java index 31c911d42..bb882571a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseCustomFieldText() {} @@ -67,7 +67,7 @@ public static SignatureRequestResponseCustomFieldText init(HashMap data) throws SignatureRequestResponseCustomFieldText.class); } - public SignatureRequestResponseCustomFieldText type(String type) { + public SignatureRequestResponseCustomFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -87,11 +87,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldText value(String value) { + public SignatureRequestResponseCustomFieldText value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -109,7 +109,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java index 1b5606c45..e50d2024f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -68,19 +68,19 @@ }) public class SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nullable private String type; public SignatureRequestResponseDataBase() {} @@ -100,7 +100,7 @@ public static SignatureRequestResponseDataBase init(HashMap data) throws Excepti SignatureRequestResponseDataBase.class); } - public SignatureRequestResponseDataBase apiId(String apiId) { + public SignatureRequestResponseDataBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -118,11 +118,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseDataBase signatureId(String signatureId) { + public SignatureRequestResponseDataBase signatureId( + @javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -140,11 +141,11 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseDataBase name(String name) { + public SignatureRequestResponseDataBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -162,11 +163,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SignatureRequestResponseDataBase required(Boolean required) { + public SignatureRequestResponseDataBase required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -184,11 +185,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseDataBase type(String type) { + public SignatureRequestResponseDataBase type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -206,7 +207,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java index 656b82718..aa196e173 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nullable private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueCheckbox() {} @@ -66,7 +66,7 @@ public static SignatureRequestResponseDataValueCheckbox init(HashMap data) throw SignatureRequestResponseDataValueCheckbox.class); } - public SignatureRequestResponseDataValueCheckbox type(String type) { + public SignatureRequestResponseDataValueCheckbox type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -84,11 +84,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckbox value(Boolean value) { + public SignatureRequestResponseDataValueCheckbox value( + @javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -106,7 +107,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java index 9127f681c..99139c870 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; + @javax.annotation.Nullable private String type = "checkbox-merge"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueCheckboxMerge() {} @@ -69,7 +69,8 @@ public static SignatureRequestResponseDataValueCheckboxMerge init(HashMap data) SignatureRequestResponseDataValueCheckboxMerge.class); } - public SignatureRequestResponseDataValueCheckboxMerge type(String type) { + public SignatureRequestResponseDataValueCheckboxMerge type( + @javax.annotation.Nullable String type) { this.type = type; return this; } @@ -87,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckboxMerge value(String value) { + public SignatureRequestResponseDataValueCheckboxMerge value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -109,7 +111,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java index b93a26238..038a3cc60 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nullable private String type = "date_signed"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueDateSigned() {} @@ -67,7 +67,8 @@ public static SignatureRequestResponseDataValueDateSigned init(HashMap data) thr SignatureRequestResponseDataValueDateSigned.class); } - public SignatureRequestResponseDataValueDateSigned type(String type) { + public SignatureRequestResponseDataValueDateSigned type( + @javax.annotation.Nullable String type) { this.type = type; return this; } @@ -85,11 +86,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDateSigned value(String value) { + public SignatureRequestResponseDataValueDateSigned value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -107,7 +109,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java index b52dee36f..e702df116 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nullable private String type = "dropdown"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueDropdown() {} @@ -66,7 +66,7 @@ public static SignatureRequestResponseDataValueDropdown init(HashMap data) throw SignatureRequestResponseDataValueDropdown.class); } - public SignatureRequestResponseDataValueDropdown type(String type) { + public SignatureRequestResponseDataValueDropdown type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -84,11 +84,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDropdown value(String value) { + public SignatureRequestResponseDataValueDropdown value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -106,7 +107,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java index 28262ccf4..bd936ff8d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,13 +43,13 @@ visible = true) public class SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nullable private String type = "initials"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; + @javax.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueInitials() {} @@ -70,7 +70,7 @@ public static SignatureRequestResponseDataValueInitials init(HashMap data) throw SignatureRequestResponseDataValueInitials.class); } - public SignatureRequestResponseDataValueInitials type(String type) { + public SignatureRequestResponseDataValueInitials type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -88,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueInitials value(String value) { + public SignatureRequestResponseDataValueInitials value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -110,11 +111,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueInitials isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueInitials isSigned( + @javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -132,7 +134,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java index a5d63ae2c..58eb6518c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nullable private String type = "radio"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueRadio() {} @@ -65,7 +65,7 @@ public static SignatureRequestResponseDataValueRadio init(HashMap data) throws E SignatureRequestResponseDataValueRadio.class); } - public SignatureRequestResponseDataValueRadio type(String type) { + public SignatureRequestResponseDataValueRadio type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -83,11 +83,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueRadio value(Boolean value) { + public SignatureRequestResponseDataValueRadio value(@javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -105,7 +105,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java index 657bc4864..e08d208d0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,13 +43,13 @@ visible = true) public class SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nullable private String type = "signature"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; + @javax.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueSignature() {} @@ -71,7 +71,7 @@ public static SignatureRequestResponseDataValueSignature init(HashMap data) thro SignatureRequestResponseDataValueSignature.class); } - public SignatureRequestResponseDataValueSignature type(String type) { + public SignatureRequestResponseDataValueSignature type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -89,11 +89,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueSignature value(String value) { + public SignatureRequestResponseDataValueSignature value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -111,11 +112,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueSignature isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueSignature isSigned( + @javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -133,7 +135,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java index d9c7af057..ea517a79b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nullable private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueText() {} @@ -65,7 +65,7 @@ public static SignatureRequestResponseDataValueText init(HashMap data) throws Ex SignatureRequestResponseDataValueText.class); } - public SignatureRequestResponseDataValueText type(String type) { + public SignatureRequestResponseDataValueText type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -83,11 +83,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueText value(String value) { + public SignatureRequestResponseDataValueText value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -105,7 +105,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java index 1b796dbd6..0c3deed89 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; + @javax.annotation.Nullable private String type = "text-merge"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueTextMerge() {} @@ -67,7 +67,7 @@ public static SignatureRequestResponseDataValueTextMerge init(HashMap data) thro SignatureRequestResponseDataValueTextMerge.class); } - public SignatureRequestResponseDataValueTextMerge type(String type) { + public SignatureRequestResponseDataValueTextMerge type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -85,11 +85,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueTextMerge value(String value) { + public SignatureRequestResponseDataValueTextMerge value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -107,7 +108,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java index 6dbe1116f..ede6ebb32 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java @@ -47,65 +47,65 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseSignatures { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_SIGNER_GROUP_GUID = "signer_group_guid"; - private String signerGroupGuid; + @javax.annotation.Nullable private String signerGroupGuid; public static final String JSON_PROPERTY_SIGNER_EMAIL_ADDRESS = "signer_email_address"; - private String signerEmailAddress; + @javax.annotation.Nullable private String signerEmailAddress; public static final String JSON_PROPERTY_SIGNER_NAME = "signer_name"; - private String signerName; + @javax.annotation.Nullable private String signerName; public static final String JSON_PROPERTY_SIGNER_ROLE = "signer_role"; - private String signerRole; + @javax.annotation.Nullable private String signerRole; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private String statusCode; + @javax.annotation.Nullable private String statusCode; public static final String JSON_PROPERTY_DECLINE_REASON = "decline_reason"; - private String declineReason; + @javax.annotation.Nullable private String declineReason; public static final String JSON_PROPERTY_SIGNED_AT = "signed_at"; - private Integer signedAt; + @javax.annotation.Nullable private Integer signedAt; public static final String JSON_PROPERTY_LAST_VIEWED_AT = "last_viewed_at"; - private Integer lastViewedAt; + @javax.annotation.Nullable private Integer lastViewedAt; public static final String JSON_PROPERTY_LAST_REMINDED_AT = "last_reminded_at"; - private Integer lastRemindedAt; + @javax.annotation.Nullable private Integer lastRemindedAt; public static final String JSON_PROPERTY_HAS_PIN = "has_pin"; - private Boolean hasPin; + @javax.annotation.Nullable private Boolean hasPin; public static final String JSON_PROPERTY_HAS_SMS_AUTH = "has_sms_auth"; - private Boolean hasSmsAuth; + @javax.annotation.Nullable private Boolean hasSmsAuth; public static final String JSON_PROPERTY_HAS_SMS_DELIVERY = "has_sms_delivery"; - private Boolean hasSmsDelivery; + @javax.annotation.Nullable private Boolean hasSmsDelivery; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; public static final String JSON_PROPERTY_REASSIGNED_BY = "reassigned_by"; - private String reassignedBy; + @javax.annotation.Nullable private String reassignedBy; public static final String JSON_PROPERTY_REASSIGNMENT_REASON = "reassignment_reason"; - private String reassignmentReason; + @javax.annotation.Nullable private String reassignmentReason; public static final String JSON_PROPERTY_REASSIGNED_FROM = "reassigned_from"; - private String reassignedFrom; + @javax.annotation.Nullable private String reassignedFrom; public static final String JSON_PROPERTY_ERROR = "error"; - private String error; + @javax.annotation.Nullable private String error; public SignatureRequestResponseSignatures() {} @@ -125,7 +125,8 @@ public static SignatureRequestResponseSignatures init(HashMap data) throws Excep SignatureRequestResponseSignatures.class); } - public SignatureRequestResponseSignatures signatureId(String signatureId) { + public SignatureRequestResponseSignatures signatureId( + @javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -143,11 +144,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseSignatures signerGroupGuid(String signerGroupGuid) { + public SignatureRequestResponseSignatures signerGroupGuid( + @javax.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; return this; } @@ -165,11 +167,12 @@ public String getSignerGroupGuid() { @JsonProperty(JSON_PROPERTY_SIGNER_GROUP_GUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerGroupGuid(String signerGroupGuid) { + public void setSignerGroupGuid(@javax.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; } - public SignatureRequestResponseSignatures signerEmailAddress(String signerEmailAddress) { + public SignatureRequestResponseSignatures signerEmailAddress( + @javax.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; return this; } @@ -187,11 +190,12 @@ public String getSignerEmailAddress() { @JsonProperty(JSON_PROPERTY_SIGNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerEmailAddress(String signerEmailAddress) { + public void setSignerEmailAddress(@javax.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; } - public SignatureRequestResponseSignatures signerName(String signerName) { + public SignatureRequestResponseSignatures signerName( + @javax.annotation.Nullable String signerName) { this.signerName = signerName; return this; } @@ -209,11 +213,12 @@ public String getSignerName() { @JsonProperty(JSON_PROPERTY_SIGNER_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerName(String signerName) { + public void setSignerName(@javax.annotation.Nullable String signerName) { this.signerName = signerName; } - public SignatureRequestResponseSignatures signerRole(String signerRole) { + public SignatureRequestResponseSignatures signerRole( + @javax.annotation.Nullable String signerRole) { this.signerRole = signerRole; return this; } @@ -231,11 +236,11 @@ public String getSignerRole() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRole(String signerRole) { + public void setSignerRole(@javax.annotation.Nullable String signerRole) { this.signerRole = signerRole; } - public SignatureRequestResponseSignatures order(Integer order) { + public SignatureRequestResponseSignatures order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -253,11 +258,12 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public SignatureRequestResponseSignatures statusCode(String statusCode) { + public SignatureRequestResponseSignatures statusCode( + @javax.annotation.Nullable String statusCode) { this.statusCode = statusCode; return this; } @@ -275,11 +281,12 @@ public String getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatusCode(String statusCode) { + public void setStatusCode(@javax.annotation.Nullable String statusCode) { this.statusCode = statusCode; } - public SignatureRequestResponseSignatures declineReason(String declineReason) { + public SignatureRequestResponseSignatures declineReason( + @javax.annotation.Nullable String declineReason) { this.declineReason = declineReason; return this; } @@ -297,11 +304,12 @@ public String getDeclineReason() { @JsonProperty(JSON_PROPERTY_DECLINE_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclineReason(String declineReason) { + public void setDeclineReason(@javax.annotation.Nullable String declineReason) { this.declineReason = declineReason; } - public SignatureRequestResponseSignatures signedAt(Integer signedAt) { + public SignatureRequestResponseSignatures signedAt( + @javax.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; return this; } @@ -319,11 +327,12 @@ public Integer getSignedAt() { @JsonProperty(JSON_PROPERTY_SIGNED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignedAt(Integer signedAt) { + public void setSignedAt(@javax.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; } - public SignatureRequestResponseSignatures lastViewedAt(Integer lastViewedAt) { + public SignatureRequestResponseSignatures lastViewedAt( + @javax.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; return this; } @@ -341,11 +350,12 @@ public Integer getLastViewedAt() { @JsonProperty(JSON_PROPERTY_LAST_VIEWED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastViewedAt(Integer lastViewedAt) { + public void setLastViewedAt(@javax.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; } - public SignatureRequestResponseSignatures lastRemindedAt(Integer lastRemindedAt) { + public SignatureRequestResponseSignatures lastRemindedAt( + @javax.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; return this; } @@ -363,11 +373,11 @@ public Integer getLastRemindedAt() { @JsonProperty(JSON_PROPERTY_LAST_REMINDED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastRemindedAt(Integer lastRemindedAt) { + public void setLastRemindedAt(@javax.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; } - public SignatureRequestResponseSignatures hasPin(Boolean hasPin) { + public SignatureRequestResponseSignatures hasPin(@javax.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; return this; } @@ -385,11 +395,12 @@ public Boolean getHasPin() { @JsonProperty(JSON_PROPERTY_HAS_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasPin(Boolean hasPin) { + public void setHasPin(@javax.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; } - public SignatureRequestResponseSignatures hasSmsAuth(Boolean hasSmsAuth) { + public SignatureRequestResponseSignatures hasSmsAuth( + @javax.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; return this; } @@ -407,11 +418,12 @@ public Boolean getHasSmsAuth() { @JsonProperty(JSON_PROPERTY_HAS_SMS_AUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsAuth(Boolean hasSmsAuth) { + public void setHasSmsAuth(@javax.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; } - public SignatureRequestResponseSignatures hasSmsDelivery(Boolean hasSmsDelivery) { + public SignatureRequestResponseSignatures hasSmsDelivery( + @javax.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; return this; } @@ -429,11 +441,12 @@ public Boolean getHasSmsDelivery() { @JsonProperty(JSON_PROPERTY_HAS_SMS_DELIVERY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsDelivery(Boolean hasSmsDelivery) { + public void setHasSmsDelivery(@javax.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; } - public SignatureRequestResponseSignatures smsPhoneNumber(String smsPhoneNumber) { + public SignatureRequestResponseSignatures smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -451,11 +464,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SignatureRequestResponseSignatures reassignedBy(String reassignedBy) { + public SignatureRequestResponseSignatures reassignedBy( + @javax.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; return this; } @@ -473,11 +487,12 @@ public String getReassignedBy() { @JsonProperty(JSON_PROPERTY_REASSIGNED_BY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedBy(String reassignedBy) { + public void setReassignedBy(@javax.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; } - public SignatureRequestResponseSignatures reassignmentReason(String reassignmentReason) { + public SignatureRequestResponseSignatures reassignmentReason( + @javax.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; return this; } @@ -495,11 +510,12 @@ public String getReassignmentReason() { @JsonProperty(JSON_PROPERTY_REASSIGNMENT_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignmentReason(String reassignmentReason) { + public void setReassignmentReason(@javax.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; } - public SignatureRequestResponseSignatures reassignedFrom(String reassignedFrom) { + public SignatureRequestResponseSignatures reassignedFrom( + @javax.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; return this; } @@ -517,11 +533,11 @@ public String getReassignedFrom() { @JsonProperty(JSON_PROPERTY_REASSIGNED_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedFrom(String reassignedFrom) { + public void setReassignedFrom(@javax.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; } - public SignatureRequestResponseSignatures error(String error) { + public SignatureRequestResponseSignatures error(@javax.annotation.Nullable String error) { this.error = error; return this; } @@ -539,7 +555,7 @@ public String getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(String error) { + public void setError(@javax.annotation.Nullable String error) { this.error = error; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java index 06f7431dc..252b39102 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java @@ -57,86 +57,88 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendRequest { public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; + @Deprecated @javax.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestSendRequest() {} @@ -156,7 +158,7 @@ public static SignatureRequestSendRequest init(HashMap data) throws Exception { SignatureRequestSendRequest.class); } - public SignatureRequestSendRequest files(List files) { + public SignatureRequestSendRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -183,11 +185,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendRequest fileUrls(List fileUrls) { + public SignatureRequestSendRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -214,11 +216,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestSendRequest signers(List signers) { + public SignatureRequestSendRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -245,12 +248,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestSendRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -278,11 +281,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestSendRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -301,11 +306,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendRequest allowReassign(Boolean allowReassign) { + public SignatureRequestSendRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -325,11 +331,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestSendRequest attachments(List attachments) { + public SignatureRequestSendRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -355,11 +362,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestSendRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestSendRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -385,11 +393,11 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestSendRequest clientId(String clientId) { + public SignatureRequestSendRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -408,11 +416,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendRequest customFields(List customFields) { + public SignatureRequestSendRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -448,11 +457,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestSendRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -470,11 +480,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public SignatureRequestSendRequest formFieldGroups(List formFieldGroups) { + public SignatureRequestSendRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -504,11 +515,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public SignatureRequestSendRequest formFieldRules(List formFieldRules) { + public SignatureRequestSendRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -534,12 +547,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestSendRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -581,11 +595,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestSendRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestSendRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -607,12 +623,13 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } @Deprecated - public SignatureRequestSendRequest isQualifiedSignature(Boolean isQualifiedSignature) { + public SignatureRequestSendRequest isQualifiedSignature( + @javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -637,11 +654,11 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendRequest isEid(Boolean isEid) { + public SignatureRequestSendRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -663,11 +680,11 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendRequest message(String message) { + public SignatureRequestSendRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -685,11 +702,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendRequest metadata(Map metadata) { + public SignatureRequestSendRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -719,11 +737,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestSendRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestSendRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -741,11 +760,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -763,11 +783,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendRequest subject(String subject) { + public SignatureRequestSendRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -785,11 +805,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendRequest testMode(Boolean testMode) { + public SignatureRequestSendRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -808,11 +828,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendRequest title(String title) { + public SignatureRequestSendRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -830,11 +850,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestSendRequest useTextTags(Boolean useTextTags) { + public SignatureRequestSendRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -854,11 +874,11 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public SignatureRequestSendRequest expiresAt(Integer expiresAt) { + public SignatureRequestSendRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -878,7 +898,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java index f8ae12ab6..eba4b1488 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java @@ -48,59 +48,61 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; + @Deprecated @javax.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestSendWithTemplateRequest() {} @@ -121,7 +123,8 @@ public static SignatureRequestSendWithTemplateRequest init(HashMap data) throws SignatureRequestSendWithTemplateRequest.class); } - public SignatureRequestSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestSendWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -149,12 +152,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } public SignatureRequestSendWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -182,11 +185,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -205,11 +210,11 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestSendWithTemplateRequest ccs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -235,11 +240,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestSendWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -258,11 +264,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendWithTemplateRequest customFields(List customFields) { + public SignatureRequestSendWithTemplateRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -290,11 +297,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendWithTemplateRequest files(List files) { + public SignatureRequestSendWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -321,11 +329,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestSendWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -352,13 +361,13 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } @Deprecated public SignatureRequestSendWithTemplateRequest isQualifiedSignature( - Boolean isQualifiedSignature) { + @javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -383,11 +392,11 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendWithTemplateRequest isEid(Boolean isEid) { + public SignatureRequestSendWithTemplateRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -409,11 +418,12 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendWithTemplateRequest message(String message) { + public SignatureRequestSendWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -431,11 +441,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestSendWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -466,12 +477,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestSendWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -489,11 +500,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendWithTemplateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -511,11 +523,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendWithTemplateRequest subject(String subject) { + public SignatureRequestSendWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -533,11 +546,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestSendWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -556,11 +570,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendWithTemplateRequest title(String title) { + public SignatureRequestSendWithTemplateRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -578,7 +592,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java index 348174d71..ee3251b41 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestUpdateRequest { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nonnull private String signatureId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestUpdateRequest() {} @@ -65,7 +65,7 @@ public static SignatureRequestUpdateRequest init(HashMap data) throws Exception SignatureRequestUpdateRequest.class); } - public SignatureRequestUpdateRequest signatureId(String signatureId) { + public SignatureRequestUpdateRequest signatureId(@javax.annotation.Nonnull String signatureId) { this.signatureId = signatureId; return this; } @@ -84,11 +84,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nonnull String signatureId) { this.signatureId = signatureId; } - public SignatureRequestUpdateRequest emailAddress(String emailAddress) { + public SignatureRequestUpdateRequest emailAddress( + @javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -107,11 +108,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestUpdateRequest name(String name) { + public SignatureRequestUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -129,11 +130,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SignatureRequestUpdateRequest expiresAt(Integer expiresAt) { + public SignatureRequestUpdateRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -153,7 +154,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java index 80a59c963..d9f3ad2e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java @@ -32,20 +32,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubAttachment { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_SIGNER_INDEX = "signer_index"; - private Integer signerIndex; + @javax.annotation.Nonnull private Integer signerIndex; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; + @javax.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; + @javax.annotation.Nullable private Boolean required = false; public SubAttachment() {} @@ -63,7 +63,7 @@ public static SubAttachment init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubAttachment.class); } - public SubAttachment name(String name) { + public SubAttachment name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -82,11 +82,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubAttachment signerIndex(Integer signerIndex) { + public SubAttachment signerIndex(@javax.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; return this; } @@ -106,11 +106,11 @@ public Integer getSignerIndex() { @JsonProperty(JSON_PROPERTY_SIGNER_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerIndex(Integer signerIndex) { + public void setSignerIndex(@javax.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; } - public SubAttachment instructions(String instructions) { + public SubAttachment instructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -128,11 +128,11 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; } - public SubAttachment required(Boolean required) { + public SubAttachment required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -150,7 +150,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index e857c2e64..d08a75d1e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerList { public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public SubBulkSignerList() {} @@ -57,7 +57,8 @@ public static SubBulkSignerList init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubBulkSignerList.class); } - public SubBulkSignerList customFields(List customFields) { + public SubBulkSignerList customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -83,11 +84,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SubBulkSignerList signers(List signers) { + public SubBulkSignerList signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -115,7 +118,8 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nullable List signers) { this.signers = signers; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java index eb2ca9c7c..40145d4ed 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerListCustomField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nonnull private String value; public SubBulkSignerListCustomField() {} @@ -57,7 +57,7 @@ public static SubBulkSignerListCustomField init(HashMap data) throws Exception { SubBulkSignerListCustomField.class); } - public SubBulkSignerListCustomField name(String name) { + public SubBulkSignerListCustomField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -76,11 +76,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubBulkSignerListCustomField value(String value) { + public SubBulkSignerListCustomField value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -99,7 +99,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java index e84808261..f9b550b7e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java @@ -27,14 +27,14 @@ @JsonPropertyOrder({SubCC.JSON_PROPERTY_ROLE, SubCC.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubCC { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public SubCC() {} @@ -52,7 +52,7 @@ public static SubCC init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubCC.class); } - public SubCC role(String role) { + public SubCC role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -72,11 +72,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubCC emailAddress(String emailAddress) { + public SubCC emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -95,7 +95,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java index a9a7d92f1..4cd3a8dc2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java @@ -41,20 +41,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubCustomField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; + @javax.annotation.Nullable private String editor; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; + @javax.annotation.Nullable private Boolean required = false; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SubCustomField() {} @@ -72,7 +72,7 @@ public static SubCustomField init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubCustomField.class); } - public SubCustomField name(String name) { + public SubCustomField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -93,11 +93,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubCustomField editor(String editor) { + public SubCustomField editor(@javax.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -121,11 +121,11 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@javax.annotation.Nullable String editor) { this.editor = editor; } - public SubCustomField required(Boolean required) { + public SubCustomField required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -144,11 +144,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SubCustomField value(String value) { + public SubCustomField value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -167,7 +167,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java index 6005ad4bd..d93127b44 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubEditorOptions { public static final String JSON_PROPERTY_ALLOW_EDIT_SIGNERS = "allow_edit_signers"; - private Boolean allowEditSigners = false; + @javax.annotation.Nullable private Boolean allowEditSigners = false; public static final String JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS = "allow_edit_documents"; - private Boolean allowEditDocuments = false; + @javax.annotation.Nullable private Boolean allowEditDocuments = false; public SubEditorOptions() {} @@ -55,7 +55,7 @@ public static SubEditorOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubEditorOptions.class); } - public SubEditorOptions allowEditSigners(Boolean allowEditSigners) { + public SubEditorOptions allowEditSigners(@javax.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; return this; } @@ -73,11 +73,12 @@ public Boolean getAllowEditSigners() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditSigners(Boolean allowEditSigners) { + public void setAllowEditSigners(@javax.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; } - public SubEditorOptions allowEditDocuments(Boolean allowEditDocuments) { + public SubEditorOptions allowEditDocuments( + @javax.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; return this; } @@ -95,7 +96,7 @@ public Boolean getAllowEditDocuments() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditDocuments(Boolean allowEditDocuments) { + public void setAllowEditDocuments(@javax.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java index 80dabcc7e..b739c2d42 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({SubFieldOptions.JSON_PROPERTY_DATE_FORMAT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFieldOptions { /** @@ -38,17 +38,17 @@ public class SubFieldOptions { * higher. */ public enum DateFormatEnum { - MMDDYYYY("MM / DD / YYYY"), + MMDDYYYY(String.valueOf("MM / DD / YYYY")), - MM_DD_YYYY("MM - DD - YYYY"), + MM_DD_YYYY(String.valueOf("MM - DD - YYYY")), - DDMMYYYY("DD / MM / YYYY"), + DDMMYYYY(String.valueOf("DD / MM / YYYY")), - DD_MM_YYYY("DD - MM - YYYY"), + DD_MM_YYYY(String.valueOf("DD - MM - YYYY")), - YYYYMMDD("YYYY / MM / DD"), + YYYYMMDD(String.valueOf("YYYY / MM / DD")), - YYYY_MM_DD("YYYY - MM - DD"); + YYYY_MM_DD(String.valueOf("YYYY - MM - DD")); private String value; @@ -78,7 +78,7 @@ public static DateFormatEnum fromValue(String value) { } public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; - private DateFormatEnum dateFormat; + @javax.annotation.Nonnull private DateFormatEnum dateFormat; public SubFieldOptions() {} @@ -96,7 +96,7 @@ public static SubFieldOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFieldOptions.class); } - public SubFieldOptions dateFormat(DateFormatEnum dateFormat) { + public SubFieldOptions dateFormat(@javax.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; return this; } @@ -117,7 +117,7 @@ public DateFormatEnum getDateFormat() { @JsonProperty(JSON_PROPERTY_DATE_FORMAT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDateFormat(DateFormatEnum dateFormat) { + public void setDateFormat(@javax.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java index c4772c304..11338d70a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldGroup { public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; + @javax.annotation.Nonnull private String groupId; public static final String JSON_PROPERTY_GROUP_LABEL = "group_label"; - private String groupLabel; + @javax.annotation.Nonnull private String groupLabel; public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; + @javax.annotation.Nonnull private String requirement; public SubFormFieldGroup() {} @@ -59,7 +59,7 @@ public static SubFormFieldGroup init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldGroup.class); } - public SubFormFieldGroup groupId(String groupId) { + public SubFormFieldGroup groupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; return this; } @@ -79,11 +79,11 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; } - public SubFormFieldGroup groupLabel(String groupLabel) { + public SubFormFieldGroup groupLabel(@javax.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -102,11 +102,11 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@javax.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; } - public SubFormFieldGroup requirement(String requirement) { + public SubFormFieldGroup requirement(@javax.annotation.Nonnull String requirement) { this.requirement = requirement; return this; } @@ -130,7 +130,7 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequirement(String requirement) { + public void setRequirement(@javax.annotation.Nonnull String requirement) { this.requirement = requirement; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java index 95a816532..a32b6eb6c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java @@ -34,20 +34,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRule { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; public static final String JSON_PROPERTY_TRIGGER_OPERATOR = "trigger_operator"; - private String triggerOperator = "AND"; + @javax.annotation.Nonnull private String triggerOperator = "AND"; public static final String JSON_PROPERTY_TRIGGERS = "triggers"; - private List triggers = new ArrayList<>(); + @javax.annotation.Nonnull private List triggers = new ArrayList<>(); public static final String JSON_PROPERTY_ACTIONS = "actions"; - private List actions = new ArrayList<>(); + @javax.annotation.Nonnull private List actions = new ArrayList<>(); public SubFormFieldRule() {} @@ -65,7 +65,7 @@ public static SubFormFieldRule init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldRule.class); } - public SubFormFieldRule id(String id) { + public SubFormFieldRule id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -84,11 +84,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRule triggerOperator(String triggerOperator) { + public SubFormFieldRule triggerOperator(@javax.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; return this; } @@ -107,11 +107,12 @@ public String getTriggerOperator() { @JsonProperty(JSON_PROPERTY_TRIGGER_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerOperator(String triggerOperator) { + public void setTriggerOperator(@javax.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; } - public SubFormFieldRule triggers(List triggers) { + public SubFormFieldRule triggers( + @javax.annotation.Nonnull List triggers) { this.triggers = triggers; return this; } @@ -139,11 +140,12 @@ public List getTriggers() { @JsonProperty(JSON_PROPERTY_TRIGGERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggers(List triggers) { + public void setTriggers(@javax.annotation.Nonnull List triggers) { this.triggers = triggers; } - public SubFormFieldRule actions(List actions) { + public SubFormFieldRule actions( + @javax.annotation.Nonnull List actions) { this.actions = actions; return this; } @@ -171,7 +173,7 @@ public List getActions() { @JsonProperty(JSON_PROPERTY_ACTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setActions(List actions) { + public void setActions(@javax.annotation.Nonnull List actions) { this.actions = actions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java index 2481678d9..c26d25b82 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java @@ -34,17 +34,19 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleAction { public static final String JSON_PROPERTY_HIDDEN = "hidden"; - private Boolean hidden; + @javax.annotation.Nonnull private Boolean hidden; /** Gets or Sets type */ public enum TypeEnum { - FIELD_VISIBILITY("change-field-visibility"), + CHANGE_FIELD_VISIBILITY(String.valueOf("change-field-visibility")), + FIELD_VISIBILITY(String.valueOf("change-field-visibility")), - GROUP_VISIBILITY("change-group-visibility"); + CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")), + GROUP_VISIBILITY(String.valueOf("change-group-visibility")); private String value; @@ -74,13 +76,13 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FIELD_ID = "field_id"; - private String fieldId; + @javax.annotation.Nullable private String fieldId; public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; + @javax.annotation.Nullable private String groupId; public SubFormFieldRuleAction() {} @@ -99,7 +101,7 @@ public static SubFormFieldRuleAction init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubFormFieldRuleAction.class); } - public SubFormFieldRuleAction hidden(Boolean hidden) { + public SubFormFieldRuleAction hidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; return this; } @@ -119,11 +121,11 @@ public Boolean getHidden() { @JsonProperty(JSON_PROPERTY_HIDDEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHidden(Boolean hidden) { + public void setHidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; } - public SubFormFieldRuleAction type(TypeEnum type) { + public SubFormFieldRuleAction type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -142,11 +144,11 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } - public SubFormFieldRuleAction fieldId(String fieldId) { + public SubFormFieldRuleAction fieldId(@javax.annotation.Nullable String fieldId) { this.fieldId = fieldId; return this; } @@ -166,11 +168,11 @@ public String getFieldId() { @JsonProperty(JSON_PROPERTY_FIELD_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldId(String fieldId) { + public void setFieldId(@javax.annotation.Nullable String fieldId) { this.fieldId = fieldId; } - public SubFormFieldRuleAction groupId(String groupId) { + public SubFormFieldRuleAction groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } @@ -190,7 +192,7 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java index d56297a4d..d421a5926 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java @@ -36,11 +36,11 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleTrigger { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; /** * Different field types allow different `operator` values: - Field type of **text**: @@ -53,15 +53,15 @@ public class SubFormFieldRuleTrigger { * match, single value */ public enum OperatorEnum { - ANY("any"), + ANY(String.valueOf("any")), - IS("is"), + IS(String.valueOf("is")), - MATCH("match"), + MATCH(String.valueOf("match")), - NONE("none"), + NONE(String.valueOf("none")), - NOT("not"); + NOT(String.valueOf("not")); private String value; @@ -91,13 +91,13 @@ public static OperatorEnum fromValue(String value) { } public static final String JSON_PROPERTY_OPERATOR = "operator"; - private OperatorEnum operator; + @javax.annotation.Nonnull private OperatorEnum operator; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_VALUES = "values"; - private List values = null; + @javax.annotation.Nullable private List values = null; public SubFormFieldRuleTrigger() {} @@ -116,7 +116,7 @@ public static SubFormFieldRuleTrigger init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubFormFieldRuleTrigger.class); } - public SubFormFieldRuleTrigger id(String id) { + public SubFormFieldRuleTrigger id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -137,11 +137,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRuleTrigger operator(OperatorEnum operator) { + public SubFormFieldRuleTrigger operator(@javax.annotation.Nonnull OperatorEnum operator) { this.operator = operator; return this; } @@ -167,11 +167,11 @@ public OperatorEnum getOperator() { @JsonProperty(JSON_PROPERTY_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOperator(OperatorEnum operator) { + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { this.operator = operator; } - public SubFormFieldRuleTrigger value(String value) { + public SubFormFieldRuleTrigger value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -193,11 +193,11 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SubFormFieldRuleTrigger values(List values) { + public SubFormFieldRuleTrigger values(@javax.annotation.Nullable List values) { this.values = values; return this; } @@ -224,7 +224,7 @@ public List getValues() { @JsonProperty(JSON_PROPERTY_VALUES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValues(List values) { + public void setValues(@javax.annotation.Nullable List values) { this.values = values; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java index 7b985bccc..34bfc8529 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java @@ -57,7 +57,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -82,37 +82,37 @@ }) public class SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_DOCUMENT_INDEX = "document_index"; - private Integer documentIndex; + @javax.annotation.Nonnull private Integer documentIndex; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nonnull private String apiId; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nonnull private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nonnull private Integer width; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nonnull private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nonnull private Integer y; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; + @javax.annotation.Nullable private Integer page; public SubFormFieldsPerDocumentBase() {} @@ -132,7 +132,8 @@ public static SubFormFieldsPerDocumentBase init(HashMap data) throws Exception { SubFormFieldsPerDocumentBase.class); } - public SubFormFieldsPerDocumentBase documentIndex(Integer documentIndex) { + public SubFormFieldsPerDocumentBase documentIndex( + @javax.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; return this; } @@ -152,11 +153,11 @@ public Integer getDocumentIndex() { @JsonProperty(JSON_PROPERTY_DOCUMENT_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDocumentIndex(Integer documentIndex) { + public void setDocumentIndex(@javax.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; } - public SubFormFieldsPerDocumentBase apiId(String apiId) { + public SubFormFieldsPerDocumentBase apiId(@javax.annotation.Nonnull String apiId) { this.apiId = apiId; return this; } @@ -175,11 +176,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nonnull String apiId) { this.apiId = apiId; } - public SubFormFieldsPerDocumentBase height(Integer height) { + public SubFormFieldsPerDocumentBase height(@javax.annotation.Nonnull Integer height) { this.height = height; return this; } @@ -198,11 +199,11 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nonnull Integer height) { this.height = height; } - public SubFormFieldsPerDocumentBase required(Boolean required) { + public SubFormFieldsPerDocumentBase required(@javax.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -221,11 +222,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nonnull Boolean required) { this.required = required; } - public SubFormFieldsPerDocumentBase signer(String signer) { + public SubFormFieldsPerDocumentBase signer(@javax.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -252,7 +253,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nonnull String signer) { this.signer = signer; } @@ -260,7 +261,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public SubFormFieldsPerDocumentBase type(String type) { + public SubFormFieldsPerDocumentBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -279,11 +280,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentBase width(Integer width) { + public SubFormFieldsPerDocumentBase width(@javax.annotation.Nonnull Integer width) { this.width = width; return this; } @@ -302,11 +303,11 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nonnull Integer width) { this.width = width; } - public SubFormFieldsPerDocumentBase x(Integer x) { + public SubFormFieldsPerDocumentBase x(@javax.annotation.Nonnull Integer x) { this.x = x; return this; } @@ -325,11 +326,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nonnull Integer x) { this.x = x; } - public SubFormFieldsPerDocumentBase y(Integer y) { + public SubFormFieldsPerDocumentBase y(@javax.annotation.Nonnull Integer y) { this.y = y; return this; } @@ -348,11 +349,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nonnull Integer y) { this.y = y; } - public SubFormFieldsPerDocumentBase name(String name) { + public SubFormFieldsPerDocumentBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -370,11 +371,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SubFormFieldsPerDocumentBase page(Integer page) { + public SubFormFieldsPerDocumentBase page(@javax.annotation.Nullable Integer page) { this.page = page; return this; } @@ -395,7 +396,7 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@javax.annotation.Nullable Integer page) { this.page = page; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java index d9e67248b..edfc9ed9d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,13 +43,13 @@ visible = true) public class SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; + @javax.annotation.Nonnull private Boolean isChecked; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public SubFormFieldsPerDocumentCheckbox() {} @@ -69,7 +69,7 @@ public static SubFormFieldsPerDocumentCheckbox init(HashMap data) throws Excepti SubFormFieldsPerDocumentCheckbox.class); } - public SubFormFieldsPerDocumentCheckbox type(String type) { + public SubFormFieldsPerDocumentCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentCheckbox isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentCheckbox isChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -111,11 +111,11 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } - public SubFormFieldsPerDocumentCheckbox group(String group) { + public SubFormFieldsPerDocumentCheckbox group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -133,7 +133,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java index 0889539bd..d414d0c74 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentCheckboxMerge.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; + @javax.annotation.Nonnull private String type = "checkbox-merge"; public SubFormFieldsPerDocumentCheckboxMerge() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentCheckboxMerge init(HashMap data) throws Ex SubFormFieldsPerDocumentCheckboxMerge.class); } - public SubFormFieldsPerDocumentCheckboxMerge type(String type) { + public SubFormFieldsPerDocumentCheckboxMerge type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -79,7 +79,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java index 83e5960aa..afb25159e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -45,41 +45,41 @@ visible = true) public class SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -109,10 +109,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDateSigned() {} @@ -132,7 +132,7 @@ public static SubFormFieldsPerDocumentDateSigned init(HashMap data) throws Excep SubFormFieldsPerDocumentDateSigned.class); } - public SubFormFieldsPerDocumentDateSigned type(String type) { + public SubFormFieldsPerDocumentDateSigned type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -151,11 +151,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDateSigned fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDateSigned fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -173,11 +174,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDateSigned fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDateSigned fontSize( + @javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -197,7 +199,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java index 5089a091d..035f0e7f3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -49,47 +49,47 @@ visible = true) public class SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_OPTIONS = "options"; - private List options = new ArrayList<>(); + @javax.annotation.Nonnull private List options = new ArrayList<>(); public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nullable private String content; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -119,10 +119,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDropdown() {} @@ -142,7 +142,7 @@ public static SubFormFieldsPerDocumentDropdown init(HashMap data) throws Excepti SubFormFieldsPerDocumentDropdown.class); } - public SubFormFieldsPerDocumentDropdown type(String type) { + public SubFormFieldsPerDocumentDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -161,11 +161,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDropdown options(List options) { + public SubFormFieldsPerDocumentDropdown options( + @javax.annotation.Nonnull List options) { this.options = options; return this; } @@ -192,11 +193,11 @@ public List getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOptions(List options) { + public void setOptions(@javax.annotation.Nonnull List options) { this.options = options; } - public SubFormFieldsPerDocumentDropdown content(String content) { + public SubFormFieldsPerDocumentDropdown content(@javax.annotation.Nullable String content) { this.content = content; return this; } @@ -214,11 +215,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentDropdown fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDropdown fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -236,11 +238,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDropdown fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDropdown fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -260,7 +262,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java index c3b09b212..0a1af8390 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -47,47 +47,47 @@ visible = true) public class SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nonnull private String content; public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; - private String contentUrl; + @javax.annotation.Nonnull private String contentUrl; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -117,10 +117,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentHyperlink() {} @@ -140,7 +140,7 @@ public static SubFormFieldsPerDocumentHyperlink init(HashMap data) throws Except SubFormFieldsPerDocumentHyperlink.class); } - public SubFormFieldsPerDocumentHyperlink type(String type) { + public SubFormFieldsPerDocumentHyperlink type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -159,11 +159,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentHyperlink content(String content) { + public SubFormFieldsPerDocumentHyperlink content(@javax.annotation.Nonnull String content) { this.content = content; return this; } @@ -182,11 +182,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nonnull String content) { this.content = content; } - public SubFormFieldsPerDocumentHyperlink contentUrl(String contentUrl) { + public SubFormFieldsPerDocumentHyperlink contentUrl( + @javax.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; return this; } @@ -205,11 +206,12 @@ public String getContentUrl() { @JsonProperty(JSON_PROPERTY_CONTENT_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContentUrl(String contentUrl) { + public void setContentUrl(@javax.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; } - public SubFormFieldsPerDocumentHyperlink fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentHyperlink fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -227,11 +229,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentHyperlink fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentHyperlink fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -251,7 +253,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java index 4cb9a0519..d00c7e281 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentInitials.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public SubFormFieldsPerDocumentInitials() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentInitials init(HashMap data) throws Excepti SubFormFieldsPerDocumentInitials.class); } - public SubFormFieldsPerDocumentInitials type(String type) { + public SubFormFieldsPerDocumentInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -78,7 +78,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java index f6837cfe1..e72b7f9b2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,13 +43,13 @@ visible = true) public class SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; + @javax.annotation.Nonnull private Boolean isChecked; public SubFormFieldsPerDocumentRadio() {} @@ -69,7 +69,7 @@ public static SubFormFieldsPerDocumentRadio init(HashMap data) throws Exception SubFormFieldsPerDocumentRadio.class); } - public SubFormFieldsPerDocumentRadio type(String type) { + public SubFormFieldsPerDocumentRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentRadio group(String group) { + public SubFormFieldsPerDocumentRadio group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -111,11 +111,11 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } - public SubFormFieldsPerDocumentRadio isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentRadio isChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -135,7 +135,7 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java index 4c3019c99..71370c6d2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentSignature.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public SubFormFieldsPerDocumentSignature() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentSignature init(HashMap data) throws Except SubFormFieldsPerDocumentSignature.class); } - public SubFormFieldsPerDocumentSignature type(String type) { + public SubFormFieldsPerDocumentSignature type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -78,7 +78,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java index 31ab41161..00d47ecb5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java @@ -42,7 +42,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -53,19 +53,19 @@ visible = true) public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_PLACEHOLDER = "placeholder"; - private String placeholder; + @javax.annotation.Nullable private String placeholder; public static final String JSON_PROPERTY_AUTO_FILL_TYPE = "auto_fill_type"; - private String autoFillType; + @javax.annotation.Nullable private String autoFillType; public static final String JSON_PROPERTY_LINK_ID = "link_id"; - private String linkId; + @javax.annotation.Nullable private String linkId; public static final String JSON_PROPERTY_MASKED = "masked"; - private Boolean masked; + @javax.annotation.Nullable private Boolean masked; /** * Each text field may contain a `validation_type` parameter. Check out the list of @@ -76,25 +76,25 @@ public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { * case of an invalid value. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -124,51 +124,51 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; + @javax.annotation.Nullable private ValidationTypeEnum validationType; public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX = "validation_custom_regex"; - private String validationCustomRegex; + @javax.annotation.Nullable private String validationCustomRegex; public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL = "validation_custom_regex_format_label"; - private String validationCustomRegexFormatLabel; + @javax.annotation.Nullable private String validationCustomRegexFormatLabel; public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nullable private String content; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -198,10 +198,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentText() {} @@ -221,7 +221,7 @@ public static SubFormFieldsPerDocumentText init(HashMap data) throws Exception { SubFormFieldsPerDocumentText.class); } - public SubFormFieldsPerDocumentText type(String type) { + public SubFormFieldsPerDocumentText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -240,11 +240,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentText placeholder(String placeholder) { + public SubFormFieldsPerDocumentText placeholder(@javax.annotation.Nullable String placeholder) { this.placeholder = placeholder; return this; } @@ -262,11 +262,12 @@ public String getPlaceholder() { @JsonProperty(JSON_PROPERTY_PLACEHOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlaceholder(String placeholder) { + public void setPlaceholder(@javax.annotation.Nullable String placeholder) { this.placeholder = placeholder; } - public SubFormFieldsPerDocumentText autoFillType(String autoFillType) { + public SubFormFieldsPerDocumentText autoFillType( + @javax.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; return this; } @@ -285,11 +286,11 @@ public String getAutoFillType() { @JsonProperty(JSON_PROPERTY_AUTO_FILL_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAutoFillType(String autoFillType) { + public void setAutoFillType(@javax.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; } - public SubFormFieldsPerDocumentText linkId(String linkId) { + public SubFormFieldsPerDocumentText linkId(@javax.annotation.Nullable String linkId) { this.linkId = linkId; return this; } @@ -308,11 +309,11 @@ public String getLinkId() { @JsonProperty(JSON_PROPERTY_LINK_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkId(String linkId) { + public void setLinkId(@javax.annotation.Nullable String linkId) { this.linkId = linkId; } - public SubFormFieldsPerDocumentText masked(Boolean masked) { + public SubFormFieldsPerDocumentText masked(@javax.annotation.Nullable Boolean masked) { this.masked = masked; return this; } @@ -332,11 +333,12 @@ public Boolean getMasked() { @JsonProperty(JSON_PROPERTY_MASKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMasked(Boolean masked) { + public void setMasked(@javax.annotation.Nullable Boolean masked) { this.masked = masked; } - public SubFormFieldsPerDocumentText validationType(ValidationTypeEnum validationType) { + public SubFormFieldsPerDocumentText validationType( + @javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -359,11 +361,12 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public SubFormFieldsPerDocumentText validationCustomRegex(String validationCustomRegex) { + public SubFormFieldsPerDocumentText validationCustomRegex( + @javax.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; return this; } @@ -381,12 +384,12 @@ public String getValidationCustomRegex() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegex(String validationCustomRegex) { + public void setValidationCustomRegex(@javax.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; } public SubFormFieldsPerDocumentText validationCustomRegexFormatLabel( - String validationCustomRegexFormatLabel) { + @javax.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; return this; } @@ -404,11 +407,12 @@ public String getValidationCustomRegexFormatLabel() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegexFormatLabel(String validationCustomRegexFormatLabel) { + public void setValidationCustomRegexFormatLabel( + @javax.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; } - public SubFormFieldsPerDocumentText content(String content) { + public SubFormFieldsPerDocumentText content(@javax.annotation.Nullable String content) { this.content = content; return this; } @@ -426,11 +430,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentText fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentText fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -448,11 +453,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentText fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentText fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -472,7 +477,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java index 833bfc7f4..d4bf984d5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -45,41 +45,41 @@ visible = true) public class SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; + @javax.annotation.Nonnull private String type = "text-merge"; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -109,10 +109,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentTextMerge() {} @@ -132,7 +132,7 @@ public static SubFormFieldsPerDocumentTextMerge init(HashMap data) throws Except SubFormFieldsPerDocumentTextMerge.class); } - public SubFormFieldsPerDocumentTextMerge type(String type) { + public SubFormFieldsPerDocumentTextMerge type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -152,11 +152,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentTextMerge fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentTextMerge fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -174,11 +175,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentTextMerge fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentTextMerge fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -198,7 +199,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java index 53accb1a1..d4f7fba9f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java @@ -29,17 +29,17 @@ @JsonPropertyOrder({SubMergeField.JSON_PROPERTY_NAME, SubMergeField.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubMergeField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; /** The type of merge field. */ public enum TypeEnum { - TEXT("text"), + TEXT(String.valueOf("text")), - CHECKBOX("checkbox"); + CHECKBOX(String.valueOf("checkbox")); private String value; @@ -69,7 +69,7 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public SubMergeField() {} @@ -87,7 +87,7 @@ public static SubMergeField init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubMergeField.class); } - public SubMergeField name(String name) { + public SubMergeField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -106,11 +106,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubMergeField type(TypeEnum type) { + public SubMergeField type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -129,7 +129,7 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java index 015efbcb4..1d7220b38 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java @@ -31,29 +31,29 @@ @JsonPropertyOrder({SubOAuth.JSON_PROPERTY_CALLBACK_URL, SubOAuth.JSON_PROPERTY_SCOPES}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; /** Gets or Sets scopes */ public enum ScopesEnum { - REQUEST_SIGNATURE("request_signature"), + REQUEST_SIGNATURE(String.valueOf("request_signature")), - BASIC_ACCOUNT_INFO("basic_account_info"), + BASIC_ACCOUNT_INFO(String.valueOf("basic_account_info")), - ACCOUNT_ACCESS("account_access"), + ACCOUNT_ACCESS(String.valueOf("account_access")), - SIGNATURE_REQUEST_ACCESS("signature_request_access"), + SIGNATURE_REQUEST_ACCESS(String.valueOf("signature_request_access")), - TEMPLATE_ACCESS("template_access"), + TEMPLATE_ACCESS(String.valueOf("template_access")), - TEAM_ACCESS("team_access"), + TEAM_ACCESS(String.valueOf("team_access")), - API_APP_ACCESS("api_app_access"), + API_APP_ACCESS(String.valueOf("api_app_access")), - EMPTY(""); + EMPTY(String.valueOf("")); private String value; @@ -83,7 +83,7 @@ public static ScopesEnum fromValue(String value) { } public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; + @javax.annotation.Nullable private List scopes = null; public SubOAuth() {} @@ -101,7 +101,7 @@ public static SubOAuth init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubOAuth.class); } - public SubOAuth callbackUrl(String callbackUrl) { + public SubOAuth callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -120,11 +120,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public SubOAuth scopes(List scopes) { + public SubOAuth scopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -151,7 +151,7 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java index c172a1be1..dca71d2ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({SubOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere = false; + @javax.annotation.Nullable private Boolean canInsertEverywhere = false; public SubOptions() {} @@ -49,7 +49,7 @@ public static SubOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubOptions.class); } - public SubOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public SubOptions canInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -67,7 +67,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java index e6c28a56a..b67ccb989 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestGroupedSigners { public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubSignatureRequestGroupedSigners() {} @@ -63,7 +63,7 @@ public static SubSignatureRequestGroupedSigners init(HashMap data) throws Except SubSignatureRequestGroupedSigners.class); } - public SubSignatureRequestGroupedSigners group(String group) { + public SubSignatureRequestGroupedSigners group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -82,11 +82,12 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } - public SubSignatureRequestGroupedSigners signers(List signers) { + public SubSignatureRequestGroupedSigners signers( + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -115,11 +116,11 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nonnull List signers) { this.signers = signers; } - public SubSignatureRequestGroupedSigners order(Integer order) { + public SubSignatureRequestGroupedSigners order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -138,7 +139,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java index a110601e8..6bfe0c6eb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java @@ -36,23 +36,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestSigner { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; + @javax.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default @@ -61,9 +61,9 @@ public class SubSignatureRequestSigner { * the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -93,7 +93,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; + @javax.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestSigner() {} @@ -113,7 +113,7 @@ public static SubSignatureRequestSigner init(HashMap data) throws Exception { SubSignatureRequestSigner.class); } - public SubSignatureRequestSigner name(String name) { + public SubSignatureRequestSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -132,11 +132,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestSigner emailAddress(String emailAddress) { + public SubSignatureRequestSigner emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -155,11 +155,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestSigner order(Integer order) { + public SubSignatureRequestSigner order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -177,11 +177,11 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public SubSignatureRequestSigner pin(String pin) { + public SubSignatureRequestSigner pin(@javax.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -199,11 +199,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@javax.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestSigner smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -226,11 +227,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SubSignatureRequestSigner smsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public SubSignatureRequestSigner smsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -251,7 +253,8 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java index 1c2b9ee34..a43dfa702 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java @@ -36,23 +36,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; + @javax.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default @@ -61,9 +61,9 @@ public class SubSignatureRequestTemplateSigner { * the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -93,7 +93,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; + @javax.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestTemplateSigner() {} @@ -113,7 +113,7 @@ public static SubSignatureRequestTemplateSigner init(HashMap data) throws Except SubSignatureRequestTemplateSigner.class); } - public SubSignatureRequestTemplateSigner role(String role) { + public SubSignatureRequestTemplateSigner role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -132,11 +132,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubSignatureRequestTemplateSigner name(String name) { + public SubSignatureRequestTemplateSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -155,11 +155,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestTemplateSigner emailAddress(String emailAddress) { + public SubSignatureRequestTemplateSigner emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -178,11 +179,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestTemplateSigner pin(String pin) { + public SubSignatureRequestTemplateSigner pin(@javax.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -200,11 +201,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@javax.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestTemplateSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestTemplateSigner smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -227,12 +229,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } public SubSignatureRequestTemplateSigner smsPhoneNumberType( - SmsPhoneNumberTypeEnum smsPhoneNumberType) { + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -253,7 +255,8 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java index c1be71eed..0dea6a670 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java @@ -39,18 +39,18 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSigningOptions { /** The default type shown (limited to the listed types) */ public enum DefaultTypeEnum { - DRAW("draw"), + DRAW(String.valueOf("draw")), - PHONE("phone"), + PHONE(String.valueOf("phone")), - TYPE("type"), + TYPE(String.valueOf("type")), - UPLOAD("upload"); + UPLOAD(String.valueOf("upload")); private String value; @@ -80,19 +80,19 @@ public static DefaultTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_DEFAULT_TYPE = "default_type"; - private DefaultTypeEnum defaultType; + @javax.annotation.Nonnull private DefaultTypeEnum defaultType; public static final String JSON_PROPERTY_DRAW = "draw"; - private Boolean draw = false; + @javax.annotation.Nullable private Boolean draw = false; public static final String JSON_PROPERTY_PHONE = "phone"; - private Boolean phone = false; + @javax.annotation.Nullable private Boolean phone = false; public static final String JSON_PROPERTY_TYPE = "type"; - private Boolean type = false; + @javax.annotation.Nullable private Boolean type = false; public static final String JSON_PROPERTY_UPLOAD = "upload"; - private Boolean upload = false; + @javax.annotation.Nullable private Boolean upload = false; public SubSigningOptions() {} @@ -110,7 +110,7 @@ public static SubSigningOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubSigningOptions.class); } - public SubSigningOptions defaultType(DefaultTypeEnum defaultType) { + public SubSigningOptions defaultType(@javax.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; return this; } @@ -129,11 +129,11 @@ public DefaultTypeEnum getDefaultType() { @JsonProperty(JSON_PROPERTY_DEFAULT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDefaultType(DefaultTypeEnum defaultType) { + public void setDefaultType(@javax.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; } - public SubSigningOptions draw(Boolean draw) { + public SubSigningOptions draw(@javax.annotation.Nullable Boolean draw) { this.draw = draw; return this; } @@ -151,11 +151,11 @@ public Boolean getDraw() { @JsonProperty(JSON_PROPERTY_DRAW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDraw(Boolean draw) { + public void setDraw(@javax.annotation.Nullable Boolean draw) { this.draw = draw; } - public SubSigningOptions phone(Boolean phone) { + public SubSigningOptions phone(@javax.annotation.Nullable Boolean phone) { this.phone = phone; return this; } @@ -173,11 +173,11 @@ public Boolean getPhone() { @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(Boolean phone) { + public void setPhone(@javax.annotation.Nullable Boolean phone) { this.phone = phone; } - public SubSigningOptions type(Boolean type) { + public SubSigningOptions type(@javax.annotation.Nullable Boolean type) { this.type = type; return this; } @@ -195,11 +195,11 @@ public Boolean getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(Boolean type) { + public void setType(@javax.annotation.Nullable Boolean type) { this.type = type; } - public SubSigningOptions upload(Boolean upload) { + public SubSigningOptions upload(@javax.annotation.Nullable Boolean upload) { this.upload = upload; return this; } @@ -217,7 +217,7 @@ public Boolean getUpload() { @JsonProperty(JSON_PROPERTY_UPLOAD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpload(Boolean upload) { + public void setUpload(@javax.annotation.Nullable Boolean upload) { this.upload = upload; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java index 359c32a6c..34ff420c4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java @@ -27,14 +27,14 @@ @JsonPropertyOrder({SubTeamResponse.JSON_PROPERTY_TEAM_ID, SubTeamResponse.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubTeamResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public SubTeamResponse() {} @@ -52,7 +52,7 @@ public static SubTeamResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubTeamResponse.class); } - public SubTeamResponse teamId(String teamId) { + public SubTeamResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -70,11 +70,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public SubTeamResponse name(String name) { + public SubTeamResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -92,7 +92,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java index 78413aade..d1d482e85 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java @@ -27,14 +27,14 @@ @JsonPropertyOrder({SubTemplateRole.JSON_PROPERTY_NAME, SubTemplateRole.JSON_PROPERTY_ORDER}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubTemplateRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubTemplateRole() {} @@ -52,7 +52,7 @@ public static SubTemplateRole init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubTemplateRole.class); } - public SubTemplateRole name(String name) { + public SubTemplateRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -71,11 +71,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SubTemplateRole order(Integer order) { + public SubTemplateRole order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -93,7 +93,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java index 0118049aa..e7761bd14 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftSigner { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubUnclaimedDraftSigner() {} @@ -60,7 +60,7 @@ public static SubUnclaimedDraftSigner init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubUnclaimedDraftSigner.class); } - public SubUnclaimedDraftSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftSigner emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -79,11 +79,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubUnclaimedDraftSigner name(String name) { + public SubUnclaimedDraftSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -102,11 +102,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftSigner order(Integer order) { + public SubUnclaimedDraftSigner order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -124,7 +124,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java index 58128a75e..337c82ff8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public SubUnclaimedDraftTemplateSigner() {} @@ -61,7 +61,7 @@ public static SubUnclaimedDraftTemplateSigner init(HashMap data) throws Exceptio SubUnclaimedDraftTemplateSigner.class); } - public SubUnclaimedDraftTemplateSigner role(String role) { + public SubUnclaimedDraftTemplateSigner role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -80,11 +80,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubUnclaimedDraftTemplateSigner name(String name) { + public SubUnclaimedDraftTemplateSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -103,11 +103,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftTemplateSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftTemplateSigner emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -126,7 +127,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java index 2737e1b6d..aaa5e980f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java @@ -49,17 +49,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1a1a1a"; + @javax.annotation.Nullable private String headerBackgroundColor = "#1a1a1a"; /** Gets or Sets legalVersion */ public enum LegalVersionEnum { - TERMS1("terms1"), + TERMS1(String.valueOf("terms1")), - TERMS2("terms2"); + TERMS2(String.valueOf("terms2")); private String value; @@ -89,52 +89,52 @@ public static LegalVersionEnum fromValue(String value) { } public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; + @javax.annotation.Nullable private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#0061FE"; + @javax.annotation.Nullable private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#f7f8f9"; + @javax.annotation.Nullable private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#0061FE"; + @javax.annotation.Nullable private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover = "#0061FE"; + @javax.annotation.Nullable private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor = "#ffffff"; + @javax.annotation.Nullable private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#ffffff"; + @javax.annotation.Nullable private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#ffffff"; + @javax.annotation.Nullable private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#ffffff"; + @javax.annotation.Nullable private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor = "#0061FE"; + @javax.annotation.Nullable private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#0061FE"; + @javax.annotation.Nullable private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1 = "#808080"; + @javax.annotation.Nullable private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#ffffff"; + @javax.annotation.Nullable private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; - private Boolean resetToDefault; + @javax.annotation.Nullable private Boolean resetToDefault; public SubWhiteLabelingOptions() {} @@ -153,7 +153,8 @@ public static SubWhiteLabelingOptions init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubWhiteLabelingOptions.class); } - public SubWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public SubWhiteLabelingOptions headerBackgroundColor( + @javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -171,11 +172,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public SubWhiteLabelingOptions legalVersion(LegalVersionEnum legalVersion) { + public SubWhiteLabelingOptions legalVersion( + @javax.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; return this; } @@ -193,11 +195,11 @@ public LegalVersionEnum getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(LegalVersionEnum legalVersion) { + public void setLegalVersion(@javax.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; } - public SubWhiteLabelingOptions linkColor(String linkColor) { + public SubWhiteLabelingOptions linkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -215,11 +217,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public SubWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public SubWhiteLabelingOptions pageBackgroundColor( + @javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -237,11 +240,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public SubWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public SubWhiteLabelingOptions primaryButtonColor( + @javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -259,11 +263,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } - public SubWhiteLabelingOptions primaryButtonColorHover(String primaryButtonColorHover) { + public SubWhiteLabelingOptions primaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -281,11 +286,13 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } - public SubWhiteLabelingOptions primaryButtonTextColor(String primaryButtonTextColor) { + public SubWhiteLabelingOptions primaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -303,11 +310,13 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } - public SubWhiteLabelingOptions primaryButtonTextColorHover(String primaryButtonTextColorHover) { + public SubWhiteLabelingOptions primaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -325,11 +334,13 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public SubWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public SubWhiteLabelingOptions secondaryButtonColor( + @javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -347,11 +358,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } - public SubWhiteLabelingOptions secondaryButtonColorHover(String secondaryButtonColorHover) { + public SubWhiteLabelingOptions secondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -369,11 +381,13 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } - public SubWhiteLabelingOptions secondaryButtonTextColor(String secondaryButtonTextColor) { + public SubWhiteLabelingOptions secondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -391,12 +405,13 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } public SubWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -414,11 +429,12 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover( + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public SubWhiteLabelingOptions textColor1(String textColor1) { + public SubWhiteLabelingOptions textColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -436,11 +452,11 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public SubWhiteLabelingOptions textColor2(String textColor2) { + public SubWhiteLabelingOptions textColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -458,11 +474,12 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } - public SubWhiteLabelingOptions resetToDefault(Boolean resetToDefault) { + public SubWhiteLabelingOptions resetToDefault( + @javax.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; return this; } @@ -480,7 +497,7 @@ public Boolean getResetToDefault() { @JsonProperty(JSON_PROPERTY_RESET_TO_DEFAULT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResetToDefault(Boolean resetToDefault) { + public void setResetToDefault(@javax.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java index 49beaf28e..0c25c96b8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java @@ -33,27 +33,27 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamAddMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; /** * A role member will take in a new Team. **NOTE:** This parameter is used only if * `team_id` is provided. */ public enum RoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -83,7 +83,7 @@ public static RoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_ROLE = "role"; - private RoleEnum role; + @javax.annotation.Nullable private RoleEnum role; public TeamAddMemberRequest() {} @@ -101,7 +101,7 @@ public static TeamAddMemberRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamAddMemberRequest.class); } - public TeamAddMemberRequest accountId(String accountId) { + public TeamAddMemberRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -120,11 +120,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamAddMemberRequest emailAddress(String emailAddress) { + public TeamAddMemberRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -143,11 +143,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamAddMemberRequest role(RoleEnum role) { + public TeamAddMemberRequest role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } @@ -166,7 +166,7 @@ public RoleEnum getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(RoleEnum role) { + public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index 6724eeaae..2766e1d20 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TeamCreateRequest.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamCreateRequest { public static final String JSON_PROPERTY_NAME = "name"; - private String name = "Untitled Team"; + @javax.annotation.Nullable private String name = "Untitled Team"; public TeamCreateRequest() {} @@ -49,7 +49,7 @@ public static TeamCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamCreateRequest.class); } - public TeamCreateRequest name(String name) { + public TeamCreateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -67,7 +67,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java index fbb889e11..b26c99715 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetInfoResponse { public static final String JSON_PROPERTY_TEAM = "team"; - private TeamInfoResponse team; + @javax.annotation.Nonnull private TeamInfoResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamGetInfoResponse() {} @@ -57,7 +57,7 @@ public static TeamGetInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamGetInfoResponse.class); } - public TeamGetInfoResponse team(TeamInfoResponse team) { + public TeamGetInfoResponse team(@javax.annotation.Nonnull TeamInfoResponse team) { this.team = team; return this; } @@ -76,11 +76,11 @@ public TeamInfoResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamInfoResponse team) { + public void setTeam(@javax.annotation.Nonnull TeamInfoResponse team) { this.team = team; } - public TeamGetInfoResponse warnings(List warnings) { + public TeamGetInfoResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java index c7be1f6ee..2bee16d9e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java @@ -29,14 +29,14 @@ @JsonPropertyOrder({TeamGetResponse.JSON_PROPERTY_TEAM, TeamGetResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetResponse { public static final String JSON_PROPERTY_TEAM = "team"; - private TeamResponse team; + @javax.annotation.Nonnull private TeamResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamGetResponse() {} @@ -54,7 +54,7 @@ public static TeamGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamGetResponse.class); } - public TeamGetResponse team(TeamResponse team) { + public TeamGetResponse team(@javax.annotation.Nonnull TeamResponse team) { this.team = team; return this; } @@ -73,11 +73,11 @@ public TeamResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamResponse team) { + public void setTeam(@javax.annotation.Nonnull TeamResponse team) { this.team = team; } - public TeamGetResponse warnings(List warnings) { + public TeamGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -103,7 +103,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java index 7edabf525..09b1f9c66 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java @@ -33,23 +33,23 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInfoResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_TEAM_PARENT = "team_parent"; - private TeamParentResponse teamParent; + @javax.annotation.Nullable private TeamParentResponse teamParent; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_NUM_MEMBERS = "num_members"; - private Integer numMembers; + @javax.annotation.Nullable private Integer numMembers; public static final String JSON_PROPERTY_NUM_SUB_TEAMS = "num_sub_teams"; - private Integer numSubTeams; + @javax.annotation.Nullable private Integer numSubTeams; public TeamInfoResponse() {} @@ -67,7 +67,7 @@ public static TeamInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInfoResponse.class); } - public TeamInfoResponse teamId(String teamId) { + public TeamInfoResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -85,11 +85,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInfoResponse teamParent(TeamParentResponse teamParent) { + public TeamInfoResponse teamParent(@javax.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; return this; } @@ -107,11 +107,11 @@ public TeamParentResponse getTeamParent() { @JsonProperty(JSON_PROPERTY_TEAM_PARENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamParent(TeamParentResponse teamParent) { + public void setTeamParent(@javax.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; } - public TeamInfoResponse name(String name) { + public TeamInfoResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -129,11 +129,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TeamInfoResponse numMembers(Integer numMembers) { + public TeamInfoResponse numMembers(@javax.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; return this; } @@ -151,11 +151,11 @@ public Integer getNumMembers() { @JsonProperty(JSON_PROPERTY_NUM_MEMBERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumMembers(Integer numMembers) { + public void setNumMembers(@javax.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; } - public TeamInfoResponse numSubTeams(Integer numSubTeams) { + public TeamInfoResponse numSubTeams(@javax.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; return this; } @@ -173,7 +173,7 @@ public Integer getNumSubTeams() { @JsonProperty(JSON_PROPERTY_NUM_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumSubTeams(Integer numSubTeams) { + public void setNumSubTeams(@javax.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java index 2d49161bf..05bcf91b5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java @@ -34,26 +34,26 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInviteResponse { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nullable private String role; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; + @javax.annotation.Nullable private Integer sentAt; public static final String JSON_PROPERTY_REDEEMED_AT = "redeemed_at"; - private Integer redeemedAt; + @javax.annotation.Nullable private Integer redeemedAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public TeamInviteResponse() {} @@ -71,7 +71,7 @@ public static TeamInviteResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInviteResponse.class); } - public TeamInviteResponse emailAddress(String emailAddress) { + public TeamInviteResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -89,11 +89,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamInviteResponse teamId(String teamId) { + public TeamInviteResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -111,11 +111,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInviteResponse role(String role) { + public TeamInviteResponse role(@javax.annotation.Nullable String role) { this.role = role; return this; } @@ -133,11 +133,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nullable String role) { this.role = role; } - public TeamInviteResponse sentAt(Integer sentAt) { + public TeamInviteResponse sentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -155,11 +155,11 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } - public TeamInviteResponse redeemedAt(Integer redeemedAt) { + public TeamInviteResponse redeemedAt(@javax.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; return this; } @@ -177,11 +177,11 @@ public Integer getRedeemedAt() { @JsonProperty(JSON_PROPERTY_REDEEMED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRedeemedAt(Integer redeemedAt) { + public void setRedeemedAt(@javax.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; } - public TeamInviteResponse expiresAt(Integer expiresAt) { + public TeamInviteResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -199,7 +199,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java index 0e13d74c2..0fee37e1f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInvitesResponse { public static final String JSON_PROPERTY_TEAM_INVITES = "team_invites"; - private List teamInvites = new ArrayList<>(); + @javax.annotation.Nonnull private List teamInvites = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamInvitesResponse() {} @@ -57,7 +57,8 @@ public static TeamInvitesResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInvitesResponse.class); } - public TeamInvitesResponse teamInvites(List teamInvites) { + public TeamInvitesResponse teamInvites( + @javax.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; return this; } @@ -84,11 +85,11 @@ public List getTeamInvites() { @JsonProperty(JSON_PROPERTY_TEAM_INVITES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamInvites(List teamInvites) { + public void setTeamInvites(@javax.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; } - public TeamInvitesResponse warnings(List warnings) { + public TeamInvitesResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -114,7 +115,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java index 1f86e2a5b..ce80c5eb7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMemberResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nullable private String role; public TeamMemberResponse() {} @@ -59,7 +59,7 @@ public static TeamMemberResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamMemberResponse.class); } - public TeamMemberResponse accountId(String accountId) { + public TeamMemberResponse accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -77,11 +77,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamMemberResponse emailAddress(String emailAddress) { + public TeamMemberResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -99,11 +99,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamMemberResponse role(String role) { + public TeamMemberResponse role(@javax.annotation.Nullable String role) { this.role = role; return this; } @@ -121,7 +121,7 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nullable String role) { this.role = role; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java index 203819cbf..8dd4d104c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMembersResponse { public static final String JSON_PROPERTY_TEAM_MEMBERS = "team_members"; - private List teamMembers = new ArrayList<>(); + @javax.annotation.Nonnull private List teamMembers = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamMembersResponse() {} @@ -61,7 +61,8 @@ public static TeamMembersResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamMembersResponse.class); } - public TeamMembersResponse teamMembers(List teamMembers) { + public TeamMembersResponse teamMembers( + @javax.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; return this; } @@ -88,11 +89,11 @@ public List getTeamMembers() { @JsonProperty(JSON_PROPERTY_TEAM_MEMBERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamMembers(List teamMembers) { + public void setTeamMembers(@javax.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; } - public TeamMembersResponse listInfo(ListInfoResponse listInfo) { + public TeamMembersResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +112,11 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamMembersResponse warnings(List warnings) { + public TeamMembersResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +142,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java index cb5041a62..9c8125e4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamParentResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TeamParentResponse() {} @@ -55,7 +55,7 @@ public static TeamParentResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamParentResponse.class); } - public TeamParentResponse teamId(String teamId) { + public TeamParentResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -73,11 +73,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamParentResponse name(String name) { + public TeamParentResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -95,7 +95,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java index 1dd8dc7d3..f78b47e7b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java @@ -35,33 +35,33 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamRemoveMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS = "new_owner_email_address"; - private String newOwnerEmailAddress; + @javax.annotation.Nullable private String newOwnerEmailAddress; public static final String JSON_PROPERTY_NEW_TEAM_ID = "new_team_id"; - private String newTeamId; + @javax.annotation.Nullable private String newTeamId; /** * A new role member will take in a new Team. **NOTE:** This parameter is used only if * `new_team_id` is provided. */ public enum NewRoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -91,7 +91,7 @@ public static NewRoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_NEW_ROLE = "new_role"; - private NewRoleEnum newRole; + @javax.annotation.Nullable private NewRoleEnum newRole; public TeamRemoveMemberRequest() {} @@ -110,7 +110,7 @@ public static TeamRemoveMemberRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TeamRemoveMemberRequest.class); } - public TeamRemoveMemberRequest accountId(String accountId) { + public TeamRemoveMemberRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -129,11 +129,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamRemoveMemberRequest emailAddress(String emailAddress) { + public TeamRemoveMemberRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -152,11 +152,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamRemoveMemberRequest newOwnerEmailAddress(String newOwnerEmailAddress) { + public TeamRemoveMemberRequest newOwnerEmailAddress( + @javax.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; return this; } @@ -177,11 +178,11 @@ public String getNewOwnerEmailAddress() { @JsonProperty(JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewOwnerEmailAddress(String newOwnerEmailAddress) { + public void setNewOwnerEmailAddress(@javax.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; } - public TeamRemoveMemberRequest newTeamId(String newTeamId) { + public TeamRemoveMemberRequest newTeamId(@javax.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; return this; } @@ -199,11 +200,11 @@ public String getNewTeamId() { @JsonProperty(JSON_PROPERTY_NEW_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewTeamId(String newTeamId) { + public void setNewTeamId(@javax.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; } - public TeamRemoveMemberRequest newRole(NewRoleEnum newRole) { + public TeamRemoveMemberRequest newRole(@javax.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; return this; } @@ -222,7 +223,7 @@ public NewRoleEnum getNewRole() { @JsonProperty(JSON_PROPERTY_NEW_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewRole(NewRoleEnum newRole) { + public void setNewRole(@javax.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java index 2abc906c6..6fcc0fd87 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -34,20 +34,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamResponse { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; - private List invitedAccounts = null; + @javax.annotation.Nullable private List invitedAccounts = null; public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; - private List invitedEmails = null; + @javax.annotation.Nullable private List invitedEmails = null; public TeamResponse() {} @@ -65,7 +65,7 @@ public static TeamResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamResponse.class); } - public TeamResponse name(String name) { + public TeamResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -83,11 +83,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TeamResponse accounts(List accounts) { + public TeamResponse accounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -113,11 +113,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } - public TeamResponse invitedAccounts(List invitedAccounts) { + public TeamResponse invitedAccounts( + @javax.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; return this; } @@ -144,11 +145,12 @@ public List getInvitedAccounts() { @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedAccounts(List invitedAccounts) { + public void setInvitedAccounts( + @javax.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; } - public TeamResponse invitedEmails(List invitedEmails) { + public TeamResponse invitedEmails(@javax.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; return this; } @@ -175,7 +177,7 @@ public List getInvitedEmails() { @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedEmails(List invitedEmails) { + public void setInvitedEmails(@javax.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java index 5ccab5b01..c0570de58 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamSubTeamsResponse { public static final String JSON_PROPERTY_SUB_TEAMS = "sub_teams"; - private List subTeams = new ArrayList<>(); + @javax.annotation.Nonnull private List subTeams = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamSubTeamsResponse() {} @@ -61,7 +61,7 @@ public static TeamSubTeamsResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamSubTeamsResponse.class); } - public TeamSubTeamsResponse subTeams(List subTeams) { + public TeamSubTeamsResponse subTeams(@javax.annotation.Nonnull List subTeams) { this.subTeams = subTeams; return this; } @@ -88,11 +88,11 @@ public List getSubTeams() { @JsonProperty(JSON_PROPERTY_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSubTeams(List subTeams) { + public void setSubTeams(@javax.annotation.Nonnull List subTeams) { this.subTeams = subTeams; } - public TeamSubTeamsResponse listInfo(ListInfoResponse listInfo) { + public TeamSubTeamsResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +111,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamSubTeamsResponse warnings(List warnings) { + public TeamSubTeamsResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +142,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java index c6a8f944a..91242a042 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TeamUpdateRequest.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamUpdateRequest { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TeamUpdateRequest() {} @@ -49,7 +49,7 @@ public static TeamUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamUpdateRequest.class); } - public TeamUpdateRequest name(String name) { + public TeamUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -67,7 +67,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java index c52f0700f..ea66fbbd0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java @@ -31,17 +31,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateAddUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_SKIP_NOTIFICATION = "skip_notification"; - private Boolean skipNotification = false; + @javax.annotation.Nullable private Boolean skipNotification = false; public TemplateAddUserRequest() {} @@ -60,7 +60,7 @@ public static TemplateAddUserRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateAddUserRequest.class); } - public TemplateAddUserRequest accountId(String accountId) { + public TemplateAddUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -79,11 +79,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateAddUserRequest emailAddress(String emailAddress) { + public TemplateAddUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -102,11 +102,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateAddUserRequest skipNotification(Boolean skipNotification) { + public TemplateAddUserRequest skipNotification( + @javax.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; return this; } @@ -125,7 +126,7 @@ public Boolean getSkipNotification() { @JsonProperty(JSON_PROPERTY_SKIP_NOTIFICATION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipNotification(Boolean skipNotification) { + public void setSkipNotification(@javax.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java index 95632844c..0061bf657 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java @@ -56,83 +56,84 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; + @javax.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; + @javax.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateEmbeddedDraftRequest() {} @@ -152,7 +153,7 @@ public static TemplateCreateEmbeddedDraftRequest init(HashMap data) throws Excep TemplateCreateEmbeddedDraftRequest.class); } - public TemplateCreateEmbeddedDraftRequest clientId(String clientId) { + public TemplateCreateEmbeddedDraftRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -172,11 +173,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public TemplateCreateEmbeddedDraftRequest files(List files) { + public TemplateCreateEmbeddedDraftRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -203,11 +204,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateCreateEmbeddedDraftRequest fileUrls(List fileUrls) { + public TemplateCreateEmbeddedDraftRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -234,11 +236,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateEmbeddedDraftRequest allowCcs(Boolean allowCcs) { + public TemplateCreateEmbeddedDraftRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -257,11 +260,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public TemplateCreateEmbeddedDraftRequest allowReassign(Boolean allowReassign) { + public TemplateCreateEmbeddedDraftRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -281,11 +285,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateEmbeddedDraftRequest attachments(List attachments) { + public TemplateCreateEmbeddedDraftRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -311,11 +316,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateEmbeddedDraftRequest ccRoles(List ccRoles) { + public TemplateCreateEmbeddedDraftRequest ccRoles( + @javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -341,11 +347,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateEmbeddedDraftRequest editorOptions(SubEditorOptions editorOptions) { + public TemplateCreateEmbeddedDraftRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -363,11 +370,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public TemplateCreateEmbeddedDraftRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateEmbeddedDraftRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -385,11 +393,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateEmbeddedDraftRequest forceSignerRoles(Boolean forceSignerRoles) { + public TemplateCreateEmbeddedDraftRequest forceSignerRoles( + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -407,11 +416,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public TemplateCreateEmbeddedDraftRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public TemplateCreateEmbeddedDraftRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -429,12 +439,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } public TemplateCreateEmbeddedDraftRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -464,12 +474,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public TemplateCreateEmbeddedDraftRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -496,12 +507,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public TemplateCreateEmbeddedDraftRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -543,11 +555,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateEmbeddedDraftRequest mergeFields(List mergeFields) { + public TemplateCreateEmbeddedDraftRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -576,11 +590,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateEmbeddedDraftRequest message(String message) { + public TemplateCreateEmbeddedDraftRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -598,11 +612,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateCreateEmbeddedDraftRequest metadata(Map metadata) { + public TemplateCreateEmbeddedDraftRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -632,11 +647,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateEmbeddedDraftRequest showPreview(Boolean showPreview) { + public TemplateCreateEmbeddedDraftRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -657,11 +673,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public TemplateCreateEmbeddedDraftRequest showProgressStepper(Boolean showProgressStepper) { + public TemplateCreateEmbeddedDraftRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -680,11 +697,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public TemplateCreateEmbeddedDraftRequest signerRoles(List signerRoles) { + public TemplateCreateEmbeddedDraftRequest signerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -711,11 +729,12 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateEmbeddedDraftRequest skipMeNow(Boolean skipMeNow) { + public TemplateCreateEmbeddedDraftRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -734,11 +753,11 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public TemplateCreateEmbeddedDraftRequest subject(String subject) { + public TemplateCreateEmbeddedDraftRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -756,11 +775,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateEmbeddedDraftRequest testMode(Boolean testMode) { + public TemplateCreateEmbeddedDraftRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -779,11 +799,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateEmbeddedDraftRequest title(String title) { + public TemplateCreateEmbeddedDraftRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -801,11 +821,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateCreateEmbeddedDraftRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateEmbeddedDraftRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -825,7 +846,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java index 21f1d7d65..d9ab41602 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateEmbeddedDraftResponseTemplate template; + @javax.annotation.Nonnull private TemplateCreateEmbeddedDraftResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponse() {} @@ -60,7 +60,7 @@ public static TemplateCreateEmbeddedDraftResponse init(HashMap data) throws Exce } public TemplateCreateEmbeddedDraftResponse template( - TemplateCreateEmbeddedDraftResponseTemplate template) { + @javax.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; return this; } @@ -79,11 +79,13 @@ public TemplateCreateEmbeddedDraftResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateEmbeddedDraftResponseTemplate template) { + public void setTemplate( + @javax.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; } - public TemplateCreateEmbeddedDraftResponse warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -109,7 +111,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java index 7e2fc0bc4..1f11a454b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java @@ -37,20 +37,20 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; + @javax.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; + @Deprecated @javax.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponseTemplate() {} @@ -72,7 +72,8 @@ public static TemplateCreateEmbeddedDraftResponseTemplate init(HashMap data) thr TemplateCreateEmbeddedDraftResponseTemplate.class); } - public TemplateCreateEmbeddedDraftResponseTemplate templateId(String templateId) { + public TemplateCreateEmbeddedDraftResponseTemplate templateId( + @javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -90,11 +91,12 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateCreateEmbeddedDraftResponseTemplate editUrl(String editUrl) { + public TemplateCreateEmbeddedDraftResponseTemplate editUrl( + @javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -112,11 +114,12 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public TemplateCreateEmbeddedDraftResponseTemplate expiresAt(Integer expiresAt) { + public TemplateCreateEmbeddedDraftResponseTemplate expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -134,12 +137,13 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } @Deprecated - public TemplateCreateEmbeddedDraftResponseTemplate warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponseTemplate warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -169,7 +173,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java index 9a554ed65..8e3815a5b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java @@ -49,62 +49,64 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateRequest { public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + + @javax.annotation.Nonnull private List formFieldsPerDocument = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = new ArrayList<>(); + @javax.annotation.Nonnull private List signerRoles = new ArrayList<>(); public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateRequest() {} @@ -124,7 +126,7 @@ public static TemplateCreateRequest init(HashMap data) throws Exception { } public TemplateCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -167,11 +169,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateRequest signerRoles(List signerRoles) { + public TemplateCreateRequest signerRoles( + @javax.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -199,11 +203,11 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@javax.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateRequest files(List files) { + public TemplateCreateRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -230,11 +234,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateCreateRequest fileUrls(List fileUrls) { + public TemplateCreateRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -261,11 +265,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateRequest allowReassign(Boolean allowReassign) { + public TemplateCreateRequest allowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -285,11 +289,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateRequest attachments(List attachments) { + public TemplateCreateRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -315,11 +320,11 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateRequest ccRoles(List ccRoles) { + public TemplateCreateRequest ccRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -345,11 +350,11 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateRequest clientId(String clientId) { + public TemplateCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -368,11 +373,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -390,11 +396,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateRequest formFieldGroups(List formFieldGroups) { + public TemplateCreateRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -423,11 +430,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public TemplateCreateRequest formFieldRules(List formFieldRules) { + public TemplateCreateRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -453,11 +462,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public TemplateCreateRequest mergeFields(List mergeFields) { + public TemplateCreateRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -486,11 +497,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateRequest message(String message) { + public TemplateCreateRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -508,11 +519,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateCreateRequest metadata(Map metadata) { + public TemplateCreateRequest metadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -542,11 +553,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateRequest subject(String subject) { + public TemplateCreateRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -564,11 +575,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateRequest testMode(Boolean testMode) { + public TemplateCreateRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -587,11 +598,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateRequest title(String title) { + public TemplateCreateRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -609,11 +620,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -633,7 +645,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java index 3c228e89c..511bb2391 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateResponseTemplate template; + @javax.annotation.Nonnull private TemplateCreateResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateCreateResponse() {} @@ -58,7 +58,8 @@ public static TemplateCreateResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateCreateResponse.class); } - public TemplateCreateResponse template(TemplateCreateResponseTemplate template) { + public TemplateCreateResponse template( + @javax.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; return this; } @@ -77,11 +78,12 @@ public TemplateCreateResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateResponseTemplate template) { + public void setTemplate(@javax.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; } - public TemplateCreateResponse warnings(List warnings) { + public TemplateCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java index 017ed6e40..5368e41b3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TemplateCreateResponseTemplate.JSON_PROPERTY_TEMPLATE_ID}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public TemplateCreateResponseTemplate() {} @@ -51,7 +51,7 @@ public static TemplateCreateResponseTemplate init(HashMap data) throws Exception TemplateCreateResponseTemplate.class); } - public TemplateCreateResponseTemplate templateId(String templateId) { + public TemplateCreateResponseTemplate templateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -69,7 +69,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java index 65be6fd0b..095b796a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TemplateEditResponse.JSON_PROPERTY_TEMPLATE_ID}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateEditResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nonnull private String templateId; public TemplateEditResponse() {} @@ -49,7 +49,7 @@ public static TemplateEditResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateEditResponse.class); } - public TemplateEditResponse templateId(String templateId) { + public TemplateEditResponse templateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; return this; } @@ -68,7 +68,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java index 1c4f53d6b..f1e79244d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateGetResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; + @javax.annotation.Nonnull private TemplateResponse template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateGetResponse() {} @@ -57,7 +57,7 @@ public static TemplateGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateGetResponse.class); } - public TemplateGetResponse template(TemplateResponse template) { + public TemplateGetResponse template(@javax.annotation.Nonnull TemplateResponse template) { this.template = template; return this; } @@ -76,11 +76,11 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@javax.annotation.Nonnull TemplateResponse template) { this.template = template; } - public TemplateGetResponse warnings(List warnings) { + public TemplateGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java index 70385b00c..624836a79 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java @@ -33,17 +33,17 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateListResponse { public static final String JSON_PROPERTY_TEMPLATES = "templates"; - private List templates = new ArrayList<>(); + @javax.annotation.Nonnull private List templates = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateListResponse() {} @@ -61,7 +61,8 @@ public static TemplateListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateListResponse.class); } - public TemplateListResponse templates(List templates) { + public TemplateListResponse templates( + @javax.annotation.Nonnull List templates) { this.templates = templates; return this; } @@ -88,11 +89,11 @@ public List getTemplates() { @JsonProperty(JSON_PROPERTY_TEMPLATES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplates(List templates) { + public void setTemplates(@javax.annotation.Nonnull List templates) { this.templates = templates; } - public TemplateListResponse listInfo(ListInfoResponse listInfo) { + public TemplateListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +112,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TemplateListResponse warnings(List warnings) { + public TemplateListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +143,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java index 28d04e064..401a1a8d8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateRemoveUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public TemplateRemoveUserRequest() {} @@ -57,7 +57,7 @@ public static TemplateRemoveUserRequest init(HashMap data) throws Exception { TemplateRemoveUserRequest.class); } - public TemplateRemoveUserRequest accountId(String accountId) { + public TemplateRemoveUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -76,11 +76,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateRemoveUserRequest emailAddress(String emailAddress) { + public TemplateRemoveUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -99,7 +99,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java index fde4151d3..794722520 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java @@ -46,56 +46,58 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; + @javax.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_IS_EMBEDDED = "is_embedded"; - private Boolean isEmbedded; + @javax.annotation.Nullable private Boolean isEmbedded; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; + @javax.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CAN_EDIT = "can_edit"; - private Boolean canEdit; + @javax.annotation.Nullable private Boolean canEdit; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; + @javax.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_DOCUMENTS = "documents"; - private List documents = null; + @javax.annotation.Nullable private List documents = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - @Deprecated private List customFields = null; + + @Deprecated @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_NAMED_FORM_FIELDS = "named_form_fields"; - @Deprecated private List namedFormFields = null; + + @Deprecated @javax.annotation.Nullable private List namedFormFields = null; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public TemplateResponse() {} @@ -113,7 +115,7 @@ public static TemplateResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateResponse.class); } - public TemplateResponse templateId(String templateId) { + public TemplateResponse templateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -131,11 +133,11 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateResponse title(String title) { + public TemplateResponse title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -155,11 +157,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateResponse message(String message) { + public TemplateResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -178,11 +180,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateResponse updatedAt(Integer updatedAt) { + public TemplateResponse updatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -200,11 +202,11 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public TemplateResponse isEmbedded(Boolean isEmbedded) { + public TemplateResponse isEmbedded(@javax.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; return this; } @@ -224,11 +226,11 @@ public Boolean getIsEmbedded() { @JsonProperty(JSON_PROPERTY_IS_EMBEDDED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEmbedded(Boolean isEmbedded) { + public void setIsEmbedded(@javax.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; } - public TemplateResponse isCreator(Boolean isCreator) { + public TemplateResponse isCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -247,11 +249,11 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public TemplateResponse canEdit(Boolean canEdit) { + public TemplateResponse canEdit(@javax.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; return this; } @@ -270,11 +272,11 @@ public Boolean getCanEdit() { @JsonProperty(JSON_PROPERTY_CAN_EDIT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanEdit(Boolean canEdit) { + public void setCanEdit(@javax.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; } - public TemplateResponse isLocked(Boolean isLocked) { + public TemplateResponse isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -294,11 +296,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponse metadata(Map metadata) { + public TemplateResponse metadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -324,11 +326,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateResponse signerRoles(List signerRoles) { + public TemplateResponse signerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -355,11 +358,13 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateResponse ccRoles(List ccRoles) { + public TemplateResponse ccRoles( + @javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -386,11 +391,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateResponse documents(List documents) { + public TemplateResponse documents( + @javax.annotation.Nullable List documents) { this.documents = documents; return this; } @@ -417,13 +423,13 @@ public List getDocuments() { @JsonProperty(JSON_PROPERTY_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocuments(List documents) { + public void setDocuments(@javax.annotation.Nullable List documents) { this.documents = documents; } @Deprecated public TemplateResponse customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -455,13 +461,14 @@ public List getCustomFields() { @Deprecated @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } @Deprecated public TemplateResponse namedFormFields( - List namedFormFields) { + @javax.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; return this; } @@ -493,11 +500,13 @@ public List getNamedFormFields() { @Deprecated @JsonProperty(JSON_PROPERTY_NAMED_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamedFormFields(List namedFormFields) { + public void setNamedFormFields( + @javax.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; } - public TemplateResponse accounts(List accounts) { + public TemplateResponse accounts( + @javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -523,11 +532,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } - public TemplateResponse attachments(List attachments) { + public TemplateResponse attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -553,7 +563,8 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java index 901e4be34..1f8cdbab4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java @@ -34,26 +34,26 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; + @javax.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; + @javax.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private TemplateResponseAccountQuota quotas; + @javax.annotation.Nullable private TemplateResponseAccountQuota quotas; public TemplateResponseAccount() {} @@ -72,7 +72,7 @@ public static TemplateResponseAccount init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateResponseAccount.class); } - public TemplateResponseAccount accountId(String accountId) { + public TemplateResponseAccount accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -90,11 +90,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateResponseAccount emailAddress(String emailAddress) { + public TemplateResponseAccount emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -112,11 +112,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateResponseAccount isLocked(Boolean isLocked) { + public TemplateResponseAccount isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -134,11 +134,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponseAccount isPaidHs(Boolean isPaidHs) { + public TemplateResponseAccount isPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -156,11 +156,11 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public TemplateResponseAccount isPaidHf(Boolean isPaidHf) { + public TemplateResponseAccount isPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -178,11 +178,12 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public TemplateResponseAccount quotas(TemplateResponseAccountQuota quotas) { + public TemplateResponseAccount quotas( + @javax.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; return this; } @@ -200,7 +201,7 @@ public TemplateResponseAccountQuota getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(TemplateResponseAccountQuota quotas) { + public void setQuotas(@javax.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java index 0ebdbe2a4..edad6110e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java @@ -35,21 +35,21 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccountQuota { public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; + @javax.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; + @javax.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; + @javax.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; + @javax.annotation.Nullable private Integer smsVerificationsLeft; public TemplateResponseAccountQuota() {} @@ -69,7 +69,8 @@ public static TemplateResponseAccountQuota init(HashMap data) throws Exception { TemplateResponseAccountQuota.class); } - public TemplateResponseAccountQuota templatesLeft(Integer templatesLeft) { + public TemplateResponseAccountQuota templatesLeft( + @javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -87,11 +88,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public TemplateResponseAccountQuota apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public TemplateResponseAccountQuota apiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -109,11 +111,13 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public TemplateResponseAccountQuota documentsLeft(Integer documentsLeft) { + public TemplateResponseAccountQuota documentsLeft( + @javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -131,11 +135,12 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public TemplateResponseAccountQuota smsVerificationsLeft(Integer smsVerificationsLeft) { + public TemplateResponseAccountQuota smsVerificationsLeft( + @javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -153,7 +158,7 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java index e4a7d7377..00f72e343 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TemplateResponseCCRole.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseCCRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TemplateResponseCCRole() {} @@ -50,7 +50,7 @@ public static TemplateResponseCCRole init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateResponseCCRole.class); } - public TemplateResponseCCRole name(String name) { + public TemplateResponseCCRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -68,7 +68,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java index de32fb5ac..3cabbf112 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java @@ -36,26 +36,29 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocument { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_INDEX = "index"; - private Integer index; + @javax.annotation.Nullable private Integer index; public static final String JSON_PROPERTY_FIELD_GROUPS = "field_groups"; - private List fieldGroups = null; + @javax.annotation.Nullable private List fieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; - private List formFields = null; + + @javax.annotation.Nullable private List formFields = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_STATIC_FIELDS = "static_fields"; - private List staticFields = null; + + @javax.annotation.Nullable private List staticFields = null; public TemplateResponseDocument() {} @@ -75,7 +78,7 @@ public static TemplateResponseDocument init(HashMap data) throws Exception { TemplateResponseDocument.class); } - public TemplateResponseDocument name(String name) { + public TemplateResponseDocument name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -93,11 +96,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocument index(Integer index) { + public TemplateResponseDocument index(@javax.annotation.Nullable Integer index) { this.index = index; return this; } @@ -116,12 +119,12 @@ public Integer getIndex() { @JsonProperty(JSON_PROPERTY_INDEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndex(Integer index) { + public void setIndex(@javax.annotation.Nullable Integer index) { this.index = index; } public TemplateResponseDocument fieldGroups( - List fieldGroups) { + @javax.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; return this; } @@ -148,12 +151,13 @@ public List getFieldGroups() { @JsonProperty(JSON_PROPERTY_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldGroups(List fieldGroups) { + public void setFieldGroups( + @javax.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; } public TemplateResponseDocument formFields( - List formFields) { + @javax.annotation.Nullable List formFields) { this.formFields = formFields; return this; } @@ -180,12 +184,13 @@ public List getFormFields() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFields(List formFields) { + public void setFormFields( + @javax.annotation.Nullable List formFields) { this.formFields = formFields; } public TemplateResponseDocument customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -212,12 +217,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public TemplateResponseDocument staticFields( - List staticFields) { + @javax.annotation.Nullable List staticFields) { this.staticFields = staticFields; return this; } @@ -245,7 +251,8 @@ public List getStaticFields() { @JsonProperty(JSON_PROPERTY_STATIC_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStaticFields(List staticFields) { + public void setStaticFields( + @javax.annotation.Nullable List staticFields) { this.staticFields = staticFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java index d6c0d010c..f1190eac4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java @@ -40,7 +40,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -57,34 +57,34 @@ }) public class TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentCustomFieldBase() {} @@ -105,7 +105,7 @@ public static TemplateResponseDocumentCustomFieldBase init(HashMap data) throws TemplateResponseDocumentCustomFieldBase.class); } - public TemplateResponseDocumentCustomFieldBase type(String type) { + public TemplateResponseDocumentCustomFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -124,11 +124,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentCustomFieldBase apiId(String apiId) { + public TemplateResponseDocumentCustomFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -146,11 +146,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentCustomFieldBase name(String name) { + public TemplateResponseDocumentCustomFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -168,11 +168,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentCustomFieldBase signer(String signer) { + public TemplateResponseDocumentCustomFieldBase signer( + @javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -196,7 +197,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } @@ -204,7 +205,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public TemplateResponseDocumentCustomFieldBase x(Integer x) { + public TemplateResponseDocumentCustomFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -222,11 +223,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentCustomFieldBase y(Integer y) { + public TemplateResponseDocumentCustomFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -244,11 +245,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentCustomFieldBase width(Integer width) { + public TemplateResponseDocumentCustomFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -266,11 +267,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentCustomFieldBase height(Integer height) { + public TemplateResponseDocumentCustomFieldBase height( + @javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -288,11 +290,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentCustomFieldBase required(Boolean required) { + public TemplateResponseDocumentCustomFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -310,11 +313,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentCustomFieldBase group(String group) { + public TemplateResponseDocumentCustomFieldBase group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -333,7 +336,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java index b11eca50b..ffde88fb2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentCustomFieldCheckbox.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentCustomFieldCheckbox() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentCustomFieldCheckbox init(HashMap data) thr TemplateResponseDocumentCustomFieldCheckbox.class); } - public TemplateResponseDocumentCustomFieldCheckbox type(String type) { + public TemplateResponseDocumentCustomFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -83,7 +83,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java index e915dc017..1540bbba5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -46,19 +46,19 @@ public class TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; public TemplateResponseDocumentCustomFieldText() {} @@ -79,7 +79,7 @@ public static TemplateResponseDocumentCustomFieldText init(HashMap data) throws TemplateResponseDocumentCustomFieldText.class); } - public TemplateResponseDocumentCustomFieldText type(String type) { + public TemplateResponseDocumentCustomFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -100,12 +100,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentCustomFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -123,11 +123,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentCustomFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentCustomFieldText isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -145,11 +147,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentCustomFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentCustomFieldText originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -167,11 +170,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentCustomFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentCustomFieldText fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -189,7 +193,7 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java index 27dd50e83..d7e2969d5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroup { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_RULE = "rule"; - private TemplateResponseDocumentFieldGroupRule rule; + @javax.annotation.Nullable private TemplateResponseDocumentFieldGroupRule rule; public TemplateResponseDocumentFieldGroup() {} @@ -57,7 +57,7 @@ public static TemplateResponseDocumentFieldGroup init(HashMap data) throws Excep TemplateResponseDocumentFieldGroup.class); } - public TemplateResponseDocumentFieldGroup name(String name) { + public TemplateResponseDocumentFieldGroup name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -75,11 +75,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFieldGroup rule(TemplateResponseDocumentFieldGroupRule rule) { + public TemplateResponseDocumentFieldGroup rule( + @javax.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; return this; } @@ -97,7 +98,7 @@ public TemplateResponseDocumentFieldGroupRule getRule() { @JsonProperty(JSON_PROPERTY_RULE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRule(TemplateResponseDocumentFieldGroupRule rule) { + public void setRule(@javax.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java index 0fa796c46..ea499db4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java @@ -33,14 +33,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroupRule { public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; + @javax.annotation.Nullable private String requirement; public static final String JSON_PROPERTY_GROUP_LABEL = "groupLabel"; - private String groupLabel; + @javax.annotation.Nullable private String groupLabel; public TemplateResponseDocumentFieldGroupRule() {} @@ -60,7 +60,8 @@ public static TemplateResponseDocumentFieldGroupRule init(HashMap data) throws E TemplateResponseDocumentFieldGroupRule.class); } - public TemplateResponseDocumentFieldGroupRule requirement(String requirement) { + public TemplateResponseDocumentFieldGroupRule requirement( + @javax.annotation.Nullable String requirement) { this.requirement = requirement; return this; } @@ -83,11 +84,12 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequirement(String requirement) { + public void setRequirement(@javax.annotation.Nullable String requirement) { this.requirement = requirement; } - public TemplateResponseDocumentFieldGroupRule groupLabel(String groupLabel) { + public TemplateResponseDocumentFieldGroupRule groupLabel( + @javax.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -105,7 +107,7 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@javax.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java index 36940640a..9ab25a45b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -66,31 +66,31 @@ }) public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public TemplateResponseDocumentFormFieldBase() {} @@ -110,7 +110,7 @@ public static TemplateResponseDocumentFormFieldBase init(HashMap data) throws Ex TemplateResponseDocumentFormFieldBase.class); } - public TemplateResponseDocumentFormFieldBase type(String type) { + public TemplateResponseDocumentFormFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -129,11 +129,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldBase apiId(String apiId) { + public TemplateResponseDocumentFormFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -151,11 +151,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentFormFieldBase name(String name) { + public TemplateResponseDocumentFormFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -173,11 +173,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFormFieldBase signer(String signer) { + public TemplateResponseDocumentFormFieldBase signer(@javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -200,7 +200,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } @@ -208,7 +208,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public TemplateResponseDocumentFormFieldBase x(Integer x) { + public TemplateResponseDocumentFormFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -226,11 +226,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentFormFieldBase y(Integer y) { + public TemplateResponseDocumentFormFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -248,11 +248,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentFormFieldBase width(Integer width) { + public TemplateResponseDocumentFormFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -270,11 +270,11 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentFormFieldBase height(Integer height) { + public TemplateResponseDocumentFormFieldBase height(@javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -292,11 +292,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentFormFieldBase required(Boolean required) { + public TemplateResponseDocumentFormFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -314,7 +315,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java index b291ffdd8..2e7cc69cf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldCheckbox() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldCheckbox init(HashMap data) throw TemplateResponseDocumentFormFieldCheckbox.class); } - public TemplateResponseDocumentFormFieldCheckbox type(String type) { + public TemplateResponseDocumentFormFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldCheckbox group(String group) { + public TemplateResponseDocumentFormFieldCheckbox group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java index b43906f05..80cfc712f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDateSigned() {} @@ -68,7 +68,7 @@ public static TemplateResponseDocumentFormFieldDateSigned init(HashMap data) thr TemplateResponseDocumentFormFieldDateSigned.class); } - public TemplateResponseDocumentFormFieldDateSigned type(String type) { + public TemplateResponseDocumentFormFieldDateSigned type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -95,11 +95,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDateSigned group(String group) { + public TemplateResponseDocumentFormFieldDateSigned group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -118,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 1c6289c42..109b3413f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDropdown() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldDropdown init(HashMap data) throw TemplateResponseDocumentFormFieldDropdown.class); } - public TemplateResponseDocumentFormFieldDropdown type(String type) { + public TemplateResponseDocumentFormFieldDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDropdown group(String group) { + public TemplateResponseDocumentFormFieldDropdown group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java index b2af4e8f9..d1d89de56 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -47,22 +47,22 @@ public class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldHyperlink() {} @@ -84,7 +84,7 @@ public static TemplateResponseDocumentFormFieldHyperlink init(HashMap data) thro TemplateResponseDocumentFormFieldHyperlink.class); } - public TemplateResponseDocumentFormFieldHyperlink type(String type) { + public TemplateResponseDocumentFormFieldHyperlink type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -111,12 +111,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentFormFieldHyperlink avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -134,11 +134,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldHyperlink isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldHyperlink isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -156,11 +158,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldHyperlink originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldHyperlink originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -178,11 +181,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldHyperlink fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldHyperlink fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -200,11 +204,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldHyperlink group(String group) { + public TemplateResponseDocumentFormFieldHyperlink group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -223,7 +228,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java index 17bc3553e..6e0f78592 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldInitials() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldInitials init(HashMap data) throw TemplateResponseDocumentFormFieldInitials.class); } - public TemplateResponseDocumentFormFieldInitials type(String type) { + public TemplateResponseDocumentFormFieldInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldInitials group(String group) { + public TemplateResponseDocumentFormFieldInitials group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java index 75b7a72ad..0ff1b8a4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -42,10 +42,10 @@ visible = true) public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public TemplateResponseDocumentFormFieldRadio() {} @@ -65,7 +65,7 @@ public static TemplateResponseDocumentFormFieldRadio init(HashMap data) throws E TemplateResponseDocumentFormFieldRadio.class); } - public TemplateResponseDocumentFormFieldRadio type(String type) { + public TemplateResponseDocumentFormFieldRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,11 +92,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldRadio group(String group) { + public TemplateResponseDocumentFormFieldRadio group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -116,7 +116,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java index 15630a485..53e1b3776 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldSignature() {} @@ -68,7 +68,7 @@ public static TemplateResponseDocumentFormFieldSignature init(HashMap data) thro TemplateResponseDocumentFormFieldSignature.class); } - public TemplateResponseDocumentFormFieldSignature type(String type) { + public TemplateResponseDocumentFormFieldSignature type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -95,11 +95,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldSignature group(String group) { + public TemplateResponseDocumentFormFieldSignature group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -118,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java index dbb22a6d1..353bd8941 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -49,19 +49,19 @@ visible = true) public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; /** * Each text field may contain a `validation_type` parameter. Check out the list of @@ -69,25 +69,25 @@ public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocum * the possible values. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -117,10 +117,10 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; + @javax.annotation.Nullable private ValidationTypeEnum validationType; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldText() {} @@ -140,7 +140,7 @@ public static TemplateResponseDocumentFormFieldText init(HashMap data) throws Ex TemplateResponseDocumentFormFieldText.class); } - public TemplateResponseDocumentFormFieldText type(String type) { + public TemplateResponseDocumentFormFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -167,12 +167,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentFormFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -190,11 +190,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldText isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -212,11 +214,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldText originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -234,11 +237,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldText fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -256,11 +260,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldText validationType(ValidationTypeEnum validationType) { + public TemplateResponseDocumentFormFieldText validationType( + @javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -280,11 +285,11 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public TemplateResponseDocumentFormFieldText group(String group) { + public TemplateResponseDocumentFormFieldText group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -303,7 +308,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java index 164ee218b..6a2ae2ce6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java @@ -42,7 +42,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -75,34 +75,34 @@ }) public class TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer = "me_now"; + @javax.annotation.Nullable private String signer = "me_now"; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentStaticFieldBase() {} @@ -123,7 +123,7 @@ public static TemplateResponseDocumentStaticFieldBase init(HashMap data) throws TemplateResponseDocumentStaticFieldBase.class); } - public TemplateResponseDocumentStaticFieldBase type(String type) { + public TemplateResponseDocumentStaticFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -142,11 +142,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentStaticFieldBase apiId(String apiId) { + public TemplateResponseDocumentStaticFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -164,11 +164,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentStaticFieldBase name(String name) { + public TemplateResponseDocumentStaticFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -186,11 +186,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentStaticFieldBase signer(String signer) { + public TemplateResponseDocumentStaticFieldBase signer( + @javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -208,11 +209,11 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } - public TemplateResponseDocumentStaticFieldBase x(Integer x) { + public TemplateResponseDocumentStaticFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -230,11 +231,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentStaticFieldBase y(Integer y) { + public TemplateResponseDocumentStaticFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -252,11 +253,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentStaticFieldBase width(Integer width) { + public TemplateResponseDocumentStaticFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -274,11 +275,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentStaticFieldBase height(Integer height) { + public TemplateResponseDocumentStaticFieldBase height( + @javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -296,11 +298,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentStaticFieldBase required(Boolean required) { + public TemplateResponseDocumentStaticFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -318,11 +321,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentStaticFieldBase group(String group) { + public TemplateResponseDocumentStaticFieldBase group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -341,7 +344,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java index 774abc3a2..97294dd19 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldCheckbox.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentStaticFieldCheckbox() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldCheckbox init(HashMap data) thr TemplateResponseDocumentStaticFieldCheckbox.class); } - public TemplateResponseDocumentStaticFieldCheckbox type(String type) { + public TemplateResponseDocumentStaticFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java index d0674f84a..3a42fbb7b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldDateSigned.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; public TemplateResponseDocumentStaticFieldDateSigned() {} @@ -63,7 +63,8 @@ public static TemplateResponseDocumentStaticFieldDateSigned init(HashMap data) TemplateResponseDocumentStaticFieldDateSigned.class); } - public TemplateResponseDocumentStaticFieldDateSigned type(String type) { + public TemplateResponseDocumentStaticFieldDateSigned type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -90,7 +91,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java index 343de411d..ba9fc8e2d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldDropdown.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public TemplateResponseDocumentStaticFieldDropdown() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldDropdown init(HashMap data) thr TemplateResponseDocumentStaticFieldDropdown.class); } - public TemplateResponseDocumentStaticFieldDropdown type(String type) { + public TemplateResponseDocumentStaticFieldDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java index 15267904e..29052c92c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldHyperlink.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public TemplateResponseDocumentStaticFieldHyperlink() {} @@ -62,7 +62,8 @@ public static TemplateResponseDocumentStaticFieldHyperlink init(HashMap data) th TemplateResponseDocumentStaticFieldHyperlink.class); } - public TemplateResponseDocumentStaticFieldHyperlink type(String type) { + public TemplateResponseDocumentStaticFieldHyperlink type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +90,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java index 01f42023a..bd5c5f0e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldInitials.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public TemplateResponseDocumentStaticFieldInitials() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldInitials init(HashMap data) thr TemplateResponseDocumentStaticFieldInitials.class); } - public TemplateResponseDocumentStaticFieldInitials type(String type) { + public TemplateResponseDocumentStaticFieldInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java index c1c658d13..3b0590111 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldRadio.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public TemplateResponseDocumentStaticFieldRadio() {} @@ -61,7 +61,7 @@ public static TemplateResponseDocumentStaticFieldRadio init(HashMap data) throws TemplateResponseDocumentStaticFieldRadio.class); } - public TemplateResponseDocumentStaticFieldRadio type(String type) { + public TemplateResponseDocumentStaticFieldRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +88,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java index 3fd603737..cd319353d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldSignature.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public TemplateResponseDocumentStaticFieldSignature() {} @@ -62,7 +62,8 @@ public static TemplateResponseDocumentStaticFieldSignature init(HashMap data) th TemplateResponseDocumentStaticFieldSignature.class); } - public TemplateResponseDocumentStaticFieldSignature type(String type) { + public TemplateResponseDocumentStaticFieldSignature type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +90,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java index e8f17977b..ca3d5682c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldText.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public TemplateResponseDocumentStaticFieldText() {} @@ -61,7 +61,7 @@ public static TemplateResponseDocumentStaticFieldText init(HashMap data) throws TemplateResponseDocumentStaticFieldText.class); } - public TemplateResponseDocumentStaticFieldText type(String type) { + public TemplateResponseDocumentStaticFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +88,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java index b5a9afb52..9c0fca40a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseFieldAvgTextLength { public static final String JSON_PROPERTY_NUM_LINES = "num_lines"; - private Integer numLines; + @javax.annotation.Nullable private Integer numLines; public static final String JSON_PROPERTY_NUM_CHARS_PER_LINE = "num_chars_per_line"; - private Integer numCharsPerLine; + @javax.annotation.Nullable private Integer numCharsPerLine; public TemplateResponseFieldAvgTextLength() {} @@ -57,7 +57,8 @@ public static TemplateResponseFieldAvgTextLength init(HashMap data) throws Excep TemplateResponseFieldAvgTextLength.class); } - public TemplateResponseFieldAvgTextLength numLines(Integer numLines) { + public TemplateResponseFieldAvgTextLength numLines( + @javax.annotation.Nullable Integer numLines) { this.numLines = numLines; return this; } @@ -75,11 +76,12 @@ public Integer getNumLines() { @JsonProperty(JSON_PROPERTY_NUM_LINES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumLines(Integer numLines) { + public void setNumLines(@javax.annotation.Nullable Integer numLines) { this.numLines = numLines; } - public TemplateResponseFieldAvgTextLength numCharsPerLine(Integer numCharsPerLine) { + public TemplateResponseFieldAvgTextLength numCharsPerLine( + @javax.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; return this; } @@ -97,7 +99,7 @@ public Integer getNumCharsPerLine() { @JsonProperty(JSON_PROPERTY_NUM_CHARS_PER_LINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumCharsPerLine(Integer numCharsPerLine) { + public void setNumCharsPerLine(@javax.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java index 4724f47e5..b313ab8d8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseSignerRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public TemplateResponseSignerRole() {} @@ -57,7 +57,7 @@ public static TemplateResponseSignerRole init(HashMap data) throws Exception { TemplateResponseSignerRole.class); } - public TemplateResponseSignerRole name(String name) { + public TemplateResponseSignerRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -75,11 +75,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseSignerRole order(Integer order) { + public TemplateResponseSignerRole order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -97,7 +97,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java index 6404a95aa..d1720e7ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java @@ -37,26 +37,26 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public TemplateUpdateFilesRequest() {} @@ -76,7 +76,7 @@ public static TemplateUpdateFilesRequest init(HashMap data) throws Exception { TemplateUpdateFilesRequest.class); } - public TemplateUpdateFilesRequest clientId(String clientId) { + public TemplateUpdateFilesRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -94,11 +94,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateUpdateFilesRequest files(List files) { + public TemplateUpdateFilesRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -125,11 +125,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateUpdateFilesRequest fileUrls(List fileUrls) { + public TemplateUpdateFilesRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -156,11 +156,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateUpdateFilesRequest message(String message) { + public TemplateUpdateFilesRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -178,11 +178,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateUpdateFilesRequest subject(String subject) { + public TemplateUpdateFilesRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -200,11 +200,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateUpdateFilesRequest testMode(Boolean testMode) { + public TemplateUpdateFilesRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -223,7 +223,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java index 396c7548f..be84c8a80 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java @@ -27,11 +27,11 @@ @JsonPropertyOrder({TemplateUpdateFilesResponse.JSON_PROPERTY_TEMPLATE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateUpdateFilesResponseTemplate template; + @javax.annotation.Nonnull private TemplateUpdateFilesResponseTemplate template; public TemplateUpdateFilesResponse() {} @@ -51,7 +51,8 @@ public static TemplateUpdateFilesResponse init(HashMap data) throws Exception { TemplateUpdateFilesResponse.class); } - public TemplateUpdateFilesResponse template(TemplateUpdateFilesResponseTemplate template) { + public TemplateUpdateFilesResponse template( + @javax.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; return this; } @@ -70,7 +71,8 @@ public TemplateUpdateFilesResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateUpdateFilesResponseTemplate template) { + public void setTemplate( + @javax.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java index 08f0784e7..26fa213ca 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; + @Deprecated @javax.annotation.Nullable private List warnings = null; public TemplateUpdateFilesResponseTemplate() {} @@ -59,7 +59,8 @@ public static TemplateUpdateFilesResponseTemplate init(HashMap data) throws Exce TemplateUpdateFilesResponseTemplate.class); } - public TemplateUpdateFilesResponseTemplate templateId(String templateId) { + public TemplateUpdateFilesResponseTemplate templateId( + @javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -77,12 +78,13 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } @Deprecated - public TemplateUpdateFilesResponseTemplate warnings(List warnings) { + public TemplateUpdateFilesResponseTemplate warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -111,7 +113,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java index 17f7ccabf..4b758039a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java @@ -69,110 +69,111 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; + @javax.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_PAGE = "force_signer_page"; - private Boolean forceSignerPage = false; + @javax.annotation.Nullable private Boolean forceSignerPage = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; + @javax.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview; + @javax.annotation.Nullable private Boolean showPreview; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; /** * The type of the draft. By default this is `request_signature`, but you can set it * to `send_document` if you want to self sign a document and download it. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -202,20 +203,20 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; + @javax.annotation.Nullable private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateEmbeddedRequest() {} @@ -235,7 +236,7 @@ public static UnclaimedDraftCreateEmbeddedRequest init(HashMap data) throws Exce UnclaimedDraftCreateEmbeddedRequest.class); } - public UnclaimedDraftCreateEmbeddedRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -255,11 +256,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress( + @javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -279,11 +281,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedRequest files(List files) { + public UnclaimedDraftCreateEmbeddedRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -310,11 +312,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -341,11 +344,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateEmbeddedRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -364,11 +368,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public UnclaimedDraftCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -387,11 +392,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -411,11 +417,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedRequest attachments(List attachments) { + public UnclaimedDraftCreateEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -441,11 +448,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -472,11 +480,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateEmbeddedRequest customFields(List customFields) { + public UnclaimedDraftCreateEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -513,11 +522,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateEmbeddedRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftCreateEmbeddedRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -535,11 +545,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -557,11 +568,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedRequest forceSignerPage(Boolean forceSignerPage) { + public UnclaimedDraftCreateEmbeddedRequest forceSignerPage( + @javax.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; return this; } @@ -579,11 +591,12 @@ public Boolean getForceSignerPage() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerPage(Boolean forceSignerPage) { + public void setForceSignerPage(@javax.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; } - public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -601,12 +614,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } public UnclaimedDraftCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -636,12 +649,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public UnclaimedDraftCreateEmbeddedRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -668,12 +682,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public UnclaimedDraftCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -715,11 +730,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -742,11 +759,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateEmbeddedRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedRequest holdRequest( + @javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -767,11 +785,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } - public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning( + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -790,11 +809,11 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedRequest message(String message) { + public UnclaimedDraftCreateEmbeddedRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -812,11 +831,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -846,11 +866,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -868,11 +889,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -893,11 +915,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public UnclaimedDraftCreateEmbeddedRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateEmbeddedRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -916,11 +939,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateEmbeddedRequest signers(List signers) { + public UnclaimedDraftCreateEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -946,11 +970,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -968,11 +993,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -990,11 +1016,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -1013,11 +1040,11 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -1035,11 +1062,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -1058,11 +1086,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedRequest type(TypeEnum type) { + public UnclaimedDraftCreateEmbeddedRequest type(@javax.annotation.Nullable TypeEnum type) { this.type = type; return this; } @@ -1081,11 +1109,12 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nullable TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -1109,11 +1138,12 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -1137,12 +1167,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } public UnclaimedDraftCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -1164,11 +1194,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -1189,7 +1221,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java index 8310985d9..94848f92d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java @@ -61,99 +61,99 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; + @javax.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; + @javax.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = false; + @javax.annotation.Nullable private Boolean allowCcs = false; public UnclaimedDraftCreateEmbeddedWithTemplateRequest() {} @@ -176,7 +176,8 @@ public static UnclaimedDraftCreateEmbeddedWithTemplateRequest init(HashMap data) UnclaimedDraftCreateEmbeddedWithTemplateRequest.class); } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -196,12 +197,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest requesterEmailAddress( - String requesterEmailAddress) { + @javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -220,11 +221,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -253,11 +255,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -276,11 +279,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -300,11 +304,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -330,12 +335,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -363,12 +368,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest editorOptions( - SubEditorOptions editorOptions) { + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -386,12 +391,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest fieldOptions( - SubFieldOptions fieldOptions) { + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -409,11 +414,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest files(List files) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -443,11 +449,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -477,12 +484,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSignerRoles( - Boolean forceSignerRoles) { + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -500,12 +507,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSubjectMessage( - Boolean forceSubjectMessage) { + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -523,11 +530,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest( + @javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -547,12 +555,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest isForEmbeddedSigning( - Boolean isForEmbeddedSigning) { + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -571,11 +579,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest message(String message) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -593,11 +602,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -628,11 +638,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly(Boolean previewOnly) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly( + @javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -654,12 +665,12 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest requestingRedirectUrl( - String requestingRedirectUrl) { + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -677,11 +688,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -702,12 +714,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest showProgressStepper( - Boolean showProgressStepper) { + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -726,12 +738,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signers( - List signers) { + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -758,12 +770,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nullable List signers) { this.signers = signers; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -781,12 +794,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -804,11 +817,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -827,11 +841,12 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -849,11 +864,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -872,11 +888,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest title(String title) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -894,12 +911,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -921,11 +938,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -944,7 +963,7 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java index 2c2d0ff14..0b0b6b61b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java @@ -57,7 +57,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateRequest { /** @@ -66,9 +66,9 @@ public class UnclaimedDraftCreateRequest { * `request_signature` then signers name and email_address are not optional. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -98,76 +98,77 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateRequest() {} @@ -187,7 +188,7 @@ public static UnclaimedDraftCreateRequest init(HashMap data) throws Exception { UnclaimedDraftCreateRequest.class); } - public UnclaimedDraftCreateRequest type(TypeEnum type) { + public UnclaimedDraftCreateRequest type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -208,11 +209,11 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateRequest files(List files) { + public UnclaimedDraftCreateRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -239,11 +240,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -270,11 +271,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -293,11 +295,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateRequest attachments(List attachments) { + public UnclaimedDraftCreateRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -323,11 +326,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -353,11 +357,11 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateRequest clientId(String clientId) { + public UnclaimedDraftCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -376,11 +380,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateRequest customFields(List customFields) { + public UnclaimedDraftCreateRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -416,11 +421,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -438,11 +444,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateRequest formFieldGroups(List formFieldGroups) { + public UnclaimedDraftCreateRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -472,11 +479,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public UnclaimedDraftCreateRequest formFieldRules(List formFieldRules) { + public UnclaimedDraftCreateRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -502,12 +511,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public UnclaimedDraftCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -549,11 +559,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -576,11 +588,11 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateRequest message(String message) { + public UnclaimedDraftCreateRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -598,11 +610,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateRequest metadata(Map metadata) { + public UnclaimedDraftCreateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -632,11 +645,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -655,11 +669,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateRequest signers(List signers) { + public UnclaimedDraftCreateRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -685,11 +700,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -707,11 +723,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -729,11 +746,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateRequest subject(String subject) { + public UnclaimedDraftCreateRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -751,11 +768,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -774,11 +791,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -802,11 +820,11 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -830,11 +848,11 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public UnclaimedDraftCreateRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -855,7 +873,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java index 6e6ed41c1..f93c402e8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java @@ -32,14 +32,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateResponse { public static final String JSON_PROPERTY_UNCLAIMED_DRAFT = "unclaimed_draft"; - private UnclaimedDraftResponse unclaimedDraft; + @javax.annotation.Nonnull private UnclaimedDraftResponse unclaimedDraft; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public UnclaimedDraftCreateResponse() {} @@ -59,7 +59,8 @@ public static UnclaimedDraftCreateResponse init(HashMap data) throws Exception { UnclaimedDraftCreateResponse.class); } - public UnclaimedDraftCreateResponse unclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public UnclaimedDraftCreateResponse unclaimedDraft( + @javax.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; return this; } @@ -78,11 +79,12 @@ public UnclaimedDraftResponse getUnclaimedDraft() { @JsonProperty(JSON_PROPERTY_UNCLAIMED_DRAFT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUnclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public void setUnclaimedDraft(@javax.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; } - public UnclaimedDraftCreateResponse warnings(List warnings) { + public UnclaimedDraftCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -108,7 +110,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java index eabad715c..adf4c94e6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java @@ -36,32 +36,32 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftEditAndResendRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public UnclaimedDraftEditAndResendRequest() {} @@ -81,7 +81,7 @@ public static UnclaimedDraftEditAndResendRequest init(HashMap data) throws Excep UnclaimedDraftEditAndResendRequest.class); } - public UnclaimedDraftEditAndResendRequest clientId(String clientId) { + public UnclaimedDraftEditAndResendRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -101,11 +101,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftEditAndResendRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftEditAndResendRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -123,11 +124,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning( + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -146,11 +148,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftEditAndResendRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftEditAndResendRequest requesterEmailAddress( + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -169,11 +172,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftEditAndResendRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -191,11 +195,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftEditAndResendRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -214,11 +219,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftEditAndResendRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -236,11 +242,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest testMode(Boolean testMode) { + public UnclaimedDraftEditAndResendRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -259,7 +266,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java index 7de5a3ecf..cf497fce5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java @@ -34,26 +34,26 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_CLAIM_URL = "claim_url"; - private String claimUrl; + @javax.annotation.Nullable private String claimUrl; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode; + @javax.annotation.Nullable private Boolean testMode; public UnclaimedDraftResponse() {} @@ -72,7 +72,8 @@ public static UnclaimedDraftResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), UnclaimedDraftResponse.class); } - public UnclaimedDraftResponse signatureRequestId(String signatureRequestId) { + public UnclaimedDraftResponse signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -90,11 +91,11 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public UnclaimedDraftResponse claimUrl(String claimUrl) { + public UnclaimedDraftResponse claimUrl(@javax.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; return this; } @@ -112,11 +113,12 @@ public String getClaimUrl() { @JsonProperty(JSON_PROPERTY_CLAIM_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClaimUrl(String claimUrl) { + public void setClaimUrl(@javax.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; } - public UnclaimedDraftResponse signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftResponse signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -134,11 +136,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftResponse requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftResponse requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -157,11 +160,11 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftResponse expiresAt(Integer expiresAt) { + public UnclaimedDraftResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -179,11 +182,11 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public UnclaimedDraftResponse testMode(Boolean testMode) { + public UnclaimedDraftResponse testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -201,7 +204,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java index acbd565ff..df3fc0502 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java @@ -30,14 +30,14 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class WarningResponse { public static final String JSON_PROPERTY_WARNING_MSG = "warning_msg"; - private String warningMsg; + @javax.annotation.Nonnull private String warningMsg; public static final String JSON_PROPERTY_WARNING_NAME = "warning_name"; - private String warningName; + @javax.annotation.Nonnull private String warningName; public WarningResponse() {} @@ -55,7 +55,7 @@ public static WarningResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), WarningResponse.class); } - public WarningResponse warningMsg(String warningMsg) { + public WarningResponse warningMsg(@javax.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; return this; } @@ -74,11 +74,11 @@ public String getWarningMsg() { @JsonProperty(JSON_PROPERTY_WARNING_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningMsg(String warningMsg) { + public void setWarningMsg(@javax.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; } - public WarningResponse warningName(String warningName) { + public WarningResponse warningName(@javax.annotation.Nonnull String warningName) { this.warningName = warningName; return this; } @@ -97,7 +97,7 @@ public String getWarningName() { @JsonProperty(JSON_PROPERTY_WARNING_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningName(String warningName) { + public void setWarningName(@javax.annotation.Nonnull String warningName) { this.warningName = warningName; } diff --git a/sdks/java-v1/templates/BeanValidationException.mustache b/sdks/java-v1/templates/BeanValidationException.mustache index d8b0fa695..d551902f8 100644 --- a/sdks/java-v1/templates/BeanValidationException.mustache +++ b/sdks/java-v1/templates/BeanValidationException.mustache @@ -4,8 +4,8 @@ package {{invokerPackage}}; import java.util.Set; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ValidationException; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.ValidationException; public class BeanValidationException extends ValidationException { /** diff --git a/sdks/java-v1/templates/Configuration.mustache b/sdks/java-v1/templates/Configuration.mustache index 8e9720e36..61b08ab67 100644 --- a/sdks/java-v1/templates/Configuration.mustache +++ b/sdks/java-v1/templates/Configuration.mustache @@ -6,7 +6,7 @@ package {{invokerPackage}}; public class Configuration { public static final String VERSION = "{{{artifactVersion}}}"; - private static ApiClient defaultApiClient = new ApiClient(); + private static volatile ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API diff --git a/sdks/java-v1/templates/JSON.mustache b/sdks/java-v1/templates/JSON.mustache index 1d0a81387..5ef02660d 100644 --- a/sdks/java-v1/templates/JSON.mustache +++ b/sdks/java-v1/templates/JSON.mustache @@ -31,9 +31,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/build.gradle.mustache b/sdks/java-v1/templates/build.gradle.mustache index 06f9bd5e9..6557a7c70 100644 --- a/sdks/java-v1/templates/build.gradle.mustache +++ b/sdks/java-v1/templates/build.gradle.mustache @@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') { task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + archiveClassifier = 'sources' } artifacts { @@ -97,12 +97,12 @@ if(hasProperty('target') && target == 'android') { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -126,6 +126,9 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -148,6 +151,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "junit:junit:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/javaBuilder.mustache b/sdks/java-v1/templates/javaBuilder.mustache index c02730081..4a0e102b8 100644 --- a/sdks/java-v1/templates/javaBuilder.mustache +++ b/sdks/java-v1/templates/javaBuilder.mustache @@ -14,9 +14,9 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par } {{#vars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.instance.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} this.instance.{{name}} = {{name}}; @@ -24,7 +24,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } @@ -32,12 +32,12 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par {{/vars}} {{#parentVars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { // inherited: {{isInherited}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}} super.{{name}}({{name}}); return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache index a00c6dc45..854d8a6cd 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache @@ -137,7 +137,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient(CloseableHttpClient httpClient) { objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); @@ -444,7 +444,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } @@ -622,7 +622,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache index 27b456417..cfcd9f04c 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache @@ -24,8 +24,8 @@ import java.util.Map; import java.util.StringJoiner; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} @@ -99,7 +99,7 @@ public class {{classname}} extends BaseApi { {{/required}}{{/allParams}} // create path and map variables String localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString(apiClient.parameterToString({{{paramName}}}))){{/pathParams}}; StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache index b4393ea82..05b2bf9fd 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache index 74a70a3ea..3a506ca3f 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache @@ -358,13 +358,12 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.2 diff --git a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache index 9a5b9bcd0..f744eec13 100644 --- a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache @@ -173,7 +173,12 @@ public class ApiClient { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#failOnUnknownProperties}} + objectMapper.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.setDateFormat(new RFC3339DateFormat()); diff --git a/sdks/java-v1/templates/libraries/feign/README.mustache b/sdks/java-v1/templates/libraries/feign/README.mustache index fed3cbebd..c3d948749 100644 --- a/sdks/java-v1/templates/libraries/feign/README.mustache +++ b/sdks/java-v1/templates/libraries/feign/README.mustache @@ -32,7 +32,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -And to use the api you can follow the examples bellow: +And to use the api you can follow the examples below: ```java diff --git a/sdks/java-v1/templates/libraries/feign/api.mustache b/sdks/java-v1/templates/libraries/feign/api.mustache index af05d6595..d67de9a28 100644 --- a/sdks/java-v1/templates/libraries/feign/api.mustache +++ b/sdks/java-v1/templates/libraries/feign/api.mustache @@ -15,8 +15,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import feign.*; @@ -47,8 +47,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -77,8 +77,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -122,8 +122,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -162,8 +162,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ - {{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", - {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + {{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", + {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) diff --git a/sdks/java-v1/templates/libraries/feign/api_test.mustache b/sdks/java-v1/templates/libraries/feign/api_test.mustache index 1db841158..62521123f 100644 --- a/sdks/java-v1/templates/libraries/feign/api_test.mustache +++ b/sdks/java-v1/templates/libraries/feign/api_test.mustache @@ -14,8 +14,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache index 8af1cb136..2b4e0340e 100644 --- a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache @@ -114,6 +114,9 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -127,9 +130,9 @@ dependencies { implementation "io.github.openfeign:feign-okhttp:$feign_version" implementation "io.github.openfeign.form:feign-form:$feign_form_version" {{#jackson}} - {{#joda}} + {{#joda}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" - {{/joda}} + {{/joda}} implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" @@ -142,11 +145,14 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1" testImplementation "org.hamcrest:hamcrest:2.2" - testImplementation "commons-io:commons-io:2.8.0" + testImplementation "commons-io:commons-io:2.16.1" testImplementation "ch.qos.logback:logback-classic:1.2.3" } diff --git a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache index 9af32c270..1a24b99f5 100644 --- a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache @@ -28,11 +28,14 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", "org.hamcrest" % "hamcrest" % "2.2" % "test", - "commons-io" % "commons-io" % "2.8.0" % "test", + "commons-io" % "commons-io" % "2.16.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/feign/model.mustache b/sdks/java-v1/templates/libraries/feign/model.mustache index 5fa9bca80..108748f60 100644 --- a/sdks/java-v1/templates/libraries/feign/model.mustache +++ b/sdks/java-v1/templates/libraries/feign/model.mustache @@ -59,8 +59,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/feign/pojo.mustache b/sdks/java-v1/templates/libraries/feign/pojo.mustache index fe97e3b1b..76f119eb4 100644 --- a/sdks/java-v1/templates/libraries/feign/pojo.mustache +++ b/sdks/java-v1/templates/libraries/feign/pojo.mustache @@ -72,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -189,17 +190,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -246,7 +237,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -272,7 +263,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} @@ -288,7 +280,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -309,6 +301,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} sb.append("}"); return sb.toString(); } diff --git a/sdks/java-v1/templates/libraries/feign/pom.mustache b/sdks/java-v1/templates/libraries/feign/pom.mustache index 9be4a094f..c915ea0ec 100644 --- a/sdks/java-v1/templates/libraries/feign/pom.mustache +++ b/sdks/java-v1/templates/libraries/feign/pom.mustache @@ -345,6 +345,14 @@ provided {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -403,13 +411,15 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.0 1.0.0 8.3.3 diff --git a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache index 03c44a8ed..7d3e50fe1 100644 --- a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache @@ -34,7 +34,12 @@ public class ApiClient { // A reasonable default object mapper. Client can pass in a chosen ObjectMapper anyway, this is just for reasonable defaults. private static ObjectMapper createDefaultObjectMapper() { ObjectMapper objectMapper = new ObjectMapper() + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .setDateFormat(new RFC3339DateFormat()); {{#joda}} diff --git a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache index 6d5f8334e..fef695d69 100644 --- a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache @@ -1001,24 +1001,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1047,6 +1033,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1377,7 +1393,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache index e1f17c972..613a4a276 100644 --- a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,12 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) -{{^useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) -{{/useCustomTemplateCode}} + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/api.mustache b/sdks/java-v1/templates/libraries/jersey2/api.mustache index b39d00df3..1b5968121 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api.mustache @@ -12,8 +12,8 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; @@ -56,12 +56,7 @@ public class {{classname}} { {{#operation}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -72,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ {{#responses}} @@ -101,12 +97,7 @@ public class {{classname}} { {{/useCustomTemplateCode}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -115,7 +106,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -226,7 +218,7 @@ public class {{classname}} { GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} {{^useCustomTemplateCode}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); {{/useCustomTemplateCode}} @@ -282,7 +274,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -302,7 +295,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -321,12 +315,7 @@ public class {{classname}} { } /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}}{{#pathParams}} * @param {{paramName}} {{description}} (required){{/pathParams}} * @return {{operationId}}Request diff --git a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache index 7b8214bd4..926ba0a82 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache index 39aa19299..d3ea8ff60 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache @@ -229,6 +229,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} {{#useCustomTemplateCode}} mockito_version = "3.12.4" {{/useCustomTemplateCode}} @@ -265,6 +268,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" {{#useCustomTemplateCode}} diff --git a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache index bb525bf1f..3883888fe 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache @@ -36,6 +36,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey2/model.mustache b/sdks/java-v1/templates/libraries/jersey2/model.mustache index 509857733..bf30b7f6e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/model.mustache @@ -42,8 +42,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache index 09906d7b0..5b60d0743 100644 --- a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} - {{#isArray}} - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache index 0ba5ad05a..a73f86943 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache @@ -91,6 +91,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} + {{>nullable_var_annotations}} {{^useCustomTemplateCode}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} @@ -150,7 +151,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -242,17 +243,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -302,7 +293,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey2/pom.mustache b/sdks/java-v1/templates/libraries/jersey2/pom.mustache index 9a596b00d..74d3ef000 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pom.mustache @@ -404,6 +404,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -434,13 +443,12 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -448,6 +456,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 {{#useCustomTemplateCode}} 3.12.4 diff --git a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache index 09563afa7..a2d6dd380 100644 --- a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache @@ -988,24 +988,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1034,6 +1020,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1340,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache index 97cee6394..bdd24ba47 100644 --- a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,7 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) @@ -45,6 +42,7 @@ public class JSON implements ContextResolver { {{#openApiNullable}} .addModule(new JsonNullableModule()) {{/openApiNullable}} + .addModule(new RFC3339JavaTimeModule()) .build(); } diff --git a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/api.mustache b/sdks/java-v1/templates/libraries/jersey3/api.mustache index 8d3e62f27..be8861553 100644 --- a/sdks/java-v1/templates/libraries/jersey3/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/api.mustache @@ -67,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -101,7 +102,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -195,7 +197,7 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); } @@ -232,7 +234,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -252,7 +255,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache index 42908c8bb..f95eafca0 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache index 6e89375a6..5f07e5671 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache index 09906d7b0..c0716915e 100644 --- a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} - {{#isArray}} public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache index 06be4ddf2..8f454c429 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache @@ -81,7 +81,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{>nullable_var_annotations}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vars}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -197,17 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -257,7 +248,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey3/pom.mustache b/sdks/java-v1/templates/libraries/jersey3/pom.mustache index d2f13457c..a3c115041 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -400,9 +409,7 @@ 2.17.1 0.2.6 2.1.1 - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -410,6 +417,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/sdks/java-v1/templates/libraries/microprofile/api.mustache b/sdks/java-v1/templates/libraries/microprofile/api.mustache index 6e25c1f10..0b0a7c4ba 100644 --- a/sdks/java-v1/templates/libraries/microprofile/api.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/api.mustache @@ -71,10 +71,10 @@ public interface {{classname}} { {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} -{{^useSingleRequestParameter}} - {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; -{{/useSingleRequestParameter}} -{{#useSingleRequestParameter}} +{{^singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; +{{/singleRequestParameter}} +{{#singleRequestParameter}} {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException; {{#hasNonBodyParams}} public class {{operationIdCamelCase}}Request { @@ -91,6 +91,9 @@ public interface {{classname}} { {{#formParams}} private {{>formParams}}; {{/formParams}} + {{#cookieParams}} + private {{>cookieParams}}; + {{/cookieParams}} private {{operationIdCamelCase}}Request() { } @@ -106,7 +109,7 @@ public interface {{classname}} { * @param {{paramName}}{{>formParamsNameSuffix}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) * @return {{operationIdCamelCase}}Request */ - public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}) { + public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}{{>cookieParamsImpl}}) { this.{{paramName}}{{>formParamsNameSuffix}} = {{paramName}}{{>formParamsNameSuffix}}; return this; } @@ -114,7 +117,7 @@ public interface {{classname}} { {{/allParams}} } {{/hasNonBodyParams}} -{{/useSingleRequestParameter}} +{{/singleRequestParameter}} {{/operation}} } {{/operations}} diff --git a/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache new file mode 100644 index 000000000..c4ff01d7e --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache new file mode 100644 index 000000000..4cca907c6 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationCookieParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache new file mode 100644 index 000000000..70871f0f8 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache index cb8539bd1..7cead92c5 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache @@ -77,7 +77,7 @@ return b; } } - {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } {{/jackson}} {{/withXml}} diff --git a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache index 2539064d1..588e52c7e 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache @@ -65,6 +65,6 @@ import java.net.URI; return b; } } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/enumUnknownDefaultCase}}{{/useNullForUnknownEnumValue}} } } diff --git a/sdks/java-v1/templates/libraries/microprofile/model.mustache b/sdks/java-v1/templates/libraries/microprofile/model.mustache index e10e68d83..8ac93be1b 100644 --- a/sdks/java-v1/templates/libraries/microprofile/model.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/model.mustache @@ -1,6 +1,12 @@ {{>licenseInfo}} package {{package}}; +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; {{#imports}}import {{import}}; {{/imports}} {{#serializableModel}} @@ -31,9 +37,12 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; import {{rootJavaEEPackage}}.json.stream.JsonGenerator; import {{rootJavaEEPackage}}.json.stream.JsonParser; import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; -{{#vendorExtensions.x-has-readonly-properties}} +{{#jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo; +{{/jsonbPolymorphism}} import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; -{{/vendorExtensions.x-has-readonly-properties}} {{/jsonb}} {{#useBeanValidation}} import {{rootJavaEEPackage}}.validation.constraints.*; diff --git a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache index afad09aa3..9fcac409c 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache @@ -22,7 +22,7 @@ * {{{.}}} */ {{/description}} -{{>additionalModelTypeAnnotations}} +{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} {{#vendorExtensions.x-class-extra-annotation}} {{{vendorExtensions.x-class-extra-annotation}}} {{/vendorExtensions.x-class-extra-annotation}} @@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi */ {{/description}} {{^withXml}} - {{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}} + {{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}} {{/withXml}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} @@ -148,28 +148,5 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi {{/isReadOnly}} {{/vars}} - - /** - * Create a string representation of this pojo. - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); - {{/vars}}sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } +{{>pojoOverrides}} } diff --git a/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache new file mode 100644 index 000000000..f0fbb0b20 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache @@ -0,0 +1,64 @@ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}}sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/pom.mustache b/sdks/java-v1/templates/libraries/microprofile/pom.mustache index f814d4c0d..4fefd6db2 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom.mustache @@ -196,6 +196,14 @@ ${mutiny.version} {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -210,10 +218,12 @@ 1.8 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.2 {{/useBeanValidation}} @@ -238,9 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 {{#microprofileMutiny}} - 1.2.0 + 1.10.0 {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache index 7accc4cb2..9462e0d92 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache @@ -189,6 +189,21 @@ ${jakarta.annotation.version} provided +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -203,10 +218,12 @@ 11 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.1 {{/useBeanValidation}} @@ -217,7 +234,7 @@ {{/jackson}} 2.1.0 2.0.0 - 2.0.0 + 3.0.0 2.0.1 3.0.0 3.0.1 @@ -231,6 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/native/ApiClient.mustache b/sdks/java-v1/templates/libraries/native/ApiClient.mustache index a641525af..a8bede355 100644 --- a/sdks/java-v1/templates/libraries/native/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/native/ApiClient.mustache @@ -183,7 +183,7 @@ public class ApiClient { asyncResponseInterceptor = null; } - protected ObjectMapper createDefaultObjectMapper() { + public static ObjectMapper createDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -199,15 +199,15 @@ public class ApiClient { return mapper; } - protected String getDefaultBaseUri() { + private String getDefaultBaseUri() { return "{{{basePath}}}"; } - protected HttpClient.Builder createDefaultHttpClientBuilder() { + public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/sdks/java-v1/templates/libraries/native/JSON.mustache b/sdks/java-v1/templates/libraries/native/JSON.mustache index 813bb7940..496e5a1a8 100644 --- a/sdks/java-v1/templates/libraries/native/JSON.mustache +++ b/sdks/java-v1/templates/libraries/native/JSON.mustache @@ -30,7 +30,12 @@ public class JSON { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + {{#failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/native/anyof_model.mustache b/sdks/java-v1/templates/libraries/native/anyof_model.mustache index dfb6464d5..7cc5081d8 100644 --- a/sdks/java-v1/templates/libraries/native/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/anyof_model.mustache @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -241,7 +242,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -251,7 +252,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -289,7 +290,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -301,7 +302,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -316,7 +317,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -345,7 +346,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/api.mustache b/sdks/java-v1/templates/libraries/native/api.mustache index a80dcbac8..c100f2f81 100644 --- a/sdks/java-v1/templates/libraries/native/api.mustache +++ b/sdks/java-v1/templates/libraries/native/api.mustache @@ -4,6 +4,7 @@ package {{package}}; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; import {{invokerPackage}}.Pair; {{#imports}} @@ -14,8 +15,8 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#hasFormParamsInSpec}} @@ -64,7 +65,7 @@ public class {{classname}} { private final Consumer> memberVarAsyncResponseInterceptor; public {{classname}}() { - this(new ApiClient()); + this(Configuration.getDefaultApiClient()); } public {{classname}}(ApiClient apiClient) { @@ -271,22 +272,46 @@ public class {{classname}} { } {{/vendorExtensions.x-java-text-plain-string}} {{^vendorExtensions.x-java-text-plain-string}} - return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - {{#returnType}} - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream - {{/returnType}} - {{^returnType}} - null - {{/returnType}} + {{#returnType}} + {{! Fix for https://github.com/OpenAPITools/openapi-generator/issues/13968 }} + {{! This part had a bugfix for an empty response in the past, but this part of that PR was reverted because it was not doing anything. }} + {{! Keep this documentation here, because the problem is not obvious. }} + {{! `InputStream.available()` was used, but that only works for inputstreams that are already in memory, it will not give the right result if it is a remote stream. We only work with remote streams here. }} + {{! https://github.com/OpenAPITools/openapi-generator/pull/13993/commits/3e!37411d2acef0311c82e6d941a8e40b3bc0b6da }} + {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} + {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} + {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} + if (localVarResponse.body() == null) { + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); + {{/returnType}} + {{^returnType}} + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + {{/returnType}} {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} // Drain the InputStream while (localVarResponse.body().read() != -1) { - // Ignore + // Ignore } localVarResponse.body().close(); {{/returnType}} diff --git a/sdks/java-v1/templates/libraries/native/api_test.mustache b/sdks/java-v1/templates/libraries/native/api_test.mustache index 497bd5308..8558cc6f4 100644 --- a/sdks/java-v1/templates/libraries/native/api_test.mustache +++ b/sdks/java-v1/templates/libraries/native/api_test.mustache @@ -19,8 +19,8 @@ import java.util.concurrent.CompletableFuture; {{/asyncNative}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/native/build.gradle.mustache b/sdks/java-v1/templates/libraries/native/build.gradle.mustache index 24ea4fef0..a04a9645e 100644 --- a/sdks/java-v1/templates/libraries/native/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/native/build.gradle.mustache @@ -50,12 +50,12 @@ task execute(type:JavaExec) { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -73,11 +73,21 @@ ext { swagger_annotations_version = "2.2.9" {{/swagger2AnnotationLibrary}} jackson_version = "2.17.1" + {{#useJakartaEe}} + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + {{/useJakartaEe}} junit_version = "5.10.2" {{#hasFormParamsInSpec}} httpmime_version = "4.5.13" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -94,9 +104,15 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version" + {{/useBeanValidation}} {{#hasFormParamsInSpec}} implementation "org.apache.httpcomponents:httpmime:$httpmime_version" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/sdks/java-v1/templates/libraries/native/model.mustache b/sdks/java-v1/templates/libraries/native/model.mustache index cd2a85a22..b3beca8d3 100644 --- a/sdks/java-v1/templates/libraries/native/model.mustache +++ b/sdks/java-v1/templates/libraries/native/model.mustache @@ -47,8 +47,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/native/oneof_model.mustache b/sdks/java-v1/templates/libraries/native/oneof_model.mustache index 8aa2ef073..cbb4a6d63 100644 --- a/sdks/java-v1/templates/libraries/native/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/oneof_model.mustache @@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -274,7 +275,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -284,7 +285,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -322,7 +323,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -349,7 +350,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -367,7 +368,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -378,7 +379,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pojo.mustache b/sdks/java-v1/templates/libraries/native/pojo.mustache index 1250a71ec..5413d1cdc 100644 --- a/sdks/java-v1/templates/libraries/native/pojo.mustache +++ b/sdks/java-v1/templates/libraries/native/pojo.mustache @@ -75,6 +75,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -104,7 +105,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens )); {{/vendorExtensions.x-enum-as-string}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -188,17 +189,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -244,7 +235,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -266,7 +257,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#allVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -395,7 +386,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for ({{{items.dataType}}} _item : {{getter}}()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -405,7 +396,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (int i = 0; i < {{getter}}().size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } {{/uniqueItems}} @@ -443,7 +434,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -455,7 +446,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if ({{getter}}().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } } @@ -470,7 +461,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (String _key : {{getter}}().keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - {{getter}}().get(_key), URLEncoder.encode(ApiClient.valueToString({{getter}}().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + {{getter}}().get(_key), ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(_key))))); } } {{/items.isModel}} @@ -488,7 +479,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isMap}} {{#isPrimitiveType}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -499,7 +490,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isModel}} {{^isModel}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pom.mustache b/sdks/java-v1/templates/libraries/native/pom.mustache index 8ed827791..0ccfa8418 100644 --- a/sdks/java-v1/templates/libraries/native/pom.mustache +++ b/sdks/java-v1/templates/libraries/native/pom.mustache @@ -271,6 +271,14 @@ ${httpmime-version} {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -295,16 +303,18 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#hasFormParamsInSpec}} 4.5.14 {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.2 2.27.2 diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache index c5e7ae225..519b37ed2 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache @@ -47,9 +47,11 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -987,7 +989,7 @@ public class ApiClient { } {{/dynamicOperations}} - /** + /** * Formats the specified free-form query parameters to a list of {@code Pair} objects. * * @param value The free-form query parameters. @@ -1001,6 +1003,7 @@ public class ApiClient { return params; } + @SuppressWarnings("unchecked") final Map valuesMap = (Map) value; for (Map.Entry entry : valuesMap.entrySet()) { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache index 6cf7ec789..eee7773c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache @@ -28,9 +28,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache index 8dbdf2451..de3afa6c1 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache @@ -90,7 +90,7 @@ import {{{invokerPackage}}}.ApiClient; import {{{invokerPackage}}}.ApiException; import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} -import {{{invokerPackage}}}.models.*; +import {{{modelPackage}}}.*; import {{{package}}}.{{{classname}}}; public class Example { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache index 18447fc12..564c1bb36 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache @@ -283,7 +283,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -291,13 +291,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{dataType}}} get{{#isArray}}{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache index 96757ed64..2dd79633e 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache @@ -26,14 +26,14 @@ import io.swagger.v3.oas.models.parameters.Parameter; import java.io.IOException; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; -import jakarta.validation.executable.ExecutableValidator; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.Validation; +import {{javaxPackage}}.validation.ValidatorFactory; +import {{javaxPackage}}.validation.executable.ExecutableValidator; import java.util.Set; import java.lang.reflect.Method; import java.lang.reflect.Type; @@ -98,7 +98,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -180,12 +181,6 @@ public class {{classname}} { {{/isQueryParam}} {{/constantParams}} - {{#headerParams}} - if ({{paramName}} != null) { - localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); - } - - {{/headerParams}} {{#constantParams}} {{#isHeaderParam}} // Set client side default value of Header Param "{{baseName}}". @@ -230,6 +225,15 @@ public class {{classname}} { if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } + {{^dynamicOperations}} + {{#headerParams}} + + if ({{paramName}} != null) { + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/headerParams}} + {{/dynamicOperations}} String[] localVarAuthNames = new String[] { {{#withAWSV4Signature}}"AWS4Auth"{{/withAWSV4Signature}}{{#authMethods}}{{#-first}}{{#withAWSV4Signature}}, {{/withAWSV4Signature}}{{/-first}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; return localVarApiClient.buildCall(basePath, localVarPath, {{^dynamicOperations}}"{{httpMethod}}"{{/dynamicOperations}}{{#dynamicOperations}}apiOperation.getMethod(){{/dynamicOperations}}, localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); @@ -287,7 +291,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -327,7 +332,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -395,7 +401,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -455,7 +462,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -479,7 +487,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -511,7 +520,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -543,7 +553,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -569,7 +580,8 @@ public class {{classname}} { * @return API{{operationId}}Request {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache index 29f682678..b56bdf4db 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache @@ -17,8 +17,8 @@ import java.io.InputStream; {{/supportStreaming}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache index eb67fc112..1b527257a 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache @@ -126,7 +126,7 @@ dependencies { {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache index 2045b8474..54bd804c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.6", diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache index c82b0fbe2..3a1cca8d7 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache @@ -21,8 +21,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache index 31c63263e..731b36d57 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache @@ -361,7 +361,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -372,10 +372,10 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache index 0a32ef099..3d76d23b0 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache @@ -70,6 +70,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} + {{>nullable_var_annotations}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} @@ -80,6 +81,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/parcelableModel}} {{/parent}} {{#discriminator}} + {{#discriminator.isEnum}} +{{#readWriteVars}}{{#isDiscriminator}}{{#defaultValue}} + this.{{name}} = {{defaultValue}}; +{{/defaultValue}}{{/isDiscriminator}}{{/readWriteVars}} + {{/discriminator.isEnum}} {{^discriminator.isEnum}} this.{{{discriminatorName}}} = this.getClass().getSimpleName(); {{/discriminator.isEnum}} @@ -106,7 +112,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; return this; } @@ -153,17 +159,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -183,7 +179,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} {{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated -{{/deprecated}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/deprecated}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; } {{/isReadOnly}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache index def53f2fc..5e7bd9b86 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache @@ -414,7 +414,7 @@ {{/swagger2AnnotationLibrary}} 4.12.02.10.1 - 3.14.0 + 3.17.0 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} @@ -423,16 +423,15 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#performBeanValidation}} 3.0.3 {{/performBeanValidation}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.31.10.02.1.6 diff --git a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache index 8919eda30..3d875d66b 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache @@ -27,7 +27,7 @@ public class JacksonObjectMapper extends Jackson2Mapper { ObjectMapper mapper = new ObjectMapper(); mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/rest-assured/api.mustache b/sdks/java-v1/templates/libraries/rest-assured/api.mustache index 5ae6e5057..1eae54272 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api.mustache @@ -33,8 +33,8 @@ import io.swagger.v3.oas.annotations.security.*; {{/swagger2AnnotationLibrary}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.lang.reflect.Type; @@ -146,7 +146,7 @@ public class {{classname}} { public static class {{operationIdCamelCase}}Oper implements Oper { public static final Method REQ_METHOD = {{httpMethod}}; - public static final String REQ_URI = "{{path}}"; + public static final String REQ_URI = "{{{path}}}"; private RequestSpecBuilder reqSpec; private ResponseSpecBuilder respSpec; @@ -155,15 +155,15 @@ public class {{classname}} { this.reqSpec = reqSpec; {{#vendorExtensions}} {{#x-content-type}} - reqSpec.setContentType("{{x-content-type}}"); + reqSpec.setContentType("{{{x-content-type}}}"); {{/x-content-type}} - reqSpec.setAccept("{{#x-accepts}}{{.}}{{^-last}},{{/-last}}{{/x-accepts}}"); + reqSpec.setAccept("{{#x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/x-accepts}}"); {{/vendorExtensions}} this.respSpec = new ResponseSpecBuilder(); } /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @param type * @return type @@ -175,7 +175,7 @@ public class {{classname}} { {{#returnType}} /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @return {{returnType}} */ diff --git a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache index d7d9dae2b..adcbd8085 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache @@ -20,8 +20,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; diff --git a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache index 396dd69c2..1655d52c2 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache @@ -358,13 +358,12 @@ {{/jackson}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 3.6.0 5.10.3 diff --git a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache index 14b1af4af..e5a4bd8fc 100644 --- a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache @@ -44,6 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.TimeZone; +import java.util.function.Supplier; import {{javaxPackage}}.annotation.Nullable; @@ -87,29 +88,26 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient() { - this.dateFormat = createDefaultDateFormat(); - this.objectMapper = createDefaultObjectMapper(this.dateFormat); - this.restClient = buildRestClient(this.objectMapper); - this.init(); + this(null); } public ApiClient(RestClient restClient) { - this(Optional.ofNullable(restClient).orElseGet(ApiClient::buildRestClient), createDefaultDateFormat()); + this(restClient, createDefaultDateFormat()); } public ApiClient(ObjectMapper mapper, DateFormat format) { - this(buildRestClient(mapper.copy()), format); + this(null, mapper, format); } public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) { - this(Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(mapper.copy())), format); + this.objectMapper = mapper.copy(); + this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); + this.dateFormat = format; + this.init(); } private ApiClient(RestClient restClient, DateFormat format) { - this.restClient = restClient; - this.dateFormat = format; - this.objectMapper = createDefaultObjectMapper(format); - this.init(); + this(restClient, createDefaultObjectMapper(format), format); } public static DateFormat createDefaultDateFormat() { @@ -125,7 +123,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); @@ -159,9 +157,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{/withXml}} Consumer>> messageConverters = converters -> { - converters.add(new MappingJackson2HttpMessageConverter(mapper)); + converters.add(0, new MappingJackson2HttpMessageConverter(mapper)); {{#withXml}} - converters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper)); {{/withXml}} }; @@ -243,6 +241,21 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { throw new RuntimeException("No Bearer authentication configured!"); } + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. * @param username the username @@ -753,4 +766,4 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return collectionFormat.collectionToString(values); } -} \ No newline at end of file +} diff --git a/sdks/java-v1/templates/libraries/restclient/api.mustache b/sdks/java-v1/templates/libraries/restclient/api.mustache index 1475fc0f4..b8a8d93e7 100644 --- a/sdks/java-v1/templates/libraries/restclient/api.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api.mustache @@ -11,6 +11,11 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -47,6 +52,91 @@ public class {{classname}} { } {{#operation}} +{{#singleRequestParameter}} +{{#hasParams}} +{{^hasSingleParam}} + + {{^staticRequest}} + public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){} + {{/staticRequest}} + {{#staticRequest}} + public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + {{/staticRequest}} + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + +{{/hasSingleParam}} +{{/hasParams}} +{{/singleRequestParameter}} /** * {{summary}} * {{notes}} @@ -182,4 +272,4 @@ public class {{classname}} { } {{/operation}} } -{{/operations}} \ No newline at end of file +{{/operations}} diff --git a/sdks/java-v1/templates/libraries/restclient/api_test.mustache b/sdks/java-v1/templates/libraries/restclient/api_test.mustache index dc3408341..e54a4ccc2 100644 --- a/sdks/java-v1/templates/libraries/restclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api_test.mustache @@ -4,8 +4,8 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -13,10 +13,15 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} /** * API tests for {{classname}} */ -@Ignore +@Disabled public class {{classname}}Test { private final {{classname}} api = new {{classname}}(); diff --git a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache index 1e1e6247c..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache @@ -2,25 +2,49 @@ package {{invokerPackage}}.auth; +import java.util.Optional; +import java.util.function.Supplier; import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ {{>generatedAnnotation}} public class OAuth implements Authentication { - private String accessToken; + private Supplier tokenSupplier; + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ public String getAccessToken() { - return accessToken; + return tokenSupplier.get(); } + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ public void setAccessToken(String accessToken) { - this.accessToken = accessToken; + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { - if (accessToken != null) { - headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); - } + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); } } diff --git a/sdks/java-v1/templates/libraries/restclient/pom.mustache b/sdks/java-v1/templates/libraries/restclient/pom.mustache index d3f6ab650..f926d47b4 100644 --- a/sdks/java-v1/templates/libraries/restclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/restclient/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -337,12 +337,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -362,13 +356,10 @@ {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache index b57283048..e4097fc85 100644 --- a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache +++ b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache @@ -20,7 +20,7 @@ public class JSON implements ContextResolver { public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/api.mustache b/sdks/java-v1/templates/libraries/resttemplate/api.mustache index aa1a98fd3..6cf513730 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api.mustache @@ -14,8 +14,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; diff --git a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache index 04a19f1f1..e1a213c02 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache @@ -16,8 +16,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache index 1e8204285..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache @@ -26,7 +26,7 @@ public class OAuth implements Authentication { /** * Sets the bearer access token used for Authorization. * - * @param bearerToken The bearer token to send in the Authorization header + * @param accessToken The bearer token to send in the Authorization header */ public void setAccessToken(String accessToken) { setAccessToken(() -> accessToken); diff --git a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache index a900fc806..edd170cd3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache @@ -123,10 +123,12 @@ ext { {{#useJakartaEe}} spring_web_version = "6.1.5" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" {{/useJakartaEe}} {{^useJakartaEe}} - spring_web_version = "5.3.33" + spring_web_version = "6.1.13" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" {{/useJakartaEe}} jodatime_version = "2.9.9" junit_version = "5.10.2" @@ -145,7 +147,12 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{^useJakartaEe}} implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#useJakartaEe}} + implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version" + {{/useJakartaEe}} {{#openApiNullable}} implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/model.mustache b/sdks/java-v1/templates/libraries/resttemplate/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache new file mode 100644 index 000000000..192b7014c --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/resttemplate/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache index 250417d78..90de86cba 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -352,12 +352,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -367,33 +361,27 @@ {{#swagger2AnnotationLibrary}} 2.2.15 {{/swagger2AnnotationLibrary}} - {{#useJakartaEe}} - 6.1.5 - {{/useJakartaEe}} - {{^useJakartaEe}} - 5.3.33 - {{/useJakartaEe}} 2.17.1 2.17.1 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} {{#useJakartaEe}} + 6.1.14 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} + 5.3.33 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache index 077e8d692..c05159d4e 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache @@ -46,7 +46,9 @@ import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.text.DateFormat; +{{#jsr310}} import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.LinkedHashMap; import java.util.Map; import java.util.HashMap; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache index 2ff8b1cb7..2e986485f 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache @@ -30,9 +30,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache index 525fe5d13..697e398e4 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache @@ -32,7 +32,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/retrofit2/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/api.mustache index dd521a5fc..0b0105515 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api.mustache @@ -35,8 +35,8 @@ import java.util.Map; import java.util.Set; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#operations}} diff --git a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache index dab62f328..b84e6b173 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache @@ -15,8 +15,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache index e78bd985a..7f7b9e2b0 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache @@ -18,8 +18,8 @@ import okhttp3.MultipartBody; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; diff --git a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache index b02a5fb2e..7f5d6b892 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache @@ -405,13 +405,12 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 1.0.1 5.10.3 diff --git a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache index 6607107ab..1a90c571b 100644 --- a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache @@ -81,7 +81,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { // Build object mapper this.objectMapper = new ObjectMapper(); this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache index 9072a8859..ce696128e 100644 --- a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache @@ -143,7 +143,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/webclient/api.mustache b/sdks/java-v1/templates/libraries/webclient/api.mustache index 65600dbfc..0a412fb37 100644 --- a/sdks/java-v1/templates/libraries/webclient/api.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api.mustache @@ -12,8 +12,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +53,81 @@ public class {{classname}} { this.apiClient = apiClient; } - {{#operation}} + {{#operation}}{{#singleRequestParameter}}{{#hasParams}}{{^hasSingleParam}} + public {{#staticRequest}}static {{/staticRequest}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + {{/hasSingleParam}}{{/hasParams}}{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v1/templates/libraries/webclient/api_test.mustache b/sdks/java-v1/templates/libraries/webclient/api_test.mustache index c5d568617..e0a960d12 100644 --- a/sdks/java-v1/templates/libraries/webclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api_test.mustache @@ -15,8 +15,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache index 597411638..be194ab23 100644 --- a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache @@ -133,12 +133,14 @@ ext { {{#useJakartaEe}} spring_boot_version = "3.0.12" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" reactor_version = "3.5.12" reactor_netty_version = "1.1.13" {{/useJakartaEe}} {{^useJakartaEe}} spring_boot_version = "2.7.17" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" reactor_version = "3.4.34" reactor_netty_version = "1.0.39" {{/useJakartaEe}} diff --git a/sdks/java-v1/templates/libraries/webclient/model.mustache b/sdks/java-v1/templates/libraries/webclient/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/webclient/pojo.mustache b/sdks/java-v1/templates/libraries/webclient/pojo.mustache new file mode 100644 index 000000000..2b9423b77 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/webclient/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/model.mustache b/sdks/java-v1/templates/model.mustache index b50416793..55e6678d2 100644 --- a/sdks/java-v1/templates/model.mustache +++ b/sdks/java-v1/templates/model.mustache @@ -49,8 +49,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/modelInnerEnum.mustache b/sdks/java-v1/templates/modelInnerEnum.mustache index 0096d8407..f87524099 100644 --- a/sdks/java-v1/templates/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/modelInnerEnum.mustache @@ -23,7 +23,7 @@ {{#withXml}} @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{/withXml}} - {{{name}}}({{{value}}}){{^-last}}, + {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/sdks/java-v1/templates/nullable_var_annotations.mustache b/sdks/java-v1/templates/nullable_var_annotations.mustache new file mode 100644 index 000000000..7dbaf4029 --- /dev/null +++ b/sdks/java-v1/templates/nullable_var_annotations.mustache @@ -0,0 +1 @@ +{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}} \ No newline at end of file diff --git a/sdks/java-v1/templates/pojo.mustache b/sdks/java-v1/templates/pojo.mustache index 05be7e5c5..09482dd66 100644 --- a/sdks/java-v1/templates/pojo.mustache +++ b/sdks/java-v1/templates/pojo.mustache @@ -65,6 +65,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{>nullable_var_annotations}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} @@ -134,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -210,17 +211,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -270,7 +261,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -285,7 +276,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#readWriteVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -404,7 +395,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#uniqueItems}} if ({{getter}}() != null) { int i = 0; - for ({{{items.dataType}}} _item : {{getter}}()) { + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { try { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), diff --git a/sdks/java-v1/templates/pom.mustache b/sdks/java-v1/templates/pom.mustache index b733ab9bb..c46bc598e 100644 --- a/sdks/java-v1/templates/pom.mustache +++ b/sdks/java-v1/templates/pom.mustache @@ -289,12 +289,12 @@ {{/useJakartaEe}} {{#withXml}} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + {{/withXml}} {{#joda}} @@ -341,6 +341,15 @@ ${jakarta-annotation-version} provided + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -368,13 +377,15 @@ 2.17.1 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} -{{#useBeanValidation}} - 3.0.2 -{{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 1.0.0 5.10.2 1.10.0 diff --git a/sdks/java-v1/templates/typeInfoAnnotation.mustache b/sdks/java-v1/templates/typeInfoAnnotation.mustache index c21efb490..07f77c75c 100644 --- a/sdks/java-v1/templates/typeInfoAnnotation.mustache +++ b/sdks/java-v1/templates/typeInfoAnnotation.mustache @@ -26,3 +26,9 @@ {{/-last}} {{/discriminator.mappedModels}} {{/jackson}} +{{#jsonbPolymorphism}} +@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = { +{{/-first}} + @JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class), +{{#-last}} +}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}} \ No newline at end of file diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index d9afebf2b..afe94ce5f 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -56,7 +56,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 2.4-dev + 2.4.1-dev compile ``` @@ -72,7 +72,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:2.4-dev" + implementation "com.dropbox.sign:dropbox-sign:2.4.1-dev" } ``` @@ -86,7 +86,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-2.4-dev.jar` +- `target/dropbox-sign-2.4.1-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -95,31 +95,41 @@ Please follow the [installation](#installation) instruction and execute the foll ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = accountApi.accountCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountCreate"); System.err.println("Status code: " + e.getCode()); @@ -154,7 +164,7 @@ Class | Method | HTTP request | Description *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* | [**faxFiles**](docs/FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 @@ -173,6 +183,10 @@ Class | Method | HTTP request | Description *SignatureRequestApi* | [**signatureRequestCancel**](docs/SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](docs/SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +*SignatureRequestApi* | [**signatureRequestEdit**](docs/SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +*SignatureRequestApi* | [**signatureRequestEditEmbedded**](docs/SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +*SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](docs/SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +*SignatureRequestApi* | [**signatureRequestEditWithTemplate**](docs/SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template *SignatureRequestApi* | [**signatureRequestFiles**](docs/SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](docs/SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](docs/SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -276,6 +290,10 @@ Class | Method | HTTP request | Description - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) @@ -435,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.4-dev` + - Package version: `2.4.1-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v2/VERSION b/sdks/java-v2/VERSION index 12144f5cf..dfb9edcf4 100644 --- a/sdks/java-v2/VERSION +++ b/sdks/java-v2/VERSION @@ -1 +1 @@ -2.4-dev +2.4.1-dev diff --git a/sdks/java-v2/bin/copy-constants.php b/sdks/java-v2/bin/copy-constants.php new file mode 100755 index 000000000..70ec3083c --- /dev/null +++ b/sdks/java-v2/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); \ No newline at end of file diff --git a/sdks/java-v2/build.gradle b/sdks/java-v2/build.gradle index dadf69fc9..36ca0dfe2 100644 --- a/sdks/java-v2/build.gradle +++ b/sdks/java-v2/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '2.4-dev' +version = '2.4.1-dev' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/sdks/java-v2/build.sbt b/sdks/java-v2/build.sbt index 6ca675690..e5f46847c 100644 --- a/sdks/java-v2/build.sbt +++ b/sdks/java-v2/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "2.4-dev", + version := "2.4.1-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v2/docs/AccountApi.md b/sdks/java-v2/docs/AccountApi.md index 494853dda..e638f559d 100644 --- a/sdks/java-v2/docs/AccountApi.md +++ b/sdks/java-v2/docs/AccountApi.md @@ -22,31 +22,41 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountCreateRequest() - .emailAddress("newuser@dropboxsign.com"); - - try { - AccountCreateResponse result = accountApi.accountCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling AccountApi#accountCreate"); System.err.println("Status code: " + e.getCode()); @@ -97,30 +107,41 @@ Returns the properties and settings of your Account. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - try { - AccountGetResponse result = accountApi.accountGet(null, "jack@example.com"); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountGet( + null, // accountId + null // emailAddress + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -170,33 +191,44 @@ Updates the properties and settings of your Account. Currently only allows for u ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountUpdateRequest() - .callbackUrl("https://www.example.com/callback"); - - try { - AccountGetResponse result = accountApi.accountUpdate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountUpdateRequest = new AccountUpdateRequest(); + accountUpdateRequest.callbackUrl("https://www.example.com/callback"); + accountUpdateRequest.locale("en-US"); + + try + { + var response = new AccountApi(config).accountUpdate( + accountUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -245,33 +277,43 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var accountApi = new AccountApi(apiClient); - - var data = new AccountVerifyRequest() - .emailAddress("some_user@dropboxsign.com"); - - try { - AccountVerifyResponse result = accountApi.accountVerify(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountVerifyExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var accountVerifyRequest = new AccountVerifyRequest(); + accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountVerify( + accountVerifyRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling AccountApi#accountVerify"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/ApiAppApi.md b/sdks/java-v2/docs/ApiAppApi.md index 02630c9d7..c9e5fd615 100644 --- a/sdks/java-v2/docs/ApiAppApi.md +++ b/sdks/java-v2/docs/ApiAppApi.md @@ -23,50 +23,60 @@ Creates a new API App. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of((SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppCreateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - try { - ApiAppGetResponse result = apiAppApi.apiAppCreate(data); - System.out.println(result); +import java.util.Map; + +public class ApiAppCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppCreateRequest = new ApiAppCreateRequest(); + apiAppCreateRequest.name("My Production App"); + apiAppCreateRequest.domains(List.of ( + "example.com" + )); + apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppCreateRequest.oauth(oauth); + apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppCreate( + apiAppCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -115,30 +125,38 @@ Deletes an API App. Can only be invoked for apps you own. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - apiAppApi.apiAppDelete(clientId); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new ApiAppApi(config).apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -187,32 +205,40 @@ Returns an object with information about an API App. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppGet(clientId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -261,33 +287,41 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var page = 1; - var pageSize = 2; - - try { - ApiAppListResponse result = apiAppApi.apiAppList(page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -337,52 +371,62 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var apiAppApi = new ApiAppApi(apiClient); - - var oauth = new SubOAuth() - .callbackUrl("https://example.com/oauth") - .scopes(List.of(SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, SubOAuth.ScopesEnum.REQUEST_SIGNATURE)); - - var whiteLabelingOptions = new SubWhiteLabelingOptions() - .primaryButtonColor("#00b3e6") - .primaryButtonTextColor("#ffffff"); - - var customLogoFile = new File("CustomLogoFile.png"); - - var data = new ApiAppUpdateRequest() - .name("My Production App") - .domains(List.of("example.com")) - .oauth(oauth) - .whiteLabelingOptions(whiteLabelingOptions) - .customLogoFile(customLogoFile); - - var clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - - try { - ApiAppGetResponse result = apiAppApi.apiAppUpdate(clientId, data); - System.out.println(result); +import java.util.Map; + +public class ApiAppUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppUpdateRequest = new ApiAppUpdateRequest(); + apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); + apiAppUpdateRequest.name("New Name"); + apiAppUpdateRequest.domains(List.of ( + "example.com" + )); + apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppUpdateRequest.oauth(oauth); + apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/BulkSendJobApi.md b/sdks/java-v2/docs/BulkSendJobApi.md index 5d7335a12..a4b8a3460 100644 --- a/sdks/java-v2/docs/BulkSendJobApi.md +++ b/sdks/java-v2/docs/BulkSendJobApi.md @@ -20,32 +20,42 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - - try { - BulkSendJobGetResponse result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -96,33 +106,41 @@ Returns a list of BulkSendJob that you can access. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var bulkSendJobApi = new BulkSendJobApi(apiClient); - - var page = 1; - var pageSize = 20; - - try { - BulkSendJobListResponse result = bulkSendJobApi.bulkSendJobList(page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/EmbeddedApi.md b/sdks/java-v2/docs/EmbeddedApi.md index 62955f908..416c319ee 100644 --- a/sdks/java-v2/docs/EmbeddedApi.md +++ b/sdks/java-v2/docs/EmbeddedApi.md @@ -20,38 +20,49 @@ Retrieves an embedded object containing a template url that can be opened in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Main { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var data = new EmbeddedEditUrlRequest() - .ccRoles(List.of("")) - .mergeFields(List.of()); - - var templateId = "5de8179668f2033afac48da1868d0093bf133266"; - - try { - EmbeddedEditUrlResponse result = embeddedApi.embeddedEditUrl(templateId, data); - System.out.println(result); +import java.util.Map; + +public class EmbeddedEditUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var mergeFields = new ArrayList(List.of ()); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); + embeddedEditUrlRequest.ccRoles(List.of ( + "" + )); + embeddedEditUrlRequest.mergeFields(mergeFields); + + try + { + var response = new EmbeddedApi(config).embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -101,32 +112,40 @@ Retrieves an embedded object containing a signature url that can be opened in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var embeddedApi = new EmbeddedApi(apiClient); - - var signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - - try { - EmbeddedSignUrlResponse result = embeddedApi.embeddedSignUrl(signatureId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedSignUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new EmbeddedApi(config).embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/FaxApi.md b/sdks/java-v2/docs/FaxApi.md index a3d9baef9..7ee47ff0e 100644 --- a/sdks/java-v2/docs/FaxApi.md +++ b/sdks/java-v2/docs/FaxApi.md @@ -5,7 +5,7 @@ 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 +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 @@ -18,29 +18,42 @@ All URIs are relative to *https://api.hellosign.com/v3* Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; 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"); +import java.util.Map; + +public class FaxDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new FaxApi(config).faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -82,34 +95,45 @@ null (empty response body) > File faxFiles(faxId) -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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"));; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -153,31 +177,44 @@ public class Example { Get Fax -Returns information about fax +Returns information about a Fax ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling FaxApi#faxGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -221,32 +258,45 @@ public class Example { Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling FaxApi#faxList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -262,8 +312,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **page** | **Integer**| Page | [optional] [default to 1] - **pageSize** | **Integer**| Page size | [optional] [default to 20] + **page** | **Integer**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] ### Return type @@ -291,41 +341,56 @@ public class Example { Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; 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); +import java.util.Map; + +public class FaxSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxSendRequest = new FaxSendRequest(); + faxSendRequest.recipient("16690000001"); + faxSendRequest.sender("16690000000"); + faxSendRequest.testMode(true); + faxSendRequest.coverPageTo("Jill Fax"); + faxSendRequest.coverPageFrom("Faxer Faxerson"); + faxSendRequest.coverPageMessage("I'm sending you a fax!"); + faxSendRequest.title("This is what the fax is about!"); + faxSendRequest.files(List.of ( + new File("./example_fax.pdf") + )); + + try + { + var response = new FaxApi(config).faxSend( + faxSendRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/FaxLineAddUserRequest.md b/sdks/java-v2/docs/FaxLineAddUserRequest.md index 1c9e997f9..4023bd024 100644 --- a/sdks/java-v2/docs/FaxLineAddUserRequest.md +++ b/sdks/java-v2/docs/FaxLineAddUserRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | | `accountId` | ```String``` | Account ID | | | `emailAddress` | ```String``` | Email address | | diff --git a/sdks/java-v2/docs/FaxLineApi.md b/sdks/java-v2/docs/FaxLineApi.md index 1997f1f12..79ccf8b93 100644 --- a/sdks/java-v2/docs/FaxLineApi.md +++ b/sdks/java-v2/docs/FaxLineApi.md @@ -25,29 +25,43 @@ Grants a user access to the specified Fax Line. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineAddUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineAddUser(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineAddUserRequest = new FaxLineAddUserRequest(); + faxLineAddUserRequest.number("[FAX_NUMBER]"); + faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineAddUser( + faxLineAddUserRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -91,30 +105,47 @@ public class Example { Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA"); - System.out.println(result); +import java.util.Map; + +public class FaxLineAreaCodeGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineAreaCodeGet( + "US", // country + null, // state + null, // province + null // city + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -130,10 +161,10 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **country** | **String**| Filter area codes by country. | [enum: CA, US, UK] - **state** | **String**| Filter area codes by state. | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] - **province** | **String**| Filter area codes by province. | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] - **city** | **String**| Filter area codes by city. | [optional] + **country** | **String**| Filter area codes by country | [enum: CA, US, UK] + **state** | **String**| Filter area codes by state | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] + **province** | **String**| Filter area codes by province | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] + **city** | **String**| Filter area codes by city | [optional] ### Return type @@ -161,34 +192,48 @@ public class Example { Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineCreateRequest() - .areaCode(209) - .country("US"); - - try { - FaxLineResponse result = faxLineApi.faxLineCreate(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineCreateRequest = new FaxLineCreateRequest(); + faxLineCreateRequest.areaCode(209); + faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); + + try + { + var response = new FaxLineApi(config).faxLineCreate( + faxLineCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -237,27 +282,40 @@ Deletes the specified Fax Line from the subscription. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineDeleteRequest() - .number("[FAX_NUMBER]"); - - try { - faxLineApi.faxLineDelete(data); +import java.util.Map; + +public class FaxLineDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineDeleteRequest = new FaxLineDeleteRequest(); + faxLineDeleteRequest.number("[FAX_NUMBER]"); + + try + { + new FaxLineApi(config).faxLineDelete( + faxLineDeleteRequest + ); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -306,25 +364,39 @@ Returns the properties and settings of a Fax Line. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineResponse result = faxLineApi.faxLineGet("[FAX_NUMBER]"); - System.out.println(result); +import java.util.Map; + +public class FaxLineGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineGet( + "123-123-1234" // number + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -340,7 +412,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| - **number** | **String**| The Fax Line number. | + **number** | **String**| The Fax Line number | ### Return type @@ -373,25 +445,42 @@ Returns the properties and settings of multiple Fax Lines. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - try { - FaxLineListResponse result = faxLineApi.faxLineList(); - System.out.println(result); +import java.util.Map; + +public class FaxLineListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + null // showTeamLines + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -408,9 +497,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| **accountId** | **String**| Account ID | [optional] - **page** | **Integer**| Page | [optional] [default to 1] - **pageSize** | **Integer**| Page size | [optional] [default to 20] - **showTeamLines** | **Boolean**| Show team lines | [optional] + **page** | **Integer**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + **showTeamLines** | **Boolean**| Include Fax Lines belonging to team members in the list | [optional] ### Return type @@ -438,34 +527,48 @@ public class Example { Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - var faxLineApi = new FaxLineApi(apiClient); - - var data = new FaxLineRemoveUserRequest() - .number("[FAX_NUMBER]") - .emailAddress("member@dropboxsign.com"); - - try { - FaxLineResponse result = faxLineApi.faxLineRemoveUser(data); - System.out.println(result); +import java.util.Map; + +public class FaxLineRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); + faxLineRemoveUserRequest.number("[FAX_NUMBER]"); + faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineRemoveUser( + faxLineRemoveUserRequest + ); + + System.out.println(response); } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/FaxLineCreateRequest.md b/sdks/java-v2/docs/FaxLineCreateRequest.md index da9ba3953..7fd1be6bf 100644 --- a/sdks/java-v2/docs/FaxLineCreateRequest.md +++ b/sdks/java-v2/docs/FaxLineCreateRequest.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `areaCode`*_required_ | ```Integer``` | Area code | | -| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country | | -| `city` | ```String``` | City | | -| `accountId` | ```String``` | Account ID | | +| `areaCode`*_required_ | ```Integer``` | Area code of the new Fax Line | | +| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country of the area code | | +| `city` | ```String``` | City of the area code | | +| `accountId` | ```String``` | Account ID of the account that will be assigned this new Fax Line | | diff --git a/sdks/java-v2/docs/FaxLineDeleteRequest.md b/sdks/java-v2/docs/FaxLineDeleteRequest.md index de1748fa1..4b45b339f 100644 --- a/sdks/java-v2/docs/FaxLineDeleteRequest.md +++ b/sdks/java-v2/docs/FaxLineDeleteRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | diff --git a/sdks/java-v2/docs/FaxLineRemoveUserRequest.md b/sdks/java-v2/docs/FaxLineRemoveUserRequest.md index 51d81b8fa..8e55d572d 100644 --- a/sdks/java-v2/docs/FaxLineRemoveUserRequest.md +++ b/sdks/java-v2/docs/FaxLineRemoveUserRequest.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number. | | -| `accountId` | ```String``` | Account ID | | -| `emailAddress` | ```String``` | Email address | | +| `number`*_required_ | ```String``` | The Fax Line number | | +| `accountId` | ```String``` | Account ID of the user to remove access | | +| `emailAddress` | ```String``` | Email address of the user to remove access | | diff --git a/sdks/java-v2/docs/FaxSendRequest.md b/sdks/java-v2/docs/FaxSendRequest.md index 5b939a0af..65b105756 100644 --- a/sdks/java-v2/docs/FaxSendRequest.md +++ b/sdks/java-v2/docs/FaxSendRequest.md @@ -8,13 +8,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```String``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```List``` | Fax File to Send | | -| `fileUrls` | ```List``` | Fax File URL to Send | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `testMode` | ```Boolean``` | API Test Mode Setting | | -| `coverPageTo` | ```String``` | Fax Cover Page for Recipient | | -| `coverPageFrom` | ```String``` | Fax Cover Page for Sender | | +| `coverPageTo` | ```String``` | Fax cover page recipient information | | +| `coverPageFrom` | ```String``` | Fax cover page sender information | | | `coverPageMessage` | ```String``` | Fax Cover Page Message | | | `title` | ```String``` | Fax Title | | diff --git a/sdks/java-v2/docs/OAuthApi.md b/sdks/java-v2/docs/OAuthApi.md index a2eaa2508..aab2b9456 100644 --- a/sdks/java-v2/docs/OAuthApi.md +++ b/sdks/java-v2/docs/OAuthApi.md @@ -20,29 +20,45 @@ Once you have retrieved the code from the user callback, you will need to exchan ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenGenerateRequest() - .state("900e06e2") - .code("1b0d28d90c86c141") - .clientId("cc91c61d00f8bb2ece1428035716b") - .clientSecret("1d14434088507ffa390e6f5528465"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenGenerate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenGenerateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); + oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); + oAuthTokenGenerateRequest.state("900e06e2"); + oAuthTokenGenerateRequest.grantType("authorization_code"); + + try + { + var response = new OAuthApi(config).oauthTokenGenerate( + oAuthTokenGenerateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -91,26 +107,42 @@ Access tokens are only valid for a given period of time (typically one hour) for ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient(); - - var oAuthApi = new OAuthApi(apiClient); - - var data = new OAuthTokenRefreshRequest() - .refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - - try { - OAuthTokenResponse result = oAuthApi.oauthTokenRefresh(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenRefreshExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); + oAuthTokenRefreshRequest.grantType("refresh_token"); + oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + + try + { + var response = new OAuthApi(config).oauthTokenRefresh( + oAuthTokenRefreshRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/ReportApi.md b/sdks/java-v2/docs/ReportApi.md index e0a409741..cadac49ae 100644 --- a/sdks/java-v2/docs/ReportApi.md +++ b/sdks/java-v2/docs/ReportApi.md @@ -21,40 +21,47 @@ When the report(s) have been generated, you will receive an email (one per reque ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var reportApi = new ReportApi(apiClient); - - var data = new ReportCreateRequest() - .startDate("09/01/2020") - .endDate("09/01/2020") - .reportType(List.of( - ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, - ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS - )); - - try { - ReportCreateResponse result = reportApi.reportCreate(data); - System.out.println(result); +import java.util.Map; + +public class ReportCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var reportCreateRequest = new ReportCreateRequest(); + reportCreateRequest.startDate("09/01/2020"); + reportCreateRequest.endDate("09/01/2020"); + reportCreateRequest.reportType(List.of ( + ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, + ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS + )); + + try + { + var response = new ReportApi(config).reportCreate( + reportCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling ReportApi#reportCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/SignatureRequestApi.md b/sdks/java-v2/docs/SignatureRequestApi.md index 60e02426f..96034a20b 100644 --- a/sdks/java-v2/docs/SignatureRequestApi.md +++ b/sdks/java-v2/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to *https://api.hellosign.com/v3* [**signatureRequestCancel**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request [**signatureRequestCreateEmbedded**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request [**signatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +[**signatureRequestEdit**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +[**signatureRequestEditEmbedded**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +[**signatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +[**signatureRequestEditWithTemplate**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template [**signatureRequestFiles**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files [**signatureRequestFilesAsDataUri**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri [**signatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url @@ -36,72 +40,107 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC().role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -152,72 +191,107 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signerList1Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com") - .pin("d79a3td"); - - var signerList1CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("ABC Corp"); - - var signerList1 = new SubBulkSignerList() - .signers(List.of(signerList1Signer)) - .customFields(List.of(signerList1CustomFields)); - - var signerList2Signer = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("Mary") - .emailAddress("mary@example.com") - .pin("gd9as5b"); - - var signerList2CustomFields = new SubBulkSignerListCustomField() - .name("company") - .value("123 Corp"); - - var signerList2 = new SubBulkSignerList() - .signers(List.of(signerList2Signer)) - .customFields(List.of(signerList2CustomFields)); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new SignatureRequestBulkSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signerList(List.of(signerList1, signerList2)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - BulkSendJobSendResponse result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); - System.out.println(result); +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); + signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkSendWithTemplateRequest.testMode(true); + signatureRequestBulkSendWithTemplateRequest.signerList(signerList); + signatureRequestBulkSendWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -274,30 +348,38 @@ To be eligible for cancelation, a signature request must have been sent successf ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - signatureRequestApi.signatureRequestCancel(signatureRequestId); +public class SignatureRequestCancelExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new SignatureRequestApi(config).signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -346,61 +428,78 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbedded(data); - System.out.println(result); +public class SignatureRequestCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -449,52 +548,67 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .name("George"); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestCreateEmbeddedWithTemplateRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .signingOptions(subSigningOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); + signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -532,6 +646,504 @@ public class Example { | **4XX** | failed_operation | - | +## signatureRequestEdit + +> SignatureRequestGetResponse signatureRequestEdit(signatureRequestId, signatureRequestEditRequest) + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditEmbedded + +> SignatureRequestGetResponse signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest) + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditEmbeddedWithTemplate + +> SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); + signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + +## signatureRequestEditWithTemplate + +> SignatureRequestGetResponse signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest) + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); + signatureRequestEditWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditWithTemplateRequest.testMode(true); + signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditWithTemplateRequest.signers(signers); + signatureRequestEditWithTemplateRequest.ccs(ccs); + signatureRequestEditWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + + ## signatureRequestFiles > File signatureRequestFiles(signatureRequestId, fileType) @@ -545,33 +1157,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - - try { - File result = signatureRequestApi.signatureRequestFiles(signatureRequestId, "pdf"); - result.renameTo(new File("file_response.pdf")); +public class SignatureRequestFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf" // fileType + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -623,32 +1242,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - FileResponseDataUri result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -699,32 +1326,41 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1 // forceDownload + ); - try { - FileResponse result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -774,32 +1410,40 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +public class SignatureRequestGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestGet(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -850,40 +1494,43 @@ Take a look at our [search guide](/api/reference/search/) to learn more about qu ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var accountId = "accountId"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - SignatureRequestListResponse result = signatureRequestApi.signatureRequestList( - accountId, - page, - pageSize, - query +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestList( + null, // accountId + 1, // page + 20, // pageSize + null // query ); - System.out.println(result); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -935,32 +1582,40 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +public class SignatureRequestReleaseHoldExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1011,35 +1666,44 @@ Sends an email to the signer reminding them to sign the signature request. You c ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var data = new SignatureRequestRemindRequest() - .emailAddress("john@example.com"); +public class SignatureRequestRemindExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); + signatureRequestRemindRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1093,30 +1757,37 @@ Unlike /signature_request/cancel, this endpoint is synchronous and your access w ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - signatureRequestApi.signatureRequestRemove(signatureRequestId); +public class SignatureRequestRemoveExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + + try + { + new SignatureRequestApi(config).signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1165,66 +1836,87 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubSignatureRequestSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(true) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new SignatureRequestSendRequest() - .title("NDA with Acme Co.") - .subject("The NDA we talked about") - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(signingOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSend(data); - System.out.println(result); +public class SignatureRequestSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1273,64 +1965,86 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signer1 = new SubSignatureRequestTemplateSigner() - .role("Client") - .emailAddress("george@example.com") - .name("George"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@emaple.com"); - - var customField1 = new SubCustomField() - .name("Cost") - .value("$20,000") - .editor("Client") - .required(true); - - var signingOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var data = new SignatureRequestSendWithTemplateRequest() - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .subject("Purchase Order") - .message("Glad we could come to an agreement.") - .signers(List.of(signer1)) - .ccs(List.of(cc1)) - .customFields(List.of(customField1)) - .signingOptions(signingOptions) - .testMode(true); - - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestSendWithTemplate(data); - System.out.println(result); +public class SignatureRequestSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); + signatureRequestSendWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestSendWithTemplateRequest.testMode(true); + signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); + signatureRequestSendWithTemplateRequest.signers(signers); + signatureRequestSendWithTemplateRequest.ccs(ccs); + signatureRequestSendWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1383,36 +2097,45 @@ Updating the email address of a signer will generate a new `signature_id` value. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var signatureRequestApi = new SignatureRequestApi(apiClient); - - var signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - var data = new SignatureRequestUpdateRequest() - .emailAddress("john@example.com") - .signatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); +public class SignatureRequestUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); + signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); + signatureRequestUpdateRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest + ); - try { - SignatureRequestGetResponse result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); - System.out.println(result); + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/java-v2/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..dd8b06061 --- /dev/null +++ b/sdks/java-v2/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,37 @@ + + +# SignatureRequestEditEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v2/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/java-v2/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..3cc3dee72 --- /dev/null +++ b/sdks/java-v2/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,28 @@ + + +# SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | + + + diff --git a/sdks/java-v2/docs/SignatureRequestEditRequest.md b/sdks/java-v2/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..7fa3aca65 --- /dev/null +++ b/sdks/java-v2/docs/SignatureRequestEditRequest.md @@ -0,0 +1,38 @@ + + +# SignatureRequestEditRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v2/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/java-v2/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..d079524b1 --- /dev/null +++ b/sdks/java-v2/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,29 @@ + + +# SignatureRequestEditWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v2/docs/SubFormFieldRuleAction.md b/sdks/java-v2/docs/SubFormFieldRuleAction.md index 6a2d43481..16928736e 100644 --- a/sdks/java-v2/docs/SubFormFieldRuleAction.md +++ b/sdks/java-v2/docs/SubFormFieldRuleAction.md @@ -19,8 +19,8 @@ | Name | Value | ---- | ----- -| FIELD_VISIBILITY | "change-field-visibility" | -| GROUP_VISIBILITY | "change-group-visibility" | +| CHANGE_FIELD_VISIBILITY | "change-field-visibility" | +| CHANGE_GROUP_VISIBILITY | "change-group-visibility" | diff --git a/sdks/java-v2/docs/TeamApi.md b/sdks/java-v2/docs/TeamApi.md index b35b40ea8..abb3f1ee0 100644 --- a/sdks/java-v2/docs/TeamApi.md +++ b/sdks/java-v2/docs/TeamApi.md @@ -28,35 +28,44 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamAddMemberRequest() - .emailAddress("george@example.com"); - - String teamId = null; - - try { - TeamGetResponse result = teamApi.teamAddMember(data, teamId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamAddMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -106,33 +115,43 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamCreateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamCreate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -181,28 +200,36 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - teamApi.teamDelete(); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TeamApi(config).teamDelete(); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -248,30 +275,38 @@ Returns information about your Team as well as a list of its members. If you do ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetResponse result = teamApi.teamGet(); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamGet(); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -317,28 +352,38 @@ Provides information about a team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - try { - TeamGetInfoResponse result = teamApi.teamInfo(); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInfoExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamInfo"); System.err.println("Status code: " + e.getCode()); @@ -389,32 +434,40 @@ Provides a list of team invites (and their roles). ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var emailAddress = "user@dropboxsign.com"; - - try { - TeamInvitesResponse result = teamApi.teamInvites(emailAddress); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInvitesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInvites( + null // emailAddress + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); + System.err.println("Exception when calling TeamApi#teamInvites"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -463,32 +516,40 @@ Provides a paginated list of members (and their roles) that belong to a given te ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamMembersResponse result = teamApi.teamMembers(teamId, page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamMembersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamMembers"); System.err.println("Status code: " + e.getCode()); @@ -541,34 +602,44 @@ Removes the provided user Account from your Team. If the Account had an outstand ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamRemoveMemberRequest() - .emailAddress("teammate@dropboxsign.com") - .newOwnerEmailAddress("new_teammate@dropboxsign.com"); - - try { - TeamGetResponse result = teamApi.teamRemoveMember(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamRemoveMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -617,32 +688,40 @@ Provides a paginated list of sub teams that belong to a given team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - var page = 1; - var pageSize = 20; - - try { - TeamSubTeamsResponse result = teamApi.teamSubTeams(teamId, page, pageSize); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamSubTeamsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TeamApi#teamSubTeams"); System.err.println("Status code: " + e.getCode()); @@ -695,33 +774,43 @@ Updates the name of your Team. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var teamApi = new TeamApi(apiClient); - - var data = new TeamUpdateRequest() - .name("New Team Name"); - - try { - TeamGetResponse result = teamApi.teamUpdate(data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TeamApi#teamUpdate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/TemplateApi.md b/sdks/java-v2/docs/TemplateApi.md index e6c7d1745..dd470487b 100644 --- a/sdks/java-v2/docs/TemplateApi.md +++ b/sdks/java-v2/docs/TemplateApi.md @@ -29,35 +29,44 @@ Gives the specified Account access to the specified Template. The specified Acco ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateAddUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateAddUser(templateId, data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateAddUserRequest = new TemplateAddUserRequest(); + templateAddUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateAddUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -107,64 +116,119 @@ Creates a template that can then be used. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateResponse result = templateApi.templateCreate(data); - System.out.println(result); +import java.util.Map; + +public class TemplateCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -213,64 +277,85 @@ The first step in an embedded template workflow. Creates a draft template that c ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; - -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var role1 = new SubTemplateRole() - .name("Client") - .order(0); - - var role2 = new SubTemplateRole() - .name("Witness") - .order(1); - - var mergeField1 = new SubMergeField() - .name("Full Name") - .type(SubMergeField.TypeEnum.TEXT); - - var mergeField2 = new SubMergeField() - .name("Is Registered?") - .type(SubMergeField.TypeEnum.CHECKBOX); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DDMMYYYY); - - var data = new TemplateCreateEmbeddedDraftRequest() - .clientId("37dee8d8440c66d54cfa05d92c160882") - .addFilesItem(new File("example_signature_request.pdf")) - .title("Test Template") - .subject("Please sign this document") - .message("For your approval") - .signerRoles(List.of(role1, role2)) - .ccRoles(List.of("Manager")) - .mergeFields(List.of(mergeField1, mergeField2)) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - TemplateCreateEmbeddedDraftResponse result = templateApi.templateCreateEmbeddedDraft(data); - System.out.println(result); +import java.util.Map; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -319,30 +404,38 @@ Completely deletes the template specified from the account. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - templateApi.templateDelete(templateId); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + new TemplateApi(config).templateDelete( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -393,33 +486,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - File result = templateApi.templateFiles(templateId, "pdf"); - result.renameTo(new File("file_response.pdf")); +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + null // fileType + ); + response.renameTo(new File("./file_response")); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -471,32 +571,40 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponseDataUri result = templateApi.templateFilesAsDataUri(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -547,32 +655,41 @@ If the files are currently being prepared, a status code of `409` will be return ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - FileResponse result = templateApi.templateFilesAsFileUrl(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1 // forceDownload + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -622,32 +739,40 @@ Returns the Template specified by the `template_id` parameter. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var templateId = "f57db65d3f933b5316d398057a36176831451a35"; - - try { - TemplateGetResponse result = templateApi.templateGet(templateId); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateGet( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -698,35 +823,43 @@ Take a look at our [search guide](/api/reference/search/) to learn more about qu ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var accountId = "f57db65d3f933b5316d398057a36176831451a35"; - var page = 1; - var pageSize = 20; - String query = null; - - try { - TemplateListResponse result = templateApi.templateList(accountId, page, pageSize, query); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateList"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -778,35 +911,44 @@ Removes the specified Account's access to the specified Template. ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateRemoveUserRequest() - .emailAddress("george@dropboxsign.com"); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateGetResponse result = templateApi.templateRemoveUser(templateId, data); - System.out.println(result); +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateRemoveUserRequest = new TemplateRemoveUserRequest(); + templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateRemoveUser"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -867,37 +1009,46 @@ If the page orientation or page count is different from the original template do ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; 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"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var templateApi = new TemplateApi(apiClient); - - var data = new TemplateUpdateFilesRequest() - .addFilesItem(new File("example_signature_request.pdf")); - - var templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - - try { - TemplateUpdateFilesResponse result = templateApi.templateUpdateFiles(templateId, data); - System.out.println(result); +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateUpdateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); + templateUpdateFilesRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new TemplateApi(config).templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/docs/UnclaimedDraftApi.md b/sdks/java-v2/docs/UnclaimedDraftApi.md index 4d6d12451..3f4dadabd 100644 --- a/sdks/java-v2/docs/UnclaimedDraftApi.md +++ b/sdks/java-v2/docs/UnclaimedDraftApi.md @@ -22,66 +22,57 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer1 = new SubUnclaimedDraftSigner() - .emailAddress("jack@example.com") - .name("Jack") - .order(0); - - var signer2 = new SubUnclaimedDraftSigner() - .emailAddress("jill@example.com") - .name("Jill") - .order(1); - - var subSigningOptions = new SubSigningOptions() - .draw(true) - .type(true) - .upload(true) - .phone(false) - .defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - - var subFieldOptions = new SubFieldOptions() - .dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var data = new UnclaimedDraftCreateRequest() - .subject("The NDA we talked about") - .type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE) - .message("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - .signers(List.of(signer1, signer2)) - .ccEmailAddresses(List.of("lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com")) - .addFilesItem(new File("example_signature_request.pdf")) - .metadata(Map.of("custom_id", 1234, "custom_text", "NDA #9")) - .signingOptions(subSigningOptions) - .fieldOptions(subFieldOptions) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreate(data); - System.out.println(result); +public class UnclaimedDraftCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var signers1 = new SubUnclaimedDraftSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(true); + unclaimedDraftCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + unclaimedDraftCreateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -132,38 +123,48 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftCreateEmbeddedRequest() - .clientId("ec64a202072370a737edf4a0eb7f4437") - .addFilesItem(new File("example_signature_request.pdf")) - .requesterEmailAddress("jack@dropboxsign.com") - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); - System.out.println(result); +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(true); + unclaimedDraftCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -214,49 +215,67 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.List; +import java.util.Map; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var signer = new SubUnclaimedDraftTemplateSigner() - .role("Client") - .name("George") - .emailAddress("george@example.com"); - - var cc1 = new SubCC() - .role("Accounting") - .emailAddress("accouting@email.com"); - - var data = new UnclaimedDraftCreateEmbeddedWithTemplateRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .templateIds(List.of("c26b8a16784a872da37ea946b9ddec7c1e11dff6")) - .requesterEmailAddress("jack@dropboxsign.com") - .signers(List.of(signer)) - .ccs(List.of(cc1)) - .testMode(true); - - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); - System.out.println(result); +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@dropboxsign.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signers1 = new SubUnclaimedDraftTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); + unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); + unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); + unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -307,36 +326,45 @@ Creates a new signature request from an embedded request that can be edited prio ### Example ```java +package com.dropbox.sign_sandbox; + import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; -public class Example { - public static void main(String[] args) { - var apiClient = Configuration.getDefaultApiClient() - .setApiKey("YOUR_API_KEY"); - - // or, configure Bearer (JWT) authorization: oauth2 - /* - var apiClient = Configuration.getDefaultApiClient() - .setBearerToken("YOUR_ACCESS_TOKEN"); - */ - - var unclaimedDraftApi = new UnclaimedDraftApi(apiClient); - - var data = new UnclaimedDraftEditAndResendRequest() - .clientId("1a659d9ad95bccd307ecad78d72192f8") - .testMode(true); - - var signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; - try { - UnclaimedDraftCreateResponse result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); - System.out.println(result); +public class UnclaimedDraftEditAndResendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); + // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); + unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftEditAndResendRequest.testMode(false); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest + ); + + System.out.println(response); } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/sdks/java-v2/gradle.properties b/sdks/java-v2/gradle.properties index 1f08bfd5f..be029dcab 100644 --- a/sdks/java-v2/gradle.properties +++ b/sdks/java-v2/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=2.4-dev +VERSION_NAME=2.4.1-dev 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/sdks/java-v2/openapi-config.yaml b/sdks/java-v2/openapi-config.yaml index 44bc2c133..8b6cf3974 100644 --- a/sdks/java-v2/openapi-config.yaml +++ b/sdks/java-v2/openapi-config.yaml @@ -18,7 +18,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "2.4-dev" + artifactVersion: "2.4.1-dev" 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 @@ -28,6 +28,10 @@ additionalProperties: licenseUrl: https://www.opensource.org/licenses/mit-license.php useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.package: com.dropbox.sign_sandbox + oseg.printApiCallProperty: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-EventCallbackHelper.mustache: templateType: SupportingFiles diff --git a/sdks/java-v2/pom.xml b/sdks/java-v2/pom.xml index f5ef2ad0e..29c230a40 100644 --- a/sdks/java-v2/pom.xml +++ b/sdks/java-v2/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 2.4-dev + 2.4.1-dev 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! @@ -334,6 +334,7 @@ jersey-apache-connector ${jersey-version}
+ org.junit.jupiter @@ -355,6 +356,7 @@ 2.17.1 0.2.6 2.1.1 + 3.0.2 5.10.0 2.21.0 3.12.4 diff --git a/sdks/java-v2/run-build b/sdks/java-v2/run-build index 778da00da..2831739d6 100755 --- a/sdks/java-v2/run-build +++ b/sdks/java-v2/run-build @@ -18,7 +18,7 @@ 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 \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -47,6 +47,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java index 6e98226ae..ff86f745a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiClient.java @@ -84,7 +84,7 @@ /** *

ApiClient class.

*/ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiClient extends JavaTimeFormatter { private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); @@ -159,7 +159,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.4-dev/java"); + setUserAgent("OpenAPI-Generator/2.4.1-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); @@ -807,24 +807,10 @@ public Entity serialize(Object obj, Map formParams, String co if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -853,6 +839,36 @@ public Entity serialize(Object obj, Map formParams, String co return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1143,7 +1159,11 @@ private Response sendRequest(String method, Invocation.Builder invocationBuilder } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiException.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiException.java index 2d61576a1..bb5104058 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/ApiException.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/ApiException.java @@ -20,7 +20,7 @@ /** * API Exception */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v2/src/main/java/com/dropbox/sign/Configuration.java index 69b20c70d..4c6edd1a1 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/Configuration.java @@ -13,11 +13,11 @@ package com.dropbox.sign; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Configuration { - public static final String VERSION = "2.4-dev"; + public static final String VERSION = "2.4.1-dev"; - private static ApiClient defaultApiClient = new ApiClient(); + private static volatile ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/EventCallbackHelper.java b/sdks/java-v2/src/main/java/com/dropbox/sign/EventCallbackHelper.java index 2470e2ba2..837f2118c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/EventCallbackHelper.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/EventCallbackHelper.java @@ -18,7 +18,7 @@ import org.apache.commons.codec.digest.HmacAlgorithms; import org.apache.commons.codec.digest.HmacUtils; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EventCallbackHelper { public static final String EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v2/src/main/java/com/dropbox/sign/JSON.java index 68a3518c5..feb72da5e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/JSON.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/JSON.java @@ -17,7 +17,6 @@ import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.dropbox.sign.model.*; import java.text.DateFormat; import java.util.HashMap; @@ -27,7 +26,7 @@ import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.ext.ContextResolver; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class JSON implements ContextResolver { private ObjectMapper mapper; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/JavaTimeFormatter.java b/sdks/java-v2/src/main/java/com/dropbox/sign/JavaTimeFormatter.java index f91775be0..b9cf82bd9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/JavaTimeFormatter.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/JavaTimeFormatter.java @@ -20,7 +20,7 @@ * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class JavaTimeFormatter { private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/Pair.java b/sdks/java-v2/src/main/java/com/dropbox/sign/Pair.java index 271555c5e..8172fd6a8 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/Pair.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/Pair.java @@ -13,7 +13,7 @@ package com.dropbox.sign; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Pair { private String name = ""; private String value = ""; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/RFC3339DateFormat.java b/sdks/java-v2/src/main/java/com/dropbox/sign/RFC3339DateFormat.java index df3000348..2f9033641 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/RFC3339DateFormat.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/RFC3339DateFormat.java @@ -22,7 +22,7 @@ import java.util.GregorianCalendar; import java.util.TimeZone; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class RFC3339DateFormat extends DateFormat { private static final long serialVersionUID = 1L; private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ServerConfiguration.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ServerConfiguration.java index cb85f1c74..e94793271 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/ServerConfiguration.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/ServerConfiguration.java @@ -18,7 +18,7 @@ /** * Representing a Server configuration. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ServerConfiguration { public String URL; public String description; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/ServerVariable.java b/sdks/java-v2/src/main/java/com/dropbox/sign/ServerVariable.java index c40ffb456..f45333cad 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/ServerVariable.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/ServerVariable.java @@ -18,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/StringUtil.java b/sdks/java-v2/src/main/java/com/dropbox/sign/StringUtil.java index f3bd08f2b..246fae55d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/StringUtil.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java index 95a5a8a9c..3981d8dee 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class AccountApi { private ApiClient apiClient; @@ -53,13 +53,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Account. + * Create Account * Creates a new Dropbox Sign Account that is associated with the specified `email_address`. * @param accountCreateRequest (required) * @return AccountCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ @@ -71,13 +72,14 @@ public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateReq /** - * Create Account. + * Create Account * Creates a new Dropbox Sign Account that is associated with the specified `email_address`. * @param accountCreateRequest (required) * @return ApiResponse<AccountCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -114,14 +116,15 @@ public ApiResponse accountCreateWithHttpInfo(AccountCreat ); } /** - * Get Account. + * Get Account * Returns the properties and settings of your Account. * @param accountId `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) * @param emailAddress `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -172,14 +175,15 @@ public ApiResponse accountGetWithHttpInfo(String accountId) /** - * Get Account. + * Get Account * Returns the properties and settings of your Account. * @param accountId `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) * @param emailAddress `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -217,13 +221,14 @@ public ApiResponse accountGetWithHttpInfo(String accountId, ); } /** - * Update Account. + * Update Account * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * @param accountUpdateRequest (required) * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -235,13 +240,14 @@ public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateReques /** - * Update Account. + * Update Account * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * @param accountUpdateRequest (required) * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -278,13 +284,14 @@ public ApiResponse accountUpdateWithHttpInfo(AccountUpdateRe ); } /** - * Verify Account. + * Verify Account * Verifies whether an Dropbox Sign Account exists for the given email address. * @param accountVerifyRequest (required) * @return AccountVerifyResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -296,13 +303,14 @@ public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyReq /** - * Verify Account. + * Verify Account * Verifies whether an Dropbox Sign Account exists for the given email address. * @param accountVerifyRequest (required) * @return ApiResponse<AccountVerifyResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/ApiAppApi.java index 37ec596ea..813cf39c4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/ApiAppApi.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiAppApi { private ApiClient apiClient; @@ -51,13 +51,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create API App. + * Create API App * Creates a new API App. * @param apiAppCreateRequest (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -69,13 +70,14 @@ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) t /** - * Create API App. + * Create API App * Creates a new API App. * @param apiAppCreateRequest (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -112,12 +114,13 @@ public ApiResponse apiAppCreateWithHttpInfo(ApiAppCreateReque ); } /** - * Delete API App. + * Delete API App * Deletes an API App. Can only be invoked for apps you own. * @param clientId The client id of the API App to delete. (required) * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -129,13 +132,14 @@ public void apiAppDelete(String clientId) throws ApiException { /** - * Delete API App. + * Delete API App * Deletes an API App. Can only be invoked for apps you own. * @param clientId The client id of the API App to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -175,13 +179,14 @@ public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiExc ); } /** - * Get API App. + * Get API App * Returns an object with information about an API App. * @param clientId The client id of the API App to retrieve. (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -193,13 +198,14 @@ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { /** - * Get API App. + * Get API App * Returns an object with information about an API App. * @param clientId The client id of the API App to retrieve. (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -240,14 +246,15 @@ public ApiResponse apiAppGetWithHttpInfo(String clientId) thr ); } /** - * List API Apps. + * List API Apps * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. * @param page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiAppListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -298,14 +305,15 @@ public ApiResponse apiAppListWithHttpInfo(Integer page) thro /** - * List API Apps. + * List API Apps * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. * @param page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<ApiAppListResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -349,14 +357,15 @@ public ApiResponse apiAppListWithHttpInfo(Integer page, Inte ); } /** - * Update API App. + * Update API App * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. * @param clientId The client id of the API App to update. (required) * @param apiAppUpdateRequest (required) * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -368,14 +377,15 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp /** - * Update API App. + * Update API App * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. * @param clientId The client id of the API App to update. (required) * @param apiAppUpdateRequest (required) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java index 405caf753..098c28cce 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class BulkSendJobApi { private ApiClient apiClient; @@ -49,7 +49,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Bulk Send Job. + * Get Bulk Send Job * Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) @@ -57,7 +57,8 @@ public void setApiClient(ApiClient apiClient) { * @return BulkSendJobGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -108,7 +109,7 @@ public ApiResponse bulkSendJobGetWithHttpInfo(String bul /** - * Get Bulk Send Job. + * Get Bulk Send Job * Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) @@ -116,7 +117,8 @@ public ApiResponse bulkSendJobGetWithHttpInfo(String bul * @return ApiResponse<BulkSendJobGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -169,14 +171,15 @@ public ApiResponse bulkSendJobGetWithHttpInfo(String bul ); } /** - * List Bulk Send Jobs. + * List Bulk Send Jobs * Returns a list of BulkSendJob that you can access. * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * @return BulkSendJobListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -227,14 +230,15 @@ public ApiResponse bulkSendJobListWithHttpInfo(Integer /** - * List Bulk Send Jobs. + * List Bulk Send Jobs * Returns a list of BulkSendJob that you can access. * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * @return ApiResponse<BulkSendJobListResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/EmbeddedApi.java index 38c828e72..a847620d5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/EmbeddedApi.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class EmbeddedApi { private ApiClient apiClient; @@ -50,14 +50,15 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Embedded Template Edit URL. + * Get Embedded Template Edit URL * Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. * @param templateId The id of the template to edit. (required) * @param embeddedEditUrlRequest (required) * @return EmbeddedEditUrlResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -69,14 +70,15 @@ public EmbeddedEditUrlResponse embeddedEditUrl(String templateId, EmbeddedEditUr /** - * Get Embedded Template Edit URL. + * Get Embedded Template Edit URL * Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. * @param templateId The id of the template to edit. (required) * @param embeddedEditUrlRequest (required) * @return ApiResponse<EmbeddedEditUrlResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -120,13 +122,14 @@ public ApiResponse embeddedEditUrlWithHttpInfo(String t ); } /** - * Get Embedded Sign URL. + * Get Embedded Sign URL * Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. * @param signatureId The id of the signature to get a signature url for. (required) * @return EmbeddedSignUrlResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -138,13 +141,14 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc /** - * Get Embedded Sign URL. + * Get Embedded Sign URL * Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. * @param signatureId The id of the signature to get a signature url for. (required) * @return ApiResponse<EmbeddedSignUrlResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxApi.java index e010c8323..e438d0d03 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class FaxApi { private ApiClient apiClient; @@ -51,12 +51,13 @@ public void setApiClient(ApiClient apiClient) { } /** - * Delete Fax. - * Deletes the specified Fax from the system. + * 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 -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -68,13 +69,14 @@ public void faxDelete(String faxId) throws ApiException { /** - * Delete Fax. - * Deletes the specified Fax from the system. + * 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 -
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -114,13 +116,14 @@ public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException ); } /** - * List Fax Files. - * Returns list of fax files + * Download Fax Files + * Downloads files associated with a Fax * @param faxId Fax ID (required) * @return File * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -132,13 +135,14 @@ public File faxFiles(String faxId) throws ApiException { /** - * List Fax Files. - * Returns list of fax files + * Download Fax Files + * Downloads files associated with a Fax * @param faxId Fax ID (required) * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -179,13 +183,14 @@ public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException ); } /** - * Get Fax. - * Returns information about fax + * Get Fax + * Returns information about a Fax * @param faxId Fax ID (required) * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -197,13 +202,14 @@ public FaxGetResponse faxGet(String faxId) throws ApiException { /** - * Get Fax. - * Returns information about fax + * Get Fax + * Returns information about a Fax * @param faxId Fax ID (required) * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -244,14 +250,15 @@ public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiEx ); } /** - * Lists Faxes. - * Returns properties of multiple faxes - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) + * Lists Faxes + * Returns properties of multiple Faxes + * @param page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return FaxListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -302,14 +309,15 @@ public ApiResponse faxListWithHttpInfo(Integer page) throws Api /** - * Lists Faxes. - * Returns properties of multiple faxes - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) + * Lists Faxes + * Returns properties of multiple Faxes + * @param page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * @return ApiResponse<FaxListResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -353,13 +361,14 @@ public ApiResponse faxListWithHttpInfo(Integer page, Integer pa ); } /** - * Send Fax. - * Action to prepare and send a fax + * Send Fax + * Creates and sends a new Fax with the submitted file(s) * @param faxSendRequest (required) * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -371,13 +380,14 @@ public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException /** - * Send Fax. - * Action to prepare and send a fax + * Send Fax + * Creates and sends a new Fax with the submitted file(s) * @param faxSendRequest (required) * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java index 3555e15cd..2d6eb5a96 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class FaxLineApi { private ApiClient apiClient; @@ -54,13 +54,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Fax Line User. + * Add Fax Line User * Grants a user access to the specified Fax Line. * @param faxLineAddUserRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -72,13 +73,14 @@ public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserReques /** - * Add Fax Line User. + * Add Fax Line User * Grants a user access to the specified Fax Line. * @param faxLineAddUserRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -115,16 +117,17 @@ public ApiResponse faxLineAddUserWithHttpInfo(FaxLineAddUserReq ); } /** - * Get Available Fax Line Area Codes. - * Returns a response with the area codes available for a given state/provice and city. - * @param country Filter area codes by country. (required) - * @param state Filter area codes by state. (optional) - * @param province Filter area codes by province. (optional) - * @param city Filter area codes by city. (optional) + * Get Available Fax Line Area Codes + * Returns a list of available area codes for a given state/province and city + * @param country Filter area codes by country (required) + * @param state Filter area codes by state (optional) + * @param province Filter area codes by province (optional) + * @param city Filter area codes by city (optional) * @return FaxLineAreaCodeGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -197,16 +200,17 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo(St /** - * Get Available Fax Line Area Codes. - * Returns a response with the area codes available for a given state/provice and city. - * @param country Filter area codes by country. (required) - * @param state Filter area codes by state. (optional) - * @param province Filter area codes by province. (optional) - * @param city Filter area codes by city. (optional) + * Get Available Fax Line Area Codes + * Returns a list of available area codes for a given state/province and city + * @param country Filter area codes by country (required) + * @param state Filter area codes by state (optional) + * @param province Filter area codes by province (optional) + * @param city Filter area codes by city (optional) * @return ApiResponse<FaxLineAreaCodeGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -251,13 +255,14 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo(St ); } /** - * Purchase Fax Line. - * Purchases a new Fax Line. + * Purchase Fax Line + * Purchases a new Fax Line * @param faxLineCreateRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -269,13 +274,14 @@ public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) /** - * Purchase Fax Line. - * Purchases a new Fax Line. + * Purchase Fax Line + * Purchases a new Fax Line * @param faxLineCreateRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -312,12 +318,13 @@ public ApiResponse faxLineCreateWithHttpInfo(FaxLineCreateReque ); } /** - * Delete Fax Line. + * Delete Fax Line * Deletes the specified Fax Line from the subscription. * @param faxLineDeleteRequest (required) * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -329,13 +336,14 @@ public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiE /** - * Delete Fax Line. + * Delete Fax Line * Deletes the specified Fax Line from the subscription. * @param faxLineDeleteRequest (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -371,13 +379,14 @@ public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineD ); } /** - * Get Fax Line. + * Get Fax Line * Returns the properties and settings of a Fax Line. - * @param number The Fax Line number. (required) + * @param number The Fax Line number (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -389,13 +398,14 @@ public FaxLineResponse faxLineGet(String number) throws ApiException { /** - * Get Fax Line. + * Get Fax Line * Returns the properties and settings of a Fax Line. - * @param number The Fax Line number. (required) + * @param number The Fax Line number (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -437,16 +447,17 @@ public ApiResponse faxLineGetWithHttpInfo(String number) throws ); } /** - * List Fax Lines. + * List Fax Lines * Returns the properties and settings of multiple Fax Lines. * @param accountId Account ID (optional) - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) - * @param showTeamLines Show team lines (optional) + * @param page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) * @return FaxLineListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -543,16 +554,17 @@ public ApiResponse faxLineListWithHttpInfo(String accountId /** - * List Fax Lines. + * List Fax Lines * Returns the properties and settings of multiple Fax Lines. * @param accountId Account ID (optional) - * @param page Page (optional, default to 1) - * @param pageSize Page size (optional, default to 20) - * @param showTeamLines Show team lines (optional) + * @param page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) * @return ApiResponse<FaxLineListResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -598,13 +610,14 @@ public ApiResponse faxLineListWithHttpInfo(String accountId ); } /** - * Remove Fax Line Access. - * Removes a user's access to the specified Fax Line. + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line * @param faxLineRemoveUserRequest (required) * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -616,13 +629,14 @@ public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveU /** - * Remove Fax Line Access. - * Removes a user's access to the specified Fax Line. + * Remove Fax Line Access + * Removes a user's access to the specified Fax Line * @param faxLineRemoveUserRequest (required) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java index 4d881a94e..ddcaa24aa 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class OAuthApi { private ApiClient apiClient; @@ -50,13 +50,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * OAuth Token Generate. + * OAuth Token Generate * Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. * @param oauthTokenGenerateRequest (required) * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -68,13 +69,14 @@ public OAuthTokenResponse oauthTokenGenerate(OAuthTokenGenerateRequest oauthToke /** - * OAuth Token Generate. + * OAuth Token Generate * Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. * @param oauthTokenGenerateRequest (required) * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -110,13 +112,14 @@ public ApiResponse oauthTokenGenerateWithHttpInfo(OAuthToken ); } /** - * OAuth Token Refresh. + * OAuth Token Refresh * Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. * @param oauthTokenRefreshRequest (required) * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -128,13 +131,14 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR /** - * OAuth Token Refresh. + * OAuth Token Refresh * Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. * @param oauthTokenRefreshRequest (required) * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/ReportApi.java index 4ed2aaf0d..a9a590576 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/ReportApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/ReportApi.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ReportApi { private ApiClient apiClient; @@ -49,13 +49,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Report. + * Create Report * Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. * @param reportCreateRequest (required) * @return ReportCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -67,13 +68,14 @@ public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest /** - * Create Report. + * Create Report * Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. * @param reportCreateRequest (required) * @return ApiResponse<ReportCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java index 711191bc9..7d9564589 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java @@ -17,6 +17,10 @@ import com.dropbox.sign.model.SignatureRequestBulkSendWithTemplateRequest; import com.dropbox.sign.model.SignatureRequestCreateEmbeddedRequest; import com.dropbox.sign.model.SignatureRequestCreateEmbeddedWithTemplateRequest; +import com.dropbox.sign.model.SignatureRequestEditEmbeddedRequest; +import com.dropbox.sign.model.SignatureRequestEditEmbeddedWithTemplateRequest; +import com.dropbox.sign.model.SignatureRequestEditRequest; +import com.dropbox.sign.model.SignatureRequestEditWithTemplateRequest; import com.dropbox.sign.model.SignatureRequestGetResponse; import com.dropbox.sign.model.SignatureRequestListResponse; import com.dropbox.sign.model.SignatureRequestRemindRequest; @@ -30,7 +34,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class SignatureRequestApi { private ApiClient apiClient; @@ -61,13 +65,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Embedded Bulk Send with Template. + * Embedded Bulk Send with Template * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest (required) * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -79,13 +84,14 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate(Si /** - * Embedded Bulk Send with Template. + * Embedded Bulk Send with Template * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest (required) * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -122,13 +128,14 @@ public ApiResponse signatureRequestBulkCreateEmbeddedWi ); } /** - * Bulk Send with Template. + * Bulk Send with Template * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. * @param signatureRequestBulkSendWithTemplateRequest (required) * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -140,13 +147,14 @@ public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate(SignatureReq /** - * Bulk Send with Template. + * Bulk Send with Template * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. * @param signatureRequestBulkSendWithTemplateRequest (required) * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -183,12 +191,13 @@ public ApiResponse signatureRequestBulkSendWithTemplate ); } /** - * Cancel Incomplete Signature Request. + * Cancel Incomplete Signature Request * 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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -200,13 +209,14 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio /** - * Cancel Incomplete Signature Request. + * Cancel Incomplete Signature Request * 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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -246,13 +256,14 @@ public ApiResponse signatureRequestCancelWithHttpInfo(String signatureRequ ); } /** - * Create Embedded Signature Request. + * Create Embedded Signature Request * Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. * @param signatureRequestCreateEmbeddedRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -264,13 +275,14 @@ public SignatureRequestGetResponse signatureRequestCreateEmbedded(SignatureReque /** - * Create Embedded Signature Request. + * Create Embedded Signature Request * Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. * @param signatureRequestCreateEmbeddedRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -307,13 +319,14 @@ public ApiResponse signatureRequestCreateEmbeddedWi ); } /** - * Create Embedded Signature Request with Template. + * Create Embedded Signature Request with Template * Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. * @param signatureRequestCreateEmbeddedWithTemplateRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -325,13 +338,14 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate(Si /** - * Create Embedded Signature Request with Template. + * Create Embedded Signature Request with Template * Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. * @param signatureRequestCreateEmbeddedWithTemplateRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -368,14 +382,303 @@ public ApiResponse signatureRequestCreateEmbeddedWi ); } /** - * Download Files. + * Edit Signature Request + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEdit(String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) throws ApiException { + return signatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest).getData(); + } + + + /** + * Edit Signature Request + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditWithHttpInfo(String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestId' when calling signatureRequestEdit"); + } + if (signatureRequestEditRequest == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestEditRequest' when calling signatureRequestEdit"); + } + + // Path parameters + String localVarPath = "/signature_request/edit/{signature_request_id}" + .replaceAll("\\{signature_request_id}", apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEdit", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Edit Embedded Signature Request + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditEmbedded(String signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) throws ApiException { + return signatureRequestEditEmbeddedWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedRequest).getData(); + } + + + /** + * Edit Embedded Signature Request + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditEmbeddedWithHttpInfo(String signatureRequestId, SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestId' when calling signatureRequestEditEmbedded"); + } + if (signatureRequestEditEmbeddedRequest == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestEditEmbeddedRequest' when calling signatureRequestEditEmbedded"); + } + + // Path parameters + String localVarPath = "/signature_request/edit_embedded/{signature_request_id}" + .replaceAll("\\{signature_request_id}", apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditEmbeddedRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditEmbedded", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditEmbeddedRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Edit Embedded Signature Request with Template + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedWithTemplateRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate(String signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest) throws ApiException { + return signatureRequestEditEmbeddedWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest).getData(); + } + + + /** + * Edit Embedded Signature Request with Template + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditEmbeddedWithTemplateRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditEmbeddedWithTemplateWithHttpInfo(String signatureRequestId, SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest) throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestId' when calling signatureRequestEditEmbeddedWithTemplate"); + } + if (signatureRequestEditEmbeddedWithTemplateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' when calling signatureRequestEditEmbeddedWithTemplate"); + } + + // Path parameters + String localVarPath = "/signature_request/edit_embedded_with_template/{signature_request_id}" + .replaceAll("\\{signature_request_id}", apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditEmbeddedWithTemplateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditEmbeddedWithTemplate", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditEmbeddedWithTemplateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Edit Signature Request With Template + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditWithTemplateRequest (required) + * @return SignatureRequestGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public SignatureRequestGetResponse signatureRequestEditWithTemplate(String signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) throws ApiException { + return signatureRequestEditWithTemplateWithHttpInfo(signatureRequestId, signatureRequestEditWithTemplateRequest).getData(); + } + + + /** + * Edit Signature Request With Template + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @param signatureRequestId The id of the SignatureRequest to edit. (required) + * @param signatureRequestEditWithTemplateRequest (required) + * @return ApiResponse<SignatureRequestGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse signatureRequestEditWithTemplateWithHttpInfo(String signatureRequestId, SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) throws ApiException { + + // Check required parameters + if (signatureRequestId == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestId' when calling signatureRequestEditWithTemplate"); + } + if (signatureRequestEditWithTemplateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'signatureRequestEditWithTemplateRequest' when calling signatureRequestEditWithTemplate"); + } + + // Path parameters + String localVarPath = "/signature_request/edit_with_template/{signature_request_id}" + .replaceAll("\\{signature_request_id}", apiClient.escapeString(signatureRequestId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = signatureRequestEditWithTemplateRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "SignatureRequestApi.signatureRequestEditWithTemplate", + localVarPath, + "PUT", + new ArrayList<>(), + isFileTypeFound ? null : signatureRequestEditWithTemplateRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false + ); + } + /** + * Download Files * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to pdf) * @return File * @throws ApiException if fails to make API call * @http.response.details - +
+ @@ -406,14 +709,15 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque /** - * Download Files. + * Download Files * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to pdf) * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -462,13 +766,14 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque ); } /** - * Download Files as Data Uri. + * Download Files as Data Uri * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -480,13 +785,14 @@ public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureReques /** - * Download Files as Data Uri. + * Download Files as Data Uri * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -527,14 +833,15 @@ public ApiResponse signatureRequestFilesAsDataUriWithHttpIn ); } /** - * Download Files as File Url. + * Download Files as File Url * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -565,14 +872,15 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo(Stri /** - * Download Files as File Url. + * Download Files as File Url * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -621,13 +929,14 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo(Stri ); } /** - * Get Signature Request. + * Get Signature Request * Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -639,13 +948,14 @@ public SignatureRequestGetResponse signatureRequestGet(String signatureRequestId /** - * Get Signature Request. + * Get Signature Request * Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -686,7 +996,7 @@ public ApiResponse signatureRequestGetWithHttpInfo( ); } /** - * List Signature Requests. + * List Signature Requests * Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. * @param accountId Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) * @param page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) @@ -695,7 +1005,8 @@ public ApiResponse signatureRequestGetWithHttpInfo( * @return SignatureRequestListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -792,7 +1103,7 @@ public ApiResponse signatureRequestListWithHttpInf /** - * List Signature Requests. + * List Signature Requests * Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. * @param accountId Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) * @param page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) @@ -801,7 +1112,8 @@ public ApiResponse signatureRequestListWithHttpInf * @return ApiResponse<SignatureRequestListResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -847,13 +1159,14 @@ public ApiResponse signatureRequestListWithHttpInf ); } /** - * Release On-Hold Signature Request. + * Release On-Hold Signature Request * Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. * @param signatureRequestId The id of the SignatureRequest to release. (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -865,13 +1178,14 @@ public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureR /** - * Release On-Hold Signature Request. + * Release On-Hold Signature Request * Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. * @param signatureRequestId The id of the SignatureRequest to release. (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -912,14 +1226,15 @@ public ApiResponse signatureRequestReleaseHoldWithH ); } /** - * Send Request Reminder. + * Send Request Reminder * Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. * @param signatureRequestId The id of the SignatureRequest to send a reminder for. (required) * @param signatureRequestRemindRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -931,14 +1246,15 @@ public SignatureRequestGetResponse signatureRequestRemind(String signatureReques /** - * Send Request Reminder. + * Send Request Reminder * Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. * @param signatureRequestId The id of the SignatureRequest to send a reminder for. (required) * @param signatureRequestRemindRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -982,12 +1298,13 @@ public ApiResponse signatureRequestRemindWithHttpIn ); } /** - * Remove Signature Request Access. + * Remove Signature Request Access * Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. * @param signatureRequestId The id of the SignatureRequest to remove. (required) * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -999,13 +1316,14 @@ public void signatureRequestRemove(String signatureRequestId) throws ApiExceptio /** - * Remove Signature Request Access. + * Remove Signature Request Access * Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. * @param signatureRequestId The id of the SignatureRequest to remove. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1045,13 +1363,14 @@ public ApiResponse signatureRequestRemoveWithHttpInfo(String signatureRequ ); } /** - * Send Signature Request. + * Send Signature Request * Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. * @param signatureRequestSendRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1063,13 +1382,14 @@ public SignatureRequestGetResponse signatureRequestSend(SignatureRequestSendRequ /** - * Send Signature Request. + * Send Signature Request * Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. * @param signatureRequestSendRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1106,13 +1426,14 @@ public ApiResponse signatureRequestSendWithHttpInfo ); } /** - * Send with Template. + * Send with Template * Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. * @param signatureRequestSendWithTemplateRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1124,13 +1445,14 @@ public SignatureRequestGetResponse signatureRequestSendWithTemplate(SignatureReq /** - * Send with Template. + * Send with Template * Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. * @param signatureRequestSendWithTemplateRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1167,14 +1489,15 @@ public ApiResponse signatureRequestSendWithTemplate ); } /** - * Update Signature Request. + * Update Signature Request * Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. * @param signatureRequestId The id of the SignatureRequest to update. (required) * @param signatureRequestUpdateRequest (required) * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -1186,14 +1509,15 @@ public SignatureRequestGetResponse signatureRequestUpdate(String signatureReques /** - * Update Signature Request. + * Update Signature Request * Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. * @param signatureRequestId The id of the SignatureRequest to update. (required) * @param signatureRequestUpdateRequest (required) * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java index 17ca21e1f..ac28133ff 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class TeamApi { private ApiClient apiClient; @@ -56,14 +56,15 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Team. + * Add User to Team * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. * @param teamAddMemberRequest (required) * @param teamId The id of the team. (optional) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -94,14 +95,15 @@ public ApiResponse teamAddMemberWithHttpInfo(TeamAddMemberReque /** - * Add User to Team. + * Add User to Team * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. * @param teamAddMemberRequest (required) * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -143,13 +145,14 @@ public ApiResponse teamAddMemberWithHttpInfo(TeamAddMemberReque ); } /** - * Create Team. + * Create Team * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. * @param teamCreateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -161,13 +164,14 @@ public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws Ap /** - * Create Team. + * Create Team * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. * @param teamCreateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -204,11 +208,12 @@ public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest tea ); } /** - * Delete Team. + * Delete Team * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -220,12 +225,13 @@ public void teamDelete() throws ApiException { /** - * Delete Team. + * Delete Team * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -256,12 +262,13 @@ public ApiResponse teamDeleteWithHttpInfo() throws ApiException { ); } /** - * Get Team. + * Get Team * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -273,12 +280,13 @@ public TeamGetResponse teamGet() throws ApiException { /** - * Get Team. + * Get Team * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -310,13 +318,14 @@ public ApiResponse teamGetWithHttpInfo() throws ApiException { ); } /** - * Get Team Info. + * Get Team Info * Provides information about a team. * @param teamId The id of the team. (optional) * @return TeamGetInfoResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -347,13 +356,14 @@ public ApiResponse teamInfoWithHttpInfo() throws ApiExcepti /** - * Get Team Info. + * Get Team Info * Provides information about a team. * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetInfoResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -390,13 +400,14 @@ public ApiResponse teamInfoWithHttpInfo(String teamId) thro ); } /** - * List Team Invites. + * List Team Invites * Provides a list of team invites (and their roles). * @param emailAddress The email address for which to display the team invites. (optional) * @return TeamInvitesResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -427,13 +438,14 @@ public ApiResponse teamInvitesWithHttpInfo() throws ApiExce /** - * List Team Invites. + * List Team Invites * Provides a list of team invites (and their roles). * @param emailAddress The email address for which to display the team invites. (optional) * @return ApiResponse<TeamInvitesResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -470,7 +482,7 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr ); } /** - * List Team Members. + * List Team Members * Provides a paginated list of members (and their roles) that belong to a given team. * @param teamId The id of the team that a member list is being requested from. (required) * @param page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) @@ -478,7 +490,8 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr * @return TeamMembersResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -529,7 +542,7 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I /** - * List Team Members. + * List Team Members * Provides a paginated list of members (and their roles) that belong to a given team. * @param teamId The id of the team that a member list is being requested from. (required) * @param page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) @@ -537,7 +550,8 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I * @return ApiResponse<TeamMembersResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -590,13 +604,14 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I ); } /** - * Remove User from Team. + * Remove User from Team * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. * @param teamRemoveMemberRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -608,13 +623,14 @@ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMember /** - * Remove User from Team. + * Remove User from Team * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. * @param teamRemoveMemberRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -651,7 +667,7 @@ public ApiResponse teamRemoveMemberWithHttpInfo(TeamRemoveMembe ); } /** - * List Sub Teams. + * List Sub Teams * Provides a paginated list of sub teams that belong to a given team. * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) @@ -659,7 +675,8 @@ public ApiResponse teamRemoveMemberWithHttpInfo(TeamRemoveMembe * @return TeamSubTeamsResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -710,7 +727,7 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, /** - * List Sub Teams. + * List Sub Teams * Provides a paginated list of sub teams that belong to a given team. * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) @@ -718,7 +735,8 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, * @return ApiResponse<TeamSubTeamsResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -771,13 +789,14 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, ); } /** - * Update Team. + * Update Team * Updates the name of your Team. * @param teamUpdateRequest (required) * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -789,13 +808,14 @@ public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws Ap /** - * Update Team. + * Update Team * Updates the name of your Team. * @param teamUpdateRequest (required) * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java index c64166a85..974e61c40 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -29,7 +29,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class TemplateApi { private ApiClient apiClient; @@ -60,14 +60,15 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Template. + * Add User to Template * Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. * @param templateId The id of the Template to give the Account access to. (required) * @param templateAddUserRequest (required) * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -79,14 +80,15 @@ public TemplateGetResponse templateAddUser(String templateId, TemplateAddUserReq /** - * Add User to Template. + * Add User to Template * Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. * @param templateId The id of the Template to give the Account access to. (required) * @param templateAddUserRequest (required) * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -130,13 +132,14 @@ public ApiResponse templateAddUserWithHttpInfo(String templ ); } /** - * Create Template. + * Create Template * Creates a template that can then be used. * @param templateCreateRequest (required) * @return TemplateCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -148,13 +151,14 @@ public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreat /** - * Create Template. + * Create Template * Creates a template that can then be used. * @param templateCreateRequest (required) * @return ApiResponse<TemplateCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -191,13 +195,14 @@ public ApiResponse templateCreateWithHttpInfo(TemplateCr ); } /** - * Create Embedded Template Draft. + * Create Embedded Template Draft * The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. * @param templateCreateEmbeddedDraftRequest (required) * @return TemplateCreateEmbeddedDraftResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -209,13 +214,14 @@ public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft(TemplateC /** - * Create Embedded Template Draft. + * Create Embedded Template Draft * The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. * @param templateCreateEmbeddedDraftRequest (required) * @return ApiResponse<TemplateCreateEmbeddedDraftResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -252,12 +258,13 @@ public ApiResponse templateCreateEmbeddedDr ); } /** - * Delete Template. + * Delete Template * Completely deletes the template specified from the account. * @param templateId The id of the Template to delete. (required) * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -269,13 +276,14 @@ public void templateDelete(String templateId) throws ApiException { /** - * Delete Template. + * Delete Template * Completely deletes the template specified from the account. * @param templateId The id of the Template to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -315,14 +323,15 @@ public ApiResponse templateDeleteWithHttpInfo(String templateId) throws Ap ); } /** - * Get Template Files. + * Get Template Files * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) * @return File * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -353,14 +362,15 @@ public ApiResponse templateFilesWithHttpInfo(String templateId) throws Api /** - * Get Template Files. + * Get Template Files * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -406,13 +416,14 @@ public ApiResponse templateFilesWithHttpInfo(String templateId, String fil ); } /** - * Get Template Files as Data Uri. + * Get Template Files as Data Uri * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -424,13 +435,14 @@ public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiE /** - * Get Template Files as Data Uri. + * Get Template Files as Data Uri * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -471,14 +483,15 @@ public ApiResponse templateFilesAsDataUriWithHttpInfo(Strin ); } /** - * Get Template Files as File Url. + * Get Template Files as File Url * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -509,14 +522,15 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ /** - * Get Template Files as File Url. + * Get Template Files as File Url * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. * @param templateId The id of the template files to retrieve. (required) * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -565,13 +579,14 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ ); } /** - * Get Template. + * Get Template * Returns the Template specified by the `template_id` parameter. * @param templateId The id of the Template to retrieve. (required) * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -583,13 +598,14 @@ public TemplateGetResponse templateGet(String templateId) throws ApiException { /** - * Get Template. + * Get Template * Returns the Template specified by the `template_id` parameter. * @param templateId The id of the Template to retrieve. (required) * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -630,7 +646,7 @@ public ApiResponse templateGetWithHttpInfo(String templateI ); } /** - * List Templates. + * List Templates * Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. * @param accountId Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) * @param page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) @@ -639,7 +655,8 @@ public ApiResponse templateGetWithHttpInfo(String templateI * @return TemplateListResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -736,7 +753,7 @@ public ApiResponse templateListWithHttpInfo(String account /** - * List Templates. + * List Templates * Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. * @param accountId Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) * @param page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) @@ -745,7 +762,8 @@ public ApiResponse templateListWithHttpInfo(String account * @return ApiResponse<TemplateListResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -791,14 +809,15 @@ public ApiResponse templateListWithHttpInfo(String account ); } /** - * Remove User from Template. + * Remove User from Template * Removes the specified Account's access to the specified Template. * @param templateId The id of the Template to remove the Account's access to. (required) * @param templateRemoveUserRequest (required) * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -810,14 +829,15 @@ public TemplateGetResponse templateRemoveUser(String templateId, TemplateRemoveU /** - * Remove User from Template. + * Remove User from Template * Removes the specified Account's access to the specified Template. * @param templateId The id of the Template to remove the Account's access to. (required) * @param templateRemoveUserRequest (required) * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -861,14 +881,15 @@ public ApiResponse templateRemoveUserWithHttpInfo(String te ); } /** - * Update Template Files. + * Update Template Files * Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). * @param templateId The ID of the template whose files to update. (required) * @param templateUpdateFilesRequest (required) * @return TemplateUpdateFilesResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -880,14 +901,15 @@ public TemplateUpdateFilesResponse templateUpdateFiles(String templateId, Templa /** - * Update Template Files. + * Update Template Files * Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). * @param templateId The ID of the template whose files to update. (required) * @param templateUpdateFilesRequest (required) * @return ApiResponse<TemplateUpdateFilesResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java index fc3710e10..8416bd8d2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class UnclaimedDraftApi { private ApiClient apiClient; @@ -52,13 +52,14 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Unclaimed Draft. + * Create Unclaimed Draft * Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. * @param unclaimedDraftCreateRequest (required) * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -70,13 +71,14 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreate(UnclaimedDraftCreateReq /** - * Create Unclaimed Draft. + * Create Unclaimed Draft * Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. * @param unclaimedDraftCreateRequest (required) * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -113,13 +115,14 @@ public ApiResponse unclaimedDraftCreateWithHttpInf ); } /** - * Create Embedded Unclaimed Draft. + * Create Embedded Unclaimed Draft * Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param unclaimedDraftCreateEmbeddedRequest (required) * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -131,13 +134,14 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded(UnclaimedDraftC /** - * Create Embedded Unclaimed Draft. + * Create Embedded Unclaimed Draft * Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param unclaimedDraftCreateEmbeddedRequest (required) * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -174,13 +178,14 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit ); } /** - * Create Embedded Unclaimed Draft with Template. + * Create Embedded Unclaimed Draft with Template * Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param unclaimedDraftCreateEmbeddedWithTemplateRequest (required) * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -192,13 +197,14 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate(Unc /** - * Create Embedded Unclaimed Draft with Template. + * Create Embedded Unclaimed Draft with Template * Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param unclaimedDraftCreateEmbeddedWithTemplateRequest (required) * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -235,14 +241,15 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit ); } /** - * Edit and Resend Unclaimed Draft. + * Edit and Resend Unclaimed Draft * Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param signatureRequestId The ID of the signature request to edit and resend. (required) * @param unclaimedDraftEditAndResendRequest (required) * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ @@ -254,14 +261,15 @@ public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend(String signature /** - * Edit and Resend Unclaimed Draft. + * Edit and Resend Unclaimed Draft * Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. * @param signatureRequestId The ID of the signature request to edit and resend. (required) * @param unclaimedDraftEditAndResendRequest (required) * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details -
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/sdks/java-v2/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java index e68272c32..9b307290e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java index 3afe97bae..be2530ea2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java @@ -23,7 +23,7 @@ import java.util.Map; import java.util.List; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java index 8f3273d39..9dee1a64e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java index 759bf81d1..987a841c7 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java @@ -24,7 +24,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java index 9f12a6edc..cefd5b797 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java @@ -38,19 +38,23 @@ AccountCreateRequest.JSON_PROPERTY_CLIENT_SECRET, AccountCreateRequest.JSON_PROPERTY_LOCALE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountCreateRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + @jakarta.annotation.Nullable private String clientSecret; public static final String JSON_PROPERTY_LOCALE = "locale"; + @jakarta.annotation.Nullable private String locale; public AccountCreateRequest() { @@ -71,7 +75,7 @@ static public AccountCreateRequest init(HashMap data) throws Exception { ); } - public AccountCreateRequest emailAddress(String emailAddress) { + public AccountCreateRequest emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -91,12 +95,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public AccountCreateRequest clientId(String clientId) { + public AccountCreateRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -116,12 +120,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public AccountCreateRequest clientSecret(String clientSecret) { + public AccountCreateRequest clientSecret(@jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -141,12 +145,12 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } - public AccountCreateRequest locale(String locale) { + public AccountCreateRequest locale(@jakarta.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -166,7 +170,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@jakarta.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java index 08fd77369..00240b91d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java @@ -42,16 +42,19 @@ AccountCreateResponse.JSON_PROPERTY_OAUTH_DATA, AccountCreateResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountCreateResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; + @jakarta.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_OAUTH_DATA = "oauth_data"; + @jakarta.annotation.Nullable private OAuthTokenResponse oauthData; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public AccountCreateResponse() { @@ -72,7 +75,7 @@ static public AccountCreateResponse init(HashMap data) throws Exception { ); } - public AccountCreateResponse account(AccountResponse account) { + public AccountCreateResponse account(@jakarta.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -92,12 +95,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@jakarta.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountCreateResponse oauthData(OAuthTokenResponse oauthData) { + public AccountCreateResponse oauthData(@jakarta.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; return this; } @@ -117,12 +120,12 @@ public OAuthTokenResponse getOauthData() { @JsonProperty(JSON_PROPERTY_OAUTH_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthData(OAuthTokenResponse oauthData) { + public void setOauthData(@jakarta.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; } - public AccountCreateResponse warnings(List warnings) { + public AccountCreateResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -150,7 +153,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountGetResponse.java index 2a2fabc60..a37a29e3e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountGetResponse.java @@ -40,13 +40,15 @@ AccountGetResponse.JSON_PROPERTY_ACCOUNT, AccountGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountGetResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; + @jakarta.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public AccountGetResponse() { @@ -67,7 +69,7 @@ static public AccountGetResponse init(HashMap data) throws Exception { ); } - public AccountGetResponse account(AccountResponse account) { + public AccountGetResponse account(@jakarta.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -87,12 +89,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@jakarta.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountGetResponse warnings(List warnings) { + public AccountGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java index 6f431abf6..e7140787d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -47,40 +47,51 @@ AccountResponse.JSON_PROPERTY_LOCALE, AccountResponse.JSON_PROPERTY_USAGE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; + @jakarta.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; + @jakarta.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; + @jakarta.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; + @jakarta.annotation.Nullable private AccountResponseQuotas quotas; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_ROLE_CODE = "role_code"; + @jakarta.annotation.Nullable private String roleCode; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_LOCALE = "locale"; + @jakarta.annotation.Nullable private String locale; public static final String JSON_PROPERTY_USAGE = "usage"; + @jakarta.annotation.Nullable private AccountResponseUsage usage; public AccountResponse() { @@ -101,7 +112,7 @@ static public AccountResponse init(HashMap data) throws Exception { ); } - public AccountResponse accountId(String accountId) { + public AccountResponse accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -121,12 +132,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountResponse emailAddress(String emailAddress) { + public AccountResponse emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -146,12 +157,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public AccountResponse isLocked(Boolean isLocked) { + public AccountResponse isLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -171,12 +182,12 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public AccountResponse isPaidHs(Boolean isPaidHs) { + public AccountResponse isPaidHs(@jakarta.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -196,12 +207,12 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@jakarta.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public AccountResponse isPaidHf(Boolean isPaidHf) { + public AccountResponse isPaidHf(@jakarta.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -221,12 +232,12 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@jakarta.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public AccountResponse quotas(AccountResponseQuotas quotas) { + public AccountResponse quotas(@jakarta.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; return this; } @@ -246,12 +257,12 @@ public AccountResponseQuotas getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(AccountResponseQuotas quotas) { + public void setQuotas(@jakarta.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; } - public AccountResponse callbackUrl(String callbackUrl) { + public AccountResponse callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -271,12 +282,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountResponse roleCode(String roleCode) { + public AccountResponse roleCode(@jakarta.annotation.Nullable String roleCode) { this.roleCode = roleCode; return this; } @@ -296,12 +307,12 @@ public String getRoleCode() { @JsonProperty(JSON_PROPERTY_ROLE_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoleCode(String roleCode) { + public void setRoleCode(@jakarta.annotation.Nullable String roleCode) { this.roleCode = roleCode; } - public AccountResponse teamId(String teamId) { + public AccountResponse teamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -321,12 +332,12 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; } - public AccountResponse locale(String locale) { + public AccountResponse locale(@jakarta.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -346,12 +357,12 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@jakarta.annotation.Nullable String locale) { this.locale = locale; } - public AccountResponse usage(AccountResponseUsage usage) { + public AccountResponse usage(@jakarta.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; return this; } @@ -371,7 +382,7 @@ public AccountResponseUsage getUsage() { @JsonProperty(JSON_PROPERTY_USAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsage(AccountResponseUsage usage) { + public void setUsage(@jakarta.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index f8a7b6c2d..e1bf4a87e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -40,25 +40,31 @@ AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT, AccountResponseQuotas.JSON_PROPERTY_NUM_FAX_PAGES_LEFT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountResponseQuotas { public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; + @jakarta.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; + @jakarta.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_TEMPLATES_TOTAL = "templates_total"; + @jakarta.annotation.Nullable private Integer templatesTotal; public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; + @jakarta.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; + @jakarta.annotation.Nullable private Integer smsVerificationsLeft; public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; + @jakarta.annotation.Nullable private Integer numFaxPagesLeft; public AccountResponseQuotas() { @@ -79,7 +85,7 @@ static public AccountResponseQuotas init(HashMap data) throws Exception { ); } - public AccountResponseQuotas apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public AccountResponseQuotas apiSignatureRequestsLeft(@jakarta.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -99,12 +105,12 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft(@jakarta.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public AccountResponseQuotas documentsLeft(Integer documentsLeft) { + public AccountResponseQuotas documentsLeft(@jakarta.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -124,12 +130,12 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@jakarta.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public AccountResponseQuotas templatesTotal(Integer templatesTotal) { + public AccountResponseQuotas templatesTotal(@jakarta.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; return this; } @@ -149,12 +155,12 @@ public Integer getTemplatesTotal() { @JsonProperty(JSON_PROPERTY_TEMPLATES_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesTotal(Integer templatesTotal) { + public void setTemplatesTotal(@jakarta.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; } - public AccountResponseQuotas templatesLeft(Integer templatesLeft) { + public AccountResponseQuotas templatesLeft(@jakarta.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -174,12 +180,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@jakarta.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public AccountResponseQuotas smsVerificationsLeft(Integer smsVerificationsLeft) { + public AccountResponseQuotas smsVerificationsLeft(@jakarta.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -199,12 +205,12 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@jakarta.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } - public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { + public AccountResponseQuotas numFaxPagesLeft(@jakarta.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; return this; } @@ -224,7 +230,7 @@ public Integer getNumFaxPagesLeft() { @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { + public void setNumFaxPagesLeft(@jakarta.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java index 741d5e58c..32ba98cf1 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountResponseUsage { public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; + @jakarta.annotation.Nullable private Integer faxPagesSent; public AccountResponseUsage() { @@ -59,7 +60,7 @@ static public AccountResponseUsage init(HashMap data) throws Exception { ); } - public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { + public AccountResponseUsage faxPagesSent(@jakarta.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; return this; } @@ -79,7 +80,7 @@ public Integer getFaxPagesSent() { @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFaxPagesSent(Integer faxPagesSent) { + public void setFaxPagesSent(@jakarta.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java index f1bede2ea..cb2d14d73 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java @@ -37,16 +37,19 @@ AccountUpdateRequest.JSON_PROPERTY_CALLBACK_URL, AccountUpdateRequest.JSON_PROPERTY_LOCALE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountUpdateRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_LOCALE = "locale"; + @jakarta.annotation.Nullable private String locale; public AccountUpdateRequest() { @@ -67,7 +70,7 @@ static public AccountUpdateRequest init(HashMap data) throws Exception { ); } - public AccountUpdateRequest accountId(String accountId) { + public AccountUpdateRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -87,12 +90,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountUpdateRequest callbackUrl(String callbackUrl) { + public AccountUpdateRequest callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -112,12 +115,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountUpdateRequest locale(String locale) { + public AccountUpdateRequest locale(@jakarta.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -137,7 +140,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@jakarta.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java index ef7ce84e0..9b272bcba 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ AccountVerifyRequest.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountVerifyRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public AccountVerifyRequest() { @@ -59,7 +60,7 @@ static public AccountVerifyRequest init(HashMap data) throws Exception { ); } - public AccountVerifyRequest emailAddress(String emailAddress) { + public AccountVerifyRequest emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -79,7 +80,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java index a703a42dd..971d4f67e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java @@ -40,13 +40,15 @@ AccountVerifyResponse.JSON_PROPERTY_ACCOUNT, AccountVerifyResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountVerifyResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; + @jakarta.annotation.Nullable private AccountVerifyResponseAccount account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public AccountVerifyResponse() { @@ -67,7 +69,7 @@ static public AccountVerifyResponse init(HashMap data) throws Exception { ); } - public AccountVerifyResponse account(AccountVerifyResponseAccount account) { + public AccountVerifyResponse account(@jakarta.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; return this; } @@ -87,12 +89,12 @@ public AccountVerifyResponseAccount getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountVerifyResponseAccount account) { + public void setAccount(@jakarta.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; } - public AccountVerifyResponse warnings(List warnings) { + public AccountVerifyResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java index 38b66db62..932c5be5b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ AccountVerifyResponseAccount.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class AccountVerifyResponseAccount { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public AccountVerifyResponseAccount() { @@ -59,7 +60,7 @@ static public AccountVerifyResponseAccount init(HashMap data) throws Exception { ); } - public AccountVerifyResponseAccount emailAddress(String emailAddress) { + public AccountVerifyResponseAccount emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -79,7 +80,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java index 2b2cf1cd4..6edb0498e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java @@ -47,28 +47,35 @@ ApiAppCreateRequest.JSON_PROPERTY_OPTIONS, ApiAppCreateRequest.JSON_PROPERTY_WHITE_LABELING_OPTIONS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppCreateRequest { public static final String JSON_PROPERTY_DOMAINS = "domains"; + @jakarta.annotation.Nonnull private List domains = new ArrayList<>(); public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; + @jakarta.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_OAUTH = "oauth"; + @jakarta.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; + @jakarta.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppCreateRequest() { @@ -89,7 +96,7 @@ static public ApiAppCreateRequest init(HashMap data) throws Exception { ); } - public ApiAppCreateRequest domains(List domains) { + public ApiAppCreateRequest domains(@jakarta.annotation.Nonnull List domains) { this.domains = domains; return this; } @@ -117,12 +124,12 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomains(List domains) { + public void setDomains(@jakarta.annotation.Nonnull List domains) { this.domains = domains; } - public ApiAppCreateRequest name(String name) { + public ApiAppCreateRequest name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -142,12 +149,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public ApiAppCreateRequest callbackUrl(String callbackUrl) { + public ApiAppCreateRequest callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -167,12 +174,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppCreateRequest customLogoFile(File customLogoFile) { + public ApiAppCreateRequest customLogoFile(@jakarta.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -192,12 +199,12 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@jakarta.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppCreateRequest oauth(SubOAuth oauth) { + public ApiAppCreateRequest oauth(@jakarta.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -217,12 +224,12 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@jakarta.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppCreateRequest options(SubOptions options) { + public ApiAppCreateRequest options(@jakarta.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -242,12 +249,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@jakarta.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppCreateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppCreateRequest whiteLabelingOptions(@jakarta.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -267,7 +274,7 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions(@jakarta.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java index a2d69e9c8..887067a0e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java @@ -40,13 +40,15 @@ ApiAppGetResponse.JSON_PROPERTY_API_APP, ApiAppGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppGetResponse { public static final String JSON_PROPERTY_API_APP = "api_app"; + @jakarta.annotation.Nonnull private ApiAppResponse apiApp; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public ApiAppGetResponse() { @@ -67,7 +69,7 @@ static public ApiAppGetResponse init(HashMap data) throws Exception { ); } - public ApiAppGetResponse apiApp(ApiAppResponse apiApp) { + public ApiAppGetResponse apiApp(@jakarta.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; return this; } @@ -87,12 +89,12 @@ public ApiAppResponse getApiApp() { @JsonProperty(JSON_PROPERTY_API_APP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApp(ApiAppResponse apiApp) { + public void setApiApp(@jakarta.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; } - public ApiAppGetResponse warnings(List warnings) { + public ApiAppGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java index 7abb53610..eca7bbdc7 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java @@ -42,16 +42,19 @@ ApiAppListResponse.JSON_PROPERTY_LIST_INFO, ApiAppListResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppListResponse { public static final String JSON_PROPERTY_API_APPS = "api_apps"; + @jakarta.annotation.Nonnull private List apiApps = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public ApiAppListResponse() { @@ -72,7 +75,7 @@ static public ApiAppListResponse init(HashMap data) throws Exception { ); } - public ApiAppListResponse apiApps(List apiApps) { + public ApiAppListResponse apiApps(@jakarta.annotation.Nonnull List apiApps) { this.apiApps = apiApps; return this; } @@ -100,12 +103,12 @@ public List getApiApps() { @JsonProperty(JSON_PROPERTY_API_APPS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApps(List apiApps) { + public void setApiApps(@jakarta.annotation.Nonnull List apiApps) { this.apiApps = apiApps; } - public ApiAppListResponse listInfo(ListInfoResponse listInfo) { + public ApiAppListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public ApiAppListResponse warnings(List warnings) { + public ApiAppListResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponse.java index ee5f12eaf..6bd39a59c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponse.java @@ -50,37 +50,47 @@ ApiAppResponse.JSON_PROPERTY_OWNER_ACCOUNT, ApiAppResponse.JSON_PROPERTY_WHITE_LABELING_OPTIONS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppResponse { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_DOMAINS = "domains"; + @jakarta.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_IS_APPROVED = "is_approved"; + @jakarta.annotation.Nullable private Boolean isApproved; public static final String JSON_PROPERTY_OAUTH = "oauth"; + @jakarta.annotation.Nullable private ApiAppResponseOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nullable private ApiAppResponseOptions options; public static final String JSON_PROPERTY_OWNER_ACCOUNT = "owner_account"; + @jakarta.annotation.Nullable private ApiAppResponseOwnerAccount ownerAccount; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; + @jakarta.annotation.Nullable private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; public ApiAppResponse() { @@ -101,7 +111,7 @@ static public ApiAppResponse init(HashMap data) throws Exception { ); } - public ApiAppResponse callbackUrl(String callbackUrl) { + public ApiAppResponse callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -121,12 +131,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponse clientId(String clientId) { + public ApiAppResponse clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -146,12 +156,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public ApiAppResponse createdAt(Integer createdAt) { + public ApiAppResponse createdAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -171,12 +181,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public ApiAppResponse domains(List domains) { + public ApiAppResponse domains(@jakarta.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -204,12 +214,12 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@jakarta.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppResponse name(String name) { + public ApiAppResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -229,12 +239,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public ApiAppResponse isApproved(Boolean isApproved) { + public ApiAppResponse isApproved(@jakarta.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; return this; } @@ -254,12 +264,12 @@ public Boolean getIsApproved() { @JsonProperty(JSON_PROPERTY_IS_APPROVED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsApproved(Boolean isApproved) { + public void setIsApproved(@jakarta.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; } - public ApiAppResponse oauth(ApiAppResponseOAuth oauth) { + public ApiAppResponse oauth(@jakarta.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; return this; } @@ -279,12 +289,12 @@ public ApiAppResponseOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(ApiAppResponseOAuth oauth) { + public void setOauth(@jakarta.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; } - public ApiAppResponse options(ApiAppResponseOptions options) { + public ApiAppResponse options(@jakarta.annotation.Nullable ApiAppResponseOptions options) { this.options = options; return this; } @@ -304,12 +314,12 @@ public ApiAppResponseOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(ApiAppResponseOptions options) { + public void setOptions(@jakarta.annotation.Nullable ApiAppResponseOptions options) { this.options = options; } - public ApiAppResponse ownerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public ApiAppResponse ownerAccount(@jakarta.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; return this; } @@ -329,12 +339,12 @@ public ApiAppResponseOwnerAccount getOwnerAccount() { @JsonProperty(JSON_PROPERTY_OWNER_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public void setOwnerAccount(@jakarta.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; } - public ApiAppResponse whiteLabelingOptions(ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppResponse whiteLabelingOptions(@jakarta.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -354,7 +364,7 @@ public ApiAppResponseWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions(@jakarta.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java index b071e4067..6ae38fc51 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java @@ -40,19 +40,23 @@ ApiAppResponseOAuth.JSON_PROPERTY_SCOPES, ApiAppResponseOAuth.JSON_PROPERTY_CHARGES_USERS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppResponseOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_SECRET = "secret"; + @jakarta.annotation.Nullable private String secret; public static final String JSON_PROPERTY_SCOPES = "scopes"; + @jakarta.annotation.Nullable private List scopes = null; public static final String JSON_PROPERTY_CHARGES_USERS = "charges_users"; + @jakarta.annotation.Nullable private Boolean chargesUsers; public ApiAppResponseOAuth() { @@ -73,7 +77,7 @@ static public ApiAppResponseOAuth init(HashMap data) throws Exception { ); } - public ApiAppResponseOAuth callbackUrl(String callbackUrl) { + public ApiAppResponseOAuth callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -93,12 +97,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponseOAuth secret(String secret) { + public ApiAppResponseOAuth secret(@jakarta.annotation.Nullable String secret) { this.secret = secret; return this; } @@ -118,12 +122,12 @@ public String getSecret() { @JsonProperty(JSON_PROPERTY_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecret(String secret) { + public void setSecret(@jakarta.annotation.Nullable String secret) { this.secret = secret; } - public ApiAppResponseOAuth scopes(List scopes) { + public ApiAppResponseOAuth scopes(@jakarta.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -151,12 +155,12 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@jakarta.annotation.Nullable List scopes) { this.scopes = scopes; } - public ApiAppResponseOAuth chargesUsers(Boolean chargesUsers) { + public ApiAppResponseOAuth chargesUsers(@jakarta.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; return this; } @@ -176,7 +180,7 @@ public Boolean getChargesUsers() { @JsonProperty(JSON_PROPERTY_CHARGES_USERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChargesUsers(Boolean chargesUsers) { + public void setChargesUsers(@jakarta.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java index 2cffd69d5..1a9c91d76 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ ApiAppResponseOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppResponseOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; + @jakarta.annotation.Nullable private Boolean canInsertEverywhere; public ApiAppResponseOptions() { @@ -59,7 +60,7 @@ static public ApiAppResponseOptions init(HashMap data) throws Exception { ); } - public ApiAppResponseOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public ApiAppResponseOptions canInsertEverywhere(@jakarta.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -79,7 +80,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@jakarta.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java index 80f95b50a..7149d8edd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java @@ -36,13 +36,15 @@ ApiAppResponseOwnerAccount.JSON_PROPERTY_ACCOUNT_ID, ApiAppResponseOwnerAccount.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppResponseOwnerAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public ApiAppResponseOwnerAccount() { @@ -63,7 +65,7 @@ static public ApiAppResponseOwnerAccount init(HashMap data) throws Exception { ); } - public ApiAppResponseOwnerAccount accountId(String accountId) { + public ApiAppResponseOwnerAccount accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -83,12 +85,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public ApiAppResponseOwnerAccount emailAddress(String emailAddress) { + public ApiAppResponseOwnerAccount emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -108,7 +110,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java index 44b6f6e1e..2dd9a0018 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java @@ -48,49 +48,63 @@ ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR1, ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR2 }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppResponseWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; + @jakarta.annotation.Nullable private String headerBackgroundColor; public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; + @jakarta.annotation.Nullable private String legalVersion; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; + @jakarta.annotation.Nullable private String linkColor; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; + @jakarta.annotation.Nullable private String pageBackgroundColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; + @jakarta.annotation.Nullable private String primaryButtonColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; + @jakarta.annotation.Nullable private String primaryButtonColorHover; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; + @jakarta.annotation.Nullable private String primaryButtonTextColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; + @jakarta.annotation.Nullable private String primaryButtonTextColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; + @jakarta.annotation.Nullable private String secondaryButtonColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; + @jakarta.annotation.Nullable private String secondaryButtonColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; + @jakarta.annotation.Nullable private String secondaryButtonTextColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; + @jakarta.annotation.Nullable private String secondaryButtonTextColorHover; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; + @jakarta.annotation.Nullable private String textColor1; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; + @jakarta.annotation.Nullable private String textColor2; public ApiAppResponseWhiteLabelingOptions() { @@ -111,7 +125,7 @@ static public ApiAppResponseWhiteLabelingOptions init(HashMap data) throws Excep ); } - public ApiAppResponseWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions headerBackgroundColor(@jakarta.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -131,12 +145,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@jakarta.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions legalVersion(String legalVersion) { + public ApiAppResponseWhiteLabelingOptions legalVersion(@jakarta.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; return this; } @@ -156,12 +170,12 @@ public String getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(String legalVersion) { + public void setLegalVersion(@jakarta.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; } - public ApiAppResponseWhiteLabelingOptions linkColor(String linkColor) { + public ApiAppResponseWhiteLabelingOptions linkColor(@jakarta.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -181,12 +195,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@jakarta.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public ApiAppResponseWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions pageBackgroundColor(@jakarta.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -206,12 +220,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@jakarta.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions primaryButtonColor(@jakarta.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -231,12 +245,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@jakarta.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } - public ApiAppResponseWhiteLabelingOptions primaryButtonColorHover(String primaryButtonColorHover) { + public ApiAppResponseWhiteLabelingOptions primaryButtonColorHover(@jakarta.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -256,12 +270,12 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover(@jakarta.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } - public ApiAppResponseWhiteLabelingOptions primaryButtonTextColor(String primaryButtonTextColor) { + public ApiAppResponseWhiteLabelingOptions primaryButtonTextColor(@jakarta.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -281,12 +295,12 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor(@jakarta.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } - public ApiAppResponseWhiteLabelingOptions primaryButtonTextColorHover(String primaryButtonTextColorHover) { + public ApiAppResponseWhiteLabelingOptions primaryButtonTextColorHover(@jakarta.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -306,12 +320,12 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover(@jakarta.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonColor(@jakarta.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -331,12 +345,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@jakarta.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonColorHover(String secondaryButtonColorHover) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonColorHover(@jakarta.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -356,12 +370,12 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover(@jakarta.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColor(String secondaryButtonTextColor) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColor(@jakarta.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -381,12 +395,12 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor(@jakarta.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColorHover(@jakarta.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -406,12 +420,12 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover(@jakarta.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions textColor1(String textColor1) { + public ApiAppResponseWhiteLabelingOptions textColor1(@jakarta.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -431,12 +445,12 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@jakarta.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public ApiAppResponseWhiteLabelingOptions textColor2(String textColor2) { + public ApiAppResponseWhiteLabelingOptions textColor2(@jakarta.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -456,7 +470,7 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@jakarta.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java index c4a484995..704ccc262 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java @@ -47,28 +47,35 @@ ApiAppUpdateRequest.JSON_PROPERTY_OPTIONS, ApiAppUpdateRequest.JSON_PROPERTY_WHITE_LABELING_OPTIONS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ApiAppUpdateRequest { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; + @jakarta.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_DOMAINS = "domains"; + @jakarta.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_OAUTH = "oauth"; + @jakarta.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; + @jakarta.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppUpdateRequest() { @@ -89,7 +96,7 @@ static public ApiAppUpdateRequest init(HashMap data) throws Exception { ); } - public ApiAppUpdateRequest callbackUrl(String callbackUrl) { + public ApiAppUpdateRequest callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -109,12 +116,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppUpdateRequest customLogoFile(File customLogoFile) { + public ApiAppUpdateRequest customLogoFile(@jakarta.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -134,12 +141,12 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@jakarta.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppUpdateRequest domains(List domains) { + public ApiAppUpdateRequest domains(@jakarta.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -167,12 +174,12 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@jakarta.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppUpdateRequest name(String name) { + public ApiAppUpdateRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -192,12 +199,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public ApiAppUpdateRequest oauth(SubOAuth oauth) { + public ApiAppUpdateRequest oauth(@jakarta.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -217,12 +224,12 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@jakarta.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppUpdateRequest options(SubOptions options) { + public ApiAppUpdateRequest options(@jakarta.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -242,12 +249,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@jakarta.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppUpdateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppUpdateRequest whiteLabelingOptions(@jakarta.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -267,7 +274,7 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions(@jakarta.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java index af9c33736..944191a53 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java @@ -44,19 +44,23 @@ BulkSendJobGetResponse.JSON_PROPERTY_SIGNATURE_REQUESTS, BulkSendJobGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class BulkSendJobGetResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; + @jakarta.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + @jakarta.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public BulkSendJobGetResponse() { @@ -77,7 +81,7 @@ static public BulkSendJobGetResponse init(HashMap data) throws Exception { ); } - public BulkSendJobGetResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobGetResponse bulkSendJob(@jakarta.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -97,12 +101,12 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@jakarta.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobGetResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobGetResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -122,12 +126,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public BulkSendJobGetResponse signatureRequests(List signatureRequests) { + public BulkSendJobGetResponse signatureRequests(@jakarta.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -155,12 +159,12 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests(List signatureRequests) { + public void setSignatureRequests(@jakarta.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; } - public BulkSendJobGetResponse warnings(List warnings) { + public BulkSendJobGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -188,7 +192,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java index 3901db15f..2e360bc7f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java @@ -67,82 +67,107 @@ BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SIGNATURES, BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_BULK_SEND_JOB_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class BulkSendJobGetResponseSignatureRequests { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; + @jakarta.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; + @jakarta.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + @jakarta.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; + @jakarta.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; + @jakarta.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; + @jakarta.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; + @jakarta.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; + @jakarta.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; + @jakarta.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; + @jakarta.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; + @jakarta.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; + @jakarta.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; + @jakarta.annotation.Nullable private String bulkSendJobId; public BulkSendJobGetResponseSignatureRequests() { @@ -163,7 +188,7 @@ static public BulkSendJobGetResponseSignatureRequests init(HashMap data) throws ); } - public BulkSendJobGetResponseSignatureRequests testMode(Boolean testMode) { + public BulkSendJobGetResponseSignatureRequests testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -183,12 +208,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public BulkSendJobGetResponseSignatureRequests signatureRequestId(String signatureRequestId) { + public BulkSendJobGetResponseSignatureRequests signatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -208,12 +233,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public BulkSendJobGetResponseSignatureRequests requesterEmailAddress(String requesterEmailAddress) { + public BulkSendJobGetResponseSignatureRequests requesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -233,12 +258,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public BulkSendJobGetResponseSignatureRequests title(String title) { + public BulkSendJobGetResponseSignatureRequests title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -258,12 +283,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public BulkSendJobGetResponseSignatureRequests originalTitle(String originalTitle) { + public BulkSendJobGetResponseSignatureRequests originalTitle(@jakarta.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -283,12 +308,12 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@jakarta.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public BulkSendJobGetResponseSignatureRequests subject(String subject) { + public BulkSendJobGetResponseSignatureRequests subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -308,12 +333,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public BulkSendJobGetResponseSignatureRequests message(String message) { + public BulkSendJobGetResponseSignatureRequests message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -333,12 +358,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public BulkSendJobGetResponseSignatureRequests metadata(Map metadata) { + public BulkSendJobGetResponseSignatureRequests metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -366,12 +391,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public BulkSendJobGetResponseSignatureRequests createdAt(Integer createdAt) { + public BulkSendJobGetResponseSignatureRequests createdAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -391,12 +416,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public BulkSendJobGetResponseSignatureRequests expiresAt(Integer expiresAt) { + public BulkSendJobGetResponseSignatureRequests expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -416,12 +441,12 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public BulkSendJobGetResponseSignatureRequests isComplete(Boolean isComplete) { + public BulkSendJobGetResponseSignatureRequests isComplete(@jakarta.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -441,12 +466,12 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@jakarta.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public BulkSendJobGetResponseSignatureRequests isDeclined(Boolean isDeclined) { + public BulkSendJobGetResponseSignatureRequests isDeclined(@jakarta.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -466,12 +491,12 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@jakarta.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public BulkSendJobGetResponseSignatureRequests hasError(Boolean hasError) { + public BulkSendJobGetResponseSignatureRequests hasError(@jakarta.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -491,12 +516,12 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@jakarta.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public BulkSendJobGetResponseSignatureRequests filesUrl(String filesUrl) { + public BulkSendJobGetResponseSignatureRequests filesUrl(@jakarta.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -516,12 +541,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@jakarta.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public BulkSendJobGetResponseSignatureRequests signingUrl(String signingUrl) { + public BulkSendJobGetResponseSignatureRequests signingUrl(@jakarta.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -541,12 +566,12 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@jakarta.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public BulkSendJobGetResponseSignatureRequests detailsUrl(String detailsUrl) { + public BulkSendJobGetResponseSignatureRequests detailsUrl(@jakarta.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -566,12 +591,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@jakarta.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public BulkSendJobGetResponseSignatureRequests ccEmailAddresses(List ccEmailAddresses) { + public BulkSendJobGetResponseSignatureRequests ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -599,12 +624,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public BulkSendJobGetResponseSignatureRequests signingRedirectUrl(String signingRedirectUrl) { + public BulkSendJobGetResponseSignatureRequests signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -624,12 +649,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public BulkSendJobGetResponseSignatureRequests finalCopyUri(String finalCopyUri) { + public BulkSendJobGetResponseSignatureRequests finalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -649,12 +674,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public BulkSendJobGetResponseSignatureRequests templateIds(List templateIds) { + public BulkSendJobGetResponseSignatureRequests templateIds(@jakarta.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -682,12 +707,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nullable List templateIds) { this.templateIds = templateIds; } - public BulkSendJobGetResponseSignatureRequests customFields(List customFields) { + public BulkSendJobGetResponseSignatureRequests customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -715,12 +740,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public BulkSendJobGetResponseSignatureRequests attachments(List attachments) { + public BulkSendJobGetResponseSignatureRequests attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -748,12 +773,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public BulkSendJobGetResponseSignatureRequests responseData(List responseData) { + public BulkSendJobGetResponseSignatureRequests responseData(@jakarta.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -781,12 +806,12 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData(@jakarta.annotation.Nullable List responseData) { this.responseData = responseData; } - public BulkSendJobGetResponseSignatureRequests signatures(List signatures) { + public BulkSendJobGetResponseSignatureRequests signatures(@jakarta.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -814,12 +839,12 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures(@jakarta.annotation.Nullable List signatures) { this.signatures = signatures; } - public BulkSendJobGetResponseSignatureRequests bulkSendJobId(String bulkSendJobId) { + public BulkSendJobGetResponseSignatureRequests bulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -839,7 +864,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java index c550b3164..93fd456cd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java @@ -42,16 +42,19 @@ BulkSendJobListResponse.JSON_PROPERTY_LIST_INFO, BulkSendJobListResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class BulkSendJobListResponse { public static final String JSON_PROPERTY_BULK_SEND_JOBS = "bulk_send_jobs"; + @jakarta.annotation.Nonnull private List bulkSendJobs = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public BulkSendJobListResponse() { @@ -72,7 +75,7 @@ static public BulkSendJobListResponse init(HashMap data) throws Exception { ); } - public BulkSendJobListResponse bulkSendJobs(List bulkSendJobs) { + public BulkSendJobListResponse bulkSendJobs(@jakarta.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; return this; } @@ -100,12 +103,12 @@ public List getBulkSendJobs() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOBS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJobs(List bulkSendJobs) { + public void setBulkSendJobs(@jakarta.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; } - public BulkSendJobListResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public BulkSendJobListResponse warnings(List warnings) { + public BulkSendJobListResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java index 88f0eec99..f025c4f8f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java @@ -38,19 +38,23 @@ BulkSendJobResponse.JSON_PROPERTY_IS_CREATOR, BulkSendJobResponse.JSON_PROPERTY_CREATED_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class BulkSendJobResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; + @jakarta.annotation.Nullable private String bulkSendJobId; public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nullable private Integer total; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; + @jakarta.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nullable private Integer createdAt; public BulkSendJobResponse() { @@ -71,7 +75,7 @@ static public BulkSendJobResponse init(HashMap data) throws Exception { ); } - public BulkSendJobResponse bulkSendJobId(String bulkSendJobId) { + public BulkSendJobResponse bulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -91,12 +95,12 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } - public BulkSendJobResponse total(Integer total) { + public BulkSendJobResponse total(@jakarta.annotation.Nullable Integer total) { this.total = total; return this; } @@ -116,12 +120,12 @@ public Integer getTotal() { @JsonProperty(JSON_PROPERTY_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotal(Integer total) { + public void setTotal(@jakarta.annotation.Nullable Integer total) { this.total = total; } - public BulkSendJobResponse isCreator(Boolean isCreator) { + public BulkSendJobResponse isCreator(@jakarta.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -141,12 +145,12 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@jakarta.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public BulkSendJobResponse createdAt(Integer createdAt) { + public BulkSendJobResponse createdAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -166,7 +170,7 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java index b3be77254..9f7095f39 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java @@ -40,13 +40,15 @@ BulkSendJobSendResponse.JSON_PROPERTY_BULK_SEND_JOB, BulkSendJobSendResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class BulkSendJobSendResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; + @jakarta.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public BulkSendJobSendResponse() { @@ -67,7 +69,7 @@ static public BulkSendJobSendResponse init(HashMap data) throws Exception { ); } - public BulkSendJobSendResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobSendResponse bulkSendJob(@jakarta.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -87,12 +89,12 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@jakarta.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobSendResponse warnings(List warnings) { + public BulkSendJobSendResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java index 103eb03ec..4ae9bf2ce 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java @@ -48,37 +48,47 @@ EmbeddedEditUrlRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, EmbeddedEditUrlRequest.JSON_PROPERTY_TEST_MODE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EmbeddedEditUrlRequest { public static final String JSON_PROPERTY_ALLOW_EDIT_CCS = "allow_edit_ccs"; + @jakarta.annotation.Nullable private Boolean allowEditCcs = false; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; + @jakarta.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; + @jakarta.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; + @jakarta.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; + @jakarta.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; + @jakarta.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; + @jakarta.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; + @jakarta.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public EmbeddedEditUrlRequest() { @@ -99,7 +109,7 @@ static public EmbeddedEditUrlRequest init(HashMap data) throws Exception { ); } - public EmbeddedEditUrlRequest allowEditCcs(Boolean allowEditCcs) { + public EmbeddedEditUrlRequest allowEditCcs(@jakarta.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; return this; } @@ -119,12 +129,12 @@ public Boolean getAllowEditCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditCcs(Boolean allowEditCcs) { + public void setAllowEditCcs(@jakarta.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; } - public EmbeddedEditUrlRequest ccRoles(List ccRoles) { + public EmbeddedEditUrlRequest ccRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -152,12 +162,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public EmbeddedEditUrlRequest editorOptions(SubEditorOptions editorOptions) { + public EmbeddedEditUrlRequest editorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -177,12 +187,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public EmbeddedEditUrlRequest forceSignerRoles(Boolean forceSignerRoles) { + public EmbeddedEditUrlRequest forceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -202,12 +212,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public EmbeddedEditUrlRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public EmbeddedEditUrlRequest forceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -227,12 +237,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public EmbeddedEditUrlRequest mergeFields(List mergeFields) { + public EmbeddedEditUrlRequest mergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -260,12 +270,12 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public EmbeddedEditUrlRequest previewOnly(Boolean previewOnly) { + public EmbeddedEditUrlRequest previewOnly(@jakarta.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -285,12 +295,12 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@jakarta.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } - public EmbeddedEditUrlRequest showPreview(Boolean showPreview) { + public EmbeddedEditUrlRequest showPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -310,12 +320,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public EmbeddedEditUrlRequest showProgressStepper(Boolean showProgressStepper) { + public EmbeddedEditUrlRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -335,12 +345,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public EmbeddedEditUrlRequest testMode(Boolean testMode) { + public EmbeddedEditUrlRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -360,7 +370,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java index cf7faf9d5..11c566adc 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java @@ -40,13 +40,15 @@ EmbeddedEditUrlResponse.JSON_PROPERTY_EMBEDDED, EmbeddedEditUrlResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EmbeddedEditUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; + @jakarta.annotation.Nonnull private EmbeddedEditUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public EmbeddedEditUrlResponse() { @@ -67,7 +69,7 @@ static public EmbeddedEditUrlResponse init(HashMap data) throws Exception { ); } - public EmbeddedEditUrlResponse embedded(EmbeddedEditUrlResponseEmbedded embedded) { + public EmbeddedEditUrlResponse embedded(@jakarta.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -87,12 +89,12 @@ public EmbeddedEditUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedEditUrlResponseEmbedded embedded) { + public void setEmbedded(@jakarta.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedEditUrlResponse warnings(List warnings) { + public EmbeddedEditUrlResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java index c990405ef..0518d5ee4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java @@ -36,13 +36,15 @@ EmbeddedEditUrlResponseEmbedded.JSON_PROPERTY_EDIT_URL, EmbeddedEditUrlResponseEmbedded.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EmbeddedEditUrlResponseEmbedded { public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; + @jakarta.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public EmbeddedEditUrlResponseEmbedded() { @@ -63,7 +65,7 @@ static public EmbeddedEditUrlResponseEmbedded init(HashMap data) throws Exceptio ); } - public EmbeddedEditUrlResponseEmbedded editUrl(String editUrl) { + public EmbeddedEditUrlResponseEmbedded editUrl(@jakarta.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -83,12 +85,12 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@jakarta.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public EmbeddedEditUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedEditUrlResponseEmbedded expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -108,7 +110,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java index 3455fe0cb..0ac9ccda5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java @@ -40,13 +40,15 @@ EmbeddedSignUrlResponse.JSON_PROPERTY_EMBEDDED, EmbeddedSignUrlResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EmbeddedSignUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; + @jakarta.annotation.Nonnull private EmbeddedSignUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public EmbeddedSignUrlResponse() { @@ -67,7 +69,7 @@ static public EmbeddedSignUrlResponse init(HashMap data) throws Exception { ); } - public EmbeddedSignUrlResponse embedded(EmbeddedSignUrlResponseEmbedded embedded) { + public EmbeddedSignUrlResponse embedded(@jakarta.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -87,12 +89,12 @@ public EmbeddedSignUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedSignUrlResponseEmbedded embedded) { + public void setEmbedded(@jakarta.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedSignUrlResponse warnings(List warnings) { + public EmbeddedSignUrlResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java index f88dd631f..c06bd3832 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java @@ -36,13 +36,15 @@ EmbeddedSignUrlResponseEmbedded.JSON_PROPERTY_SIGN_URL, EmbeddedSignUrlResponseEmbedded.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EmbeddedSignUrlResponseEmbedded { public static final String JSON_PROPERTY_SIGN_URL = "sign_url"; + @jakarta.annotation.Nullable private String signUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public EmbeddedSignUrlResponseEmbedded() { @@ -63,7 +65,7 @@ static public EmbeddedSignUrlResponseEmbedded init(HashMap data) throws Exceptio ); } - public EmbeddedSignUrlResponseEmbedded signUrl(String signUrl) { + public EmbeddedSignUrlResponseEmbedded signUrl(@jakarta.annotation.Nullable String signUrl) { this.signUrl = signUrl; return this; } @@ -83,12 +85,12 @@ public String getSignUrl() { @JsonProperty(JSON_PROPERTY_SIGN_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignUrl(String signUrl) { + public void setSignUrl(@jakarta.annotation.Nullable String signUrl) { this.signUrl = signUrl; } - public EmbeddedSignUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedSignUrlResponseEmbedded expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -108,7 +110,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponse.java index ea26e455d..d905f6752 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponse.java @@ -36,10 +36,11 @@ @JsonPropertyOrder({ ErrorResponse.JSON_PROPERTY_ERROR }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ErrorResponse { public static final String JSON_PROPERTY_ERROR = "error"; + @jakarta.annotation.Nonnull private ErrorResponseError error; public ErrorResponse() { @@ -60,7 +61,7 @@ static public ErrorResponse init(HashMap data) throws Exception { ); } - public ErrorResponse error(ErrorResponseError error) { + public ErrorResponse error(@jakarta.annotation.Nonnull ErrorResponseError error) { this.error = error; return this; } @@ -80,7 +81,7 @@ public ErrorResponseError getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(ErrorResponseError error) { + public void setError(@jakarta.annotation.Nonnull ErrorResponseError error) { this.error = error; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index 2c7277014..af87ec4aa 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -37,16 +37,19 @@ ErrorResponseError.JSON_PROPERTY_ERROR_NAME, ErrorResponseError.JSON_PROPERTY_ERROR_PATH }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ErrorResponseError { public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; + @jakarta.annotation.Nonnull private String errorMsg; public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; + @jakarta.annotation.Nonnull private String errorName; public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; + @jakarta.annotation.Nullable private String errorPath; public ErrorResponseError() { @@ -67,7 +70,7 @@ static public ErrorResponseError init(HashMap data) throws Exception { ); } - public ErrorResponseError errorMsg(String errorMsg) { + public ErrorResponseError errorMsg(@jakarta.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; return this; } @@ -87,12 +90,12 @@ public String getErrorMsg() { @JsonProperty(JSON_PROPERTY_ERROR_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(String errorMsg) { + public void setErrorMsg(@jakarta.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; } - public ErrorResponseError errorName(String errorName) { + public ErrorResponseError errorName(@jakarta.annotation.Nonnull String errorName) { this.errorName = errorName; return this; } @@ -112,12 +115,12 @@ public String getErrorName() { @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(String errorName) { + public void setErrorName(@jakarta.annotation.Nonnull String errorName) { this.errorName = errorName; } - public ErrorResponseError errorPath(String errorPath) { + public ErrorResponseError errorPath(@jakarta.annotation.Nullable String errorPath) { this.errorPath = errorPath; return this; } @@ -137,7 +140,7 @@ public String getErrorPath() { @JsonProperty(JSON_PROPERTY_ERROR_PATH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorPath(String errorPath) { + public void setErrorPath(@jakarta.annotation.Nullable String errorPath) { this.errorPath = errorPath; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java index 0307d55a3..81eb8d0e3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java @@ -42,19 +42,23 @@ EventCallbackRequest.JSON_PROPERTY_SIGNATURE_REQUEST, EventCallbackRequest.JSON_PROPERTY_TEMPLATE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EventCallbackRequest { public static final String JSON_PROPERTY_EVENT = "event"; + @jakarta.annotation.Nonnull private EventCallbackRequestEvent event; public static final String JSON_PROPERTY_ACCOUNT = "account"; + @jakarta.annotation.Nullable private AccountResponse account; public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; + @jakarta.annotation.Nullable private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_TEMPLATE = "template"; + @jakarta.annotation.Nullable private TemplateResponse template; public EventCallbackRequest() { @@ -75,7 +79,7 @@ static public EventCallbackRequest init(HashMap data) throws Exception { ); } - public EventCallbackRequest event(EventCallbackRequestEvent event) { + public EventCallbackRequest event(@jakarta.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; return this; } @@ -95,12 +99,12 @@ public EventCallbackRequestEvent getEvent() { @JsonProperty(JSON_PROPERTY_EVENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEvent(EventCallbackRequestEvent event) { + public void setEvent(@jakarta.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; } - public EventCallbackRequest account(AccountResponse account) { + public EventCallbackRequest account(@jakarta.annotation.Nullable AccountResponse account) { this.account = account; return this; } @@ -120,12 +124,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountResponse account) { + public void setAccount(@jakarta.annotation.Nullable AccountResponse account) { this.account = account; } - public EventCallbackRequest signatureRequest(SignatureRequestResponse signatureRequest) { + public EventCallbackRequest signatureRequest(@jakarta.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -145,12 +149,12 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest(@jakarta.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public EventCallbackRequest template(TemplateResponse template) { + public EventCallbackRequest template(@jakarta.annotation.Nullable TemplateResponse template) { this.template = template; return this; } @@ -170,7 +174,7 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@jakarta.annotation.Nullable TemplateResponse template) { this.template = template; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java index 583482a11..600430445 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java @@ -39,61 +39,62 @@ EventCallbackRequestEvent.JSON_PROPERTY_EVENT_HASH, EventCallbackRequestEvent.JSON_PROPERTY_EVENT_METADATA }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EventCallbackRequestEvent { public static final String JSON_PROPERTY_EVENT_TIME = "event_time"; + @jakarta.annotation.Nonnull private String eventTime; /** * Type of callback event that was triggered. */ public enum EventTypeEnum { - ACCOUNT_CONFIRMED("account_confirmed"), + ACCOUNT_CONFIRMED(String.valueOf("account_confirmed")), - UNKNOWN_ERROR("unknown_error"), + UNKNOWN_ERROR(String.valueOf("unknown_error")), - FILE_ERROR("file_error"), + FILE_ERROR(String.valueOf("file_error")), - SIGN_URL_INVALID("sign_url_invalid"), + SIGN_URL_INVALID(String.valueOf("sign_url_invalid")), - SIGNATURE_REQUEST_VIEWED("signature_request_viewed"), + SIGNATURE_REQUEST_VIEWED(String.valueOf("signature_request_viewed")), - SIGNATURE_REQUEST_SIGNED("signature_request_signed"), + SIGNATURE_REQUEST_SIGNED(String.valueOf("signature_request_signed")), - SIGNATURE_REQUEST_SENT("signature_request_sent"), + SIGNATURE_REQUEST_SENT(String.valueOf("signature_request_sent")), - SIGNATURE_REQUEST_ALL_SIGNED("signature_request_all_signed"), + SIGNATURE_REQUEST_ALL_SIGNED(String.valueOf("signature_request_all_signed")), - SIGNATURE_REQUEST_EMAIL_BOUNCE("signature_request_email_bounce"), + SIGNATURE_REQUEST_EMAIL_BOUNCE(String.valueOf("signature_request_email_bounce")), - SIGNATURE_REQUEST_REMIND("signature_request_remind"), + SIGNATURE_REQUEST_REMIND(String.valueOf("signature_request_remind")), - SIGNATURE_REQUEST_INCOMPLETE_QES("signature_request_incomplete_qes"), + SIGNATURE_REQUEST_INCOMPLETE_QES(String.valueOf("signature_request_incomplete_qes")), - SIGNATURE_REQUEST_DESTROYED("signature_request_destroyed"), + SIGNATURE_REQUEST_DESTROYED(String.valueOf("signature_request_destroyed")), - SIGNATURE_REQUEST_CANCELED("signature_request_canceled"), + SIGNATURE_REQUEST_CANCELED(String.valueOf("signature_request_canceled")), - SIGNATURE_REQUEST_DOWNLOADABLE("signature_request_downloadable"), + SIGNATURE_REQUEST_DOWNLOADABLE(String.valueOf("signature_request_downloadable")), - SIGNATURE_REQUEST_DECLINED("signature_request_declined"), + SIGNATURE_REQUEST_DECLINED(String.valueOf("signature_request_declined")), - SIGNATURE_REQUEST_REASSIGNED("signature_request_reassigned"), + SIGNATURE_REQUEST_REASSIGNED(String.valueOf("signature_request_reassigned")), - SIGNATURE_REQUEST_INVALID("signature_request_invalid"), + SIGNATURE_REQUEST_INVALID(String.valueOf("signature_request_invalid")), - SIGNATURE_REQUEST_PREPARED("signature_request_prepared"), + SIGNATURE_REQUEST_PREPARED(String.valueOf("signature_request_prepared")), - SIGNATURE_REQUEST_EXPIRED("signature_request_expired"), + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), - TEMPLATE_CREATED("template_created"), + TEMPLATE_CREATED(String.valueOf("template_created")), - TEMPLATE_ERROR("template_error"), + TEMPLATE_ERROR(String.valueOf("template_error")), - CALLBACK_TEST("callback_test"), + CALLBACK_TEST(String.valueOf("callback_test")), - SIGNATURE_REQUEST_SIGNER_REMOVED("signature_request_signer_removed"); + SIGNATURE_REQUEST_SIGNER_REMOVED(String.valueOf("signature_request_signer_removed")); private String value; @@ -123,12 +124,15 @@ public static EventTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + @jakarta.annotation.Nonnull private EventTypeEnum eventType; public static final String JSON_PROPERTY_EVENT_HASH = "event_hash"; + @jakarta.annotation.Nonnull private String eventHash; public static final String JSON_PROPERTY_EVENT_METADATA = "event_metadata"; + @jakarta.annotation.Nullable private EventCallbackRequestEventMetadata eventMetadata; public EventCallbackRequestEvent() { @@ -149,7 +153,7 @@ static public EventCallbackRequestEvent init(HashMap data) throws Exception { ); } - public EventCallbackRequestEvent eventTime(String eventTime) { + public EventCallbackRequestEvent eventTime(@jakarta.annotation.Nonnull String eventTime) { this.eventTime = eventTime; return this; } @@ -169,12 +173,12 @@ public String getEventTime() { @JsonProperty(JSON_PROPERTY_EVENT_TIME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventTime(String eventTime) { + public void setEventTime(@jakarta.annotation.Nonnull String eventTime) { this.eventTime = eventTime; } - public EventCallbackRequestEvent eventType(EventTypeEnum eventType) { + public EventCallbackRequestEvent eventType(@jakarta.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; return this; } @@ -194,12 +198,12 @@ public EventTypeEnum getEventType() { @JsonProperty(JSON_PROPERTY_EVENT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventType(EventTypeEnum eventType) { + public void setEventType(@jakarta.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; } - public EventCallbackRequestEvent eventHash(String eventHash) { + public EventCallbackRequestEvent eventHash(@jakarta.annotation.Nonnull String eventHash) { this.eventHash = eventHash; return this; } @@ -219,12 +223,12 @@ public String getEventHash() { @JsonProperty(JSON_PROPERTY_EVENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventHash(String eventHash) { + public void setEventHash(@jakarta.annotation.Nonnull String eventHash) { this.eventHash = eventHash; } - public EventCallbackRequestEvent eventMetadata(EventCallbackRequestEventMetadata eventMetadata) { + public EventCallbackRequestEvent eventMetadata(@jakarta.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; return this; } @@ -244,7 +248,7 @@ public EventCallbackRequestEventMetadata getEventMetadata() { @JsonProperty(JSON_PROPERTY_EVENT_METADATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMetadata(EventCallbackRequestEventMetadata eventMetadata) { + public void setEventMetadata(@jakarta.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java index b832ff192..70d002e3f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java @@ -38,19 +38,23 @@ EventCallbackRequestEventMetadata.JSON_PROPERTY_REPORTED_FOR_APP_ID, EventCallbackRequestEventMetadata.JSON_PROPERTY_EVENT_MESSAGE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class EventCallbackRequestEventMetadata { public static final String JSON_PROPERTY_RELATED_SIGNATURE_ID = "related_signature_id"; + @jakarta.annotation.Nullable private String relatedSignatureId; public static final String JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID = "reported_for_account_id"; + @jakarta.annotation.Nullable private String reportedForAccountId; public static final String JSON_PROPERTY_REPORTED_FOR_APP_ID = "reported_for_app_id"; + @jakarta.annotation.Nullable private String reportedForAppId; public static final String JSON_PROPERTY_EVENT_MESSAGE = "event_message"; + @jakarta.annotation.Nullable private String eventMessage; public EventCallbackRequestEventMetadata() { @@ -71,7 +75,7 @@ static public EventCallbackRequestEventMetadata init(HashMap data) throws Except ); } - public EventCallbackRequestEventMetadata relatedSignatureId(String relatedSignatureId) { + public EventCallbackRequestEventMetadata relatedSignatureId(@jakarta.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; return this; } @@ -91,12 +95,12 @@ public String getRelatedSignatureId() { @JsonProperty(JSON_PROPERTY_RELATED_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelatedSignatureId(String relatedSignatureId) { + public void setRelatedSignatureId(@jakarta.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; } - public EventCallbackRequestEventMetadata reportedForAccountId(String reportedForAccountId) { + public EventCallbackRequestEventMetadata reportedForAccountId(@jakarta.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; return this; } @@ -116,12 +120,12 @@ public String getReportedForAccountId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAccountId(String reportedForAccountId) { + public void setReportedForAccountId(@jakarta.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; } - public EventCallbackRequestEventMetadata reportedForAppId(String reportedForAppId) { + public EventCallbackRequestEventMetadata reportedForAppId(@jakarta.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; return this; } @@ -141,12 +145,12 @@ public String getReportedForAppId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_APP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAppId(String reportedForAppId) { + public void setReportedForAppId(@jakarta.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; } - public EventCallbackRequestEventMetadata eventMessage(String eventMessage) { + public EventCallbackRequestEventMetadata eventMessage(@jakarta.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; return this; } @@ -166,7 +170,7 @@ public String getEventMessage() { @JsonProperty(JSON_PROPERTY_EVENT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMessage(String eventMessage) { + public void setEventMessage(@jakarta.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxGetResponse.java index 7b08c8e76..958f0880e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -40,13 +40,15 @@ FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxGetResponse { public static final String JSON_PROPERTY_FAX = "fax"; + @jakarta.annotation.Nonnull private FaxResponse fax; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public FaxGetResponse() { @@ -67,7 +69,7 @@ static public FaxGetResponse init(HashMap data) throws Exception { ); } - public FaxGetResponse fax(FaxResponse fax) { + public FaxGetResponse fax(@jakarta.annotation.Nonnull FaxResponse fax) { this.fax = fax; return this; } @@ -87,12 +89,12 @@ public FaxResponse getFax() { @JsonProperty(JSON_PROPERTY_FAX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFax(FaxResponse fax) { + public void setFax(@jakarta.annotation.Nonnull FaxResponse fax) { this.fax = fax; } - public FaxGetResponse warnings(List warnings) { + public FaxGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java index 99f972a27..779e87050 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -37,16 +37,19 @@ FaxLineAddUserRequest.JSON_PROPERTY_ACCOUNT_ID, FaxLineAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineAddUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; + @jakarta.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public FaxLineAddUserRequest() { @@ -67,13 +70,13 @@ static public FaxLineAddUserRequest init(HashMap data) throws Exception { ); } - public FaxLineAddUserRequest number(String number) { + public FaxLineAddUserRequest number(@jakarta.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * @return number */ @jakarta.annotation.Nonnull @@ -87,12 +90,12 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@jakarta.annotation.Nonnull String number) { this.number = number; } - public FaxLineAddUserRequest accountId(String accountId) { + public FaxLineAddUserRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -112,12 +115,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineAddUserRequest emailAddress(String emailAddress) { + public FaxLineAddUserRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -137,7 +140,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java index b4b2bbb03..fec49f879 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -37,10 +37,11 @@ @JsonPropertyOrder({ FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineAreaCodeGetResponse { public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; + @jakarta.annotation.Nonnull private List areaCodes = new ArrayList<>(); public FaxLineAreaCodeGetResponse() { @@ -61,7 +62,7 @@ static public FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { ); } - public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { + public FaxLineAreaCodeGetResponse areaCodes(@jakarta.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; return this; } @@ -89,7 +90,7 @@ public List getAreaCodes() { @JsonProperty(JSON_PROPERTY_AREA_CODES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCodes(List areaCodes) { + public void setAreaCodes(@jakarta.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java index 7d23eac13..cdf527027 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -38,21 +38,22 @@ FaxLineCreateRequest.JSON_PROPERTY_CITY, FaxLineCreateRequest.JSON_PROPERTY_ACCOUNT_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineCreateRequest { public static final String JSON_PROPERTY_AREA_CODE = "area_code"; + @jakarta.annotation.Nonnull private Integer areaCode; /** - * Country + * Country of the area code */ public enum CountryEnum { - CA("CA"), + CA(String.valueOf("CA")), - US("US"), + US(String.valueOf("US")), - UK("UK"); + UK(String.valueOf("UK")); private String value; @@ -82,12 +83,15 @@ public static CountryEnum fromValue(String value) { } public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nonnull private CountryEnum country; public static final String JSON_PROPERTY_CITY = "city"; + @jakarta.annotation.Nullable private String city; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public FaxLineCreateRequest() { @@ -108,13 +112,13 @@ static public FaxLineCreateRequest init(HashMap data) throws Exception { ); } - public FaxLineCreateRequest areaCode(Integer areaCode) { + public FaxLineCreateRequest areaCode(@jakarta.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; return this; } /** - * Area code + * Area code of the new Fax Line * @return areaCode */ @jakarta.annotation.Nonnull @@ -128,18 +132,18 @@ public Integer getAreaCode() { @JsonProperty(JSON_PROPERTY_AREA_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCode(Integer areaCode) { + public void setAreaCode(@jakarta.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; } - public FaxLineCreateRequest country(CountryEnum country) { + public FaxLineCreateRequest country(@jakarta.annotation.Nonnull CountryEnum country) { this.country = country; return this; } /** - * Country + * Country of the area code * @return country */ @jakarta.annotation.Nonnull @@ -153,18 +157,18 @@ public CountryEnum getCountry() { @JsonProperty(JSON_PROPERTY_COUNTRY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCountry(CountryEnum country) { + public void setCountry(@jakarta.annotation.Nonnull CountryEnum country) { this.country = country; } - public FaxLineCreateRequest city(String city) { + public FaxLineCreateRequest city(@jakarta.annotation.Nullable String city) { this.city = city; return this; } /** - * City + * City of the area code * @return city */ @jakarta.annotation.Nullable @@ -178,18 +182,18 @@ public String getCity() { @JsonProperty(JSON_PROPERTY_CITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCity(String city) { + public void setCity(@jakarta.annotation.Nullable String city) { this.city = city; } - public FaxLineCreateRequest accountId(String accountId) { + public FaxLineCreateRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } /** - * Account ID + * Account ID of the account that will be assigned this new Fax Line * @return accountId */ @jakarta.annotation.Nullable @@ -203,7 +207,7 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java index c7876dd3f..21c1c35d0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ FaxLineDeleteRequest.JSON_PROPERTY_NUMBER }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineDeleteRequest { public static final String JSON_PROPERTY_NUMBER = "number"; + @jakarta.annotation.Nonnull private String number; public FaxLineDeleteRequest() { @@ -59,13 +60,13 @@ static public FaxLineDeleteRequest init(HashMap data) throws Exception { ); } - public FaxLineDeleteRequest number(String number) { + public FaxLineDeleteRequest number(@jakarta.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * @return number */ @jakarta.annotation.Nonnull @@ -79,7 +80,7 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@jakarta.annotation.Nonnull String number) { this.number = number; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java index 33163a28c..5454fa3b3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -42,16 +42,19 @@ FaxLineListResponse.JSON_PROPERTY_FAX_LINES, FaxLineListResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineListResponse { public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; + @jakarta.annotation.Nonnull private List faxLines = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private WarningResponse warnings; public FaxLineListResponse() { @@ -72,7 +75,7 @@ static public FaxLineListResponse init(HashMap data) throws Exception { ); } - public FaxLineListResponse listInfo(ListInfoResponse listInfo) { + public FaxLineListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -92,12 +95,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public FaxLineListResponse faxLines(List faxLines) { + public FaxLineListResponse faxLines(@jakarta.annotation.Nonnull List faxLines) { this.faxLines = faxLines; return this; } @@ -125,12 +128,12 @@ public List getFaxLines() { @JsonProperty(JSON_PROPERTY_FAX_LINES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLines(List faxLines) { + public void setFaxLines(@jakarta.annotation.Nonnull List faxLines) { this.faxLines = faxLines; } - public FaxLineListResponse warnings(WarningResponse warnings) { + public FaxLineListResponse warnings(@jakarta.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -150,7 +153,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@jakarta.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java index 747853a52..6ab55bbde 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -37,16 +37,19 @@ FaxLineRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, FaxLineRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineRemoveUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; + @jakarta.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public FaxLineRemoveUserRequest() { @@ -67,13 +70,13 @@ static public FaxLineRemoveUserRequest init(HashMap data) throws Exception { ); } - public FaxLineRemoveUserRequest number(String number) { + public FaxLineRemoveUserRequest number(@jakarta.annotation.Nonnull String number) { this.number = number; return this; } /** - * The Fax Line number. + * The Fax Line number * @return number */ @jakarta.annotation.Nonnull @@ -87,18 +90,18 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@jakarta.annotation.Nonnull String number) { this.number = number; } - public FaxLineRemoveUserRequest accountId(String accountId) { + public FaxLineRemoveUserRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } /** - * Account ID + * Account ID of the user to remove access * @return accountId */ @jakarta.annotation.Nullable @@ -112,18 +115,18 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineRemoveUserRequest emailAddress(String emailAddress) { + public FaxLineRemoveUserRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } /** - * Email address + * Email address of the user to remove access * @return emailAddress */ @jakarta.annotation.Nullable @@ -137,7 +140,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java index 8fae8caf7..5430836d3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -38,13 +38,15 @@ FaxLineResponse.JSON_PROPERTY_FAX_LINE, FaxLineResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineResponse { public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; + @jakarta.annotation.Nonnull private FaxLineResponseFaxLine faxLine; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private WarningResponse warnings; public FaxLineResponse() { @@ -65,7 +67,7 @@ static public FaxLineResponse init(HashMap data) throws Exception { ); } - public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { + public FaxLineResponse faxLine(@jakarta.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; return this; } @@ -85,12 +87,12 @@ public FaxLineResponseFaxLine getFaxLine() { @JsonProperty(JSON_PROPERTY_FAX_LINE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLine(FaxLineResponseFaxLine faxLine) { + public void setFaxLine(@jakarta.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; } - public FaxLineResponse warnings(WarningResponse warnings) { + public FaxLineResponse warnings(@jakarta.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -110,7 +112,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@jakarta.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java index 9b6b8c893..a5aa7c7d6 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -41,19 +41,23 @@ FaxLineResponseFaxLine.JSON_PROPERTY_UPDATED_AT, FaxLineResponseFaxLine.JSON_PROPERTY_ACCOUNTS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxLineResponseFaxLine { public static final String JSON_PROPERTY_NUMBER = "number"; + @jakarta.annotation.Nullable private String number; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @jakarta.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + @jakarta.annotation.Nullable private List accounts = null; public FaxLineResponseFaxLine() { @@ -74,7 +78,7 @@ static public FaxLineResponseFaxLine init(HashMap data) throws Exception { ); } - public FaxLineResponseFaxLine number(String number) { + public FaxLineResponseFaxLine number(@jakarta.annotation.Nullable String number) { this.number = number; return this; } @@ -94,12 +98,12 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumber(String number) { + public void setNumber(@jakarta.annotation.Nullable String number) { this.number = number; } - public FaxLineResponseFaxLine createdAt(Integer createdAt) { + public FaxLineResponseFaxLine createdAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -119,12 +123,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { + public FaxLineResponseFaxLine updatedAt(@jakarta.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -144,12 +148,12 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@jakarta.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public FaxLineResponseFaxLine accounts(List accounts) { + public FaxLineResponseFaxLine accounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -177,7 +181,7 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxListResponse.java index 13c0d94e3..b54590962 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -40,13 +40,15 @@ FaxListResponse.JSON_PROPERTY_FAXES, FaxListResponse.JSON_PROPERTY_LIST_INFO }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxListResponse { public static final String JSON_PROPERTY_FAXES = "faxes"; + @jakarta.annotation.Nonnull private List faxes = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public FaxListResponse() { @@ -67,7 +69,7 @@ static public FaxListResponse init(HashMap data) throws Exception { ); } - public FaxListResponse faxes(List faxes) { + public FaxListResponse faxes(@jakarta.annotation.Nonnull List faxes) { this.faxes = faxes; return this; } @@ -95,12 +97,12 @@ public List getFaxes() { @JsonProperty(JSON_PROPERTY_FAXES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxes(List faxes) { + public void setFaxes(@jakarta.annotation.Nonnull List faxes) { this.faxes = faxes; } - public FaxListResponse listInfo(ListInfoResponse listInfo) { + public FaxListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -120,7 +122,7 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponse.java index 9d64e25b8..156435edc 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -50,40 +50,51 @@ FaxResponse.JSON_PROPERTY_MESSAGE, FaxResponse.JSON_PROPERTY_FINAL_COPY_URI }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxResponse { public static final String JSON_PROPERTY_FAX_ID = "fax_id"; + @jakarta.annotation.Nonnull private String faxId; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nonnull private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + @jakarta.annotation.Nonnull private String originalTitle; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nonnull private Map metadata = new HashMap<>(); public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nonnull private Integer createdAt; public static final String JSON_PROPERTY_SENDER = "sender"; + @jakarta.annotation.Nonnull private String sender; public static final String JSON_PROPERTY_FILES_URL = "files_url"; + @jakarta.annotation.Nonnull private String filesUrl; public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + @jakarta.annotation.Nonnull private List transmissions = new ArrayList<>(); public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; + @jakarta.annotation.Nullable private String finalCopyUri; public FaxResponse() { @@ -104,7 +115,7 @@ static public FaxResponse init(HashMap data) throws Exception { ); } - public FaxResponse faxId(String faxId) { + public FaxResponse faxId(@jakarta.annotation.Nonnull String faxId) { this.faxId = faxId; return this; } @@ -124,12 +135,12 @@ public String getFaxId() { @JsonProperty(JSON_PROPERTY_FAX_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxId(String faxId) { + public void setFaxId(@jakarta.annotation.Nonnull String faxId) { this.faxId = faxId; } - public FaxResponse title(String title) { + public FaxResponse title(@jakarta.annotation.Nonnull String title) { this.title = title; return this; } @@ -149,12 +160,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nonnull String title) { this.title = title; } - public FaxResponse originalTitle(String originalTitle) { + public FaxResponse originalTitle(@jakarta.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -174,12 +185,12 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@jakarta.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; } - public FaxResponse metadata(Map metadata) { + public FaxResponse metadata(@jakarta.annotation.Nonnull Map metadata) { this.metadata = metadata; return this; } @@ -207,12 +218,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nonnull Map metadata) { this.metadata = metadata; } - public FaxResponse createdAt(Integer createdAt) { + public FaxResponse createdAt(@jakarta.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; return this; } @@ -232,12 +243,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; } - public FaxResponse sender(String sender) { + public FaxResponse sender(@jakarta.annotation.Nonnull String sender) { this.sender = sender; return this; } @@ -257,12 +268,12 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSender(String sender) { + public void setSender(@jakarta.annotation.Nonnull String sender) { this.sender = sender; } - public FaxResponse filesUrl(String filesUrl) { + public FaxResponse filesUrl(@jakarta.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -282,12 +293,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@jakarta.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; } - public FaxResponse transmissions(List transmissions) { + public FaxResponse transmissions(@jakarta.annotation.Nonnull List transmissions) { this.transmissions = transmissions; return this; } @@ -315,12 +326,12 @@ public List getTransmissions() { @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTransmissions(List transmissions) { + public void setTransmissions(@jakarta.annotation.Nonnull List transmissions) { this.transmissions = transmissions; } - public FaxResponse subject(String subject) { + public FaxResponse subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -340,12 +351,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public FaxResponse message(String message) { + public FaxResponse message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -365,12 +376,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public FaxResponse finalCopyUri(String finalCopyUri) { + public FaxResponse finalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -390,7 +401,7 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java index d53176bb7..2b350da40 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -37,31 +37,32 @@ FaxResponseTransmission.JSON_PROPERTY_STATUS_CODE, FaxResponseTransmission.JSON_PROPERTY_SENT_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxResponseTransmission { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + @jakarta.annotation.Nonnull private String recipient; /** * Fax Transmission Status Code */ public enum StatusCodeEnum { - SUCCESS("success"), + SUCCESS(String.valueOf("success")), - TRANSMITTING("transmitting"), + TRANSMITTING(String.valueOf("transmitting")), - ERROR_COULD_NOT_FAX("error_could_not_fax"), + ERROR_COULD_NOT_FAX(String.valueOf("error_could_not_fax")), - ERROR_UNKNOWN("error_unknown"), + ERROR_UNKNOWN(String.valueOf("error_unknown")), - ERROR_BUSY("error_busy"), + ERROR_BUSY(String.valueOf("error_busy")), - ERROR_NO_ANSWER("error_no_answer"), + ERROR_NO_ANSWER(String.valueOf("error_no_answer")), - ERROR_DISCONNECTED("error_disconnected"), + ERROR_DISCONNECTED(String.valueOf("error_disconnected")), - ERROR_BAD_DESTINATION("error_bad_destination"); + ERROR_BAD_DESTINATION(String.valueOf("error_bad_destination")); private String value; @@ -91,9 +92,11 @@ public static StatusCodeEnum fromValue(String value) { } public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; + @jakarta.annotation.Nonnull private StatusCodeEnum statusCode; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; + @jakarta.annotation.Nullable private Integer sentAt; public FaxResponseTransmission() { @@ -114,7 +117,7 @@ static public FaxResponseTransmission init(HashMap data) throws Exception { ); } - public FaxResponseTransmission recipient(String recipient) { + public FaxResponseTransmission recipient(@jakarta.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } @@ -134,12 +137,12 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@jakarta.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + public FaxResponseTransmission statusCode(@jakarta.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; return this; } @@ -159,12 +162,12 @@ public StatusCodeEnum getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatusCode(StatusCodeEnum statusCode) { + public void setStatusCode(@jakarta.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; } - public FaxResponseTransmission sentAt(Integer sentAt) { + public FaxResponseTransmission sentAt(@jakarta.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -184,7 +187,7 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@jakarta.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxSendRequest.java index bb4a6e8a1..2978a4dfd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxSendRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -46,34 +46,43 @@ FaxSendRequest.JSON_PROPERTY_COVER_PAGE_MESSAGE, FaxSendRequest.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FaxSendRequest { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + @jakarta.annotation.Nonnull private String recipient; public static final String JSON_PROPERTY_SENDER = "sender"; + @jakarta.annotation.Nullable private String sender; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; + @jakarta.annotation.Nullable private String coverPageTo; public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; + @jakarta.annotation.Nullable private String coverPageFrom; public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; + @jakarta.annotation.Nullable private String coverPageMessage; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public FaxSendRequest() { @@ -94,13 +103,13 @@ static public FaxSendRequest init(HashMap data) throws Exception { ); } - public FaxSendRequest recipient(String recipient) { + public FaxSendRequest recipient(@jakarta.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } /** - * Fax Send To Recipient + * Recipient of the fax Can be a phone number in E.164 format or email address * @return recipient */ @jakarta.annotation.Nonnull @@ -114,12 +123,12 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@jakarta.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxSendRequest sender(String sender) { + public FaxSendRequest sender(@jakarta.annotation.Nullable String sender) { this.sender = sender; return this; } @@ -139,12 +148,12 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSender(String sender) { + public void setSender(@jakarta.annotation.Nullable String sender) { this.sender = sender; } - public FaxSendRequest files(List files) { + public FaxSendRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -158,7 +167,7 @@ public FaxSendRequest addFilesItem(File filesItem) { } /** - * Fax File to Send + * Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. * @return files */ @jakarta.annotation.Nullable @@ -172,12 +181,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public FaxSendRequest fileUrls(List fileUrls) { + public FaxSendRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -191,7 +200,7 @@ public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { } /** - * Fax File URL to Send + * Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. * @return fileUrls */ @jakarta.annotation.Nullable @@ -205,12 +214,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public FaxSendRequest testMode(Boolean testMode) { + public FaxSendRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -230,18 +239,18 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public FaxSendRequest coverPageTo(String coverPageTo) { + public FaxSendRequest coverPageTo(@jakarta.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; return this; } /** - * Fax Cover Page for Recipient + * Fax cover page recipient information * @return coverPageTo */ @jakarta.annotation.Nullable @@ -255,18 +264,18 @@ public String getCoverPageTo() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageTo(String coverPageTo) { + public void setCoverPageTo(@jakarta.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; } - public FaxSendRequest coverPageFrom(String coverPageFrom) { + public FaxSendRequest coverPageFrom(@jakarta.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; return this; } /** - * Fax Cover Page for Sender + * Fax cover page sender information * @return coverPageFrom */ @jakarta.annotation.Nullable @@ -280,12 +289,12 @@ public String getCoverPageFrom() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageFrom(String coverPageFrom) { + public void setCoverPageFrom(@jakarta.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; } - public FaxSendRequest coverPageMessage(String coverPageMessage) { + public FaxSendRequest coverPageMessage(@jakarta.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; return this; } @@ -305,12 +314,12 @@ public String getCoverPageMessage() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageMessage(String coverPageMessage) { + public void setCoverPageMessage(@jakarta.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; } - public FaxSendRequest title(String title) { + public FaxSendRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -330,7 +339,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponse.java index 01908c972..aa5f04e75 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponse.java @@ -36,13 +36,15 @@ FileResponse.JSON_PROPERTY_FILE_URL, FileResponse.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FileResponse { public static final String JSON_PROPERTY_FILE_URL = "file_url"; + @jakarta.annotation.Nonnull private String fileUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nonnull private Integer expiresAt; public FileResponse() { @@ -63,7 +65,7 @@ static public FileResponse init(HashMap data) throws Exception { ); } - public FileResponse fileUrl(String fileUrl) { + public FileResponse fileUrl(@jakarta.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; return this; } @@ -83,12 +85,12 @@ public String getFileUrl() { @JsonProperty(JSON_PROPERTY_FILE_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFileUrl(String fileUrl) { + public void setFileUrl(@jakarta.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; } - public FileResponse expiresAt(Integer expiresAt) { + public FileResponse expiresAt(@jakarta.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -108,7 +110,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java index 1ef6cdb22..fcabc19c9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ FileResponseDataUri.JSON_PROPERTY_DATA_URI }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class FileResponseDataUri { public static final String JSON_PROPERTY_DATA_URI = "data_uri"; + @jakarta.annotation.Nonnull private String dataUri; public FileResponseDataUri() { @@ -59,7 +60,7 @@ static public FileResponseDataUri init(HashMap data) throws Exception { ); } - public FileResponseDataUri dataUri(String dataUri) { + public FileResponseDataUri dataUri(@jakarta.annotation.Nonnull String dataUri) { this.dataUri = dataUri; return this; } @@ -79,7 +80,7 @@ public String getDataUri() { @JsonProperty(JSON_PROPERTY_DATA_URI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDataUri(String dataUri) { + public void setDataUri(@jakarta.annotation.Nonnull String dataUri) { this.dataUri = dataUri; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ListInfoResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ListInfoResponse.java index 5a8e00cc2..c0709757a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ListInfoResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ListInfoResponse.java @@ -38,19 +38,23 @@ ListInfoResponse.JSON_PROPERTY_PAGE, ListInfoResponse.JSON_PROPERTY_PAGE_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ListInfoResponse { public static final String JSON_PROPERTY_NUM_PAGES = "num_pages"; + @jakarta.annotation.Nullable private Integer numPages; public static final String JSON_PROPERTY_NUM_RESULTS = "num_results"; + @jakarta.annotation.Nullable private Integer numResults; public static final String JSON_PROPERTY_PAGE = "page"; + @jakarta.annotation.Nullable private Integer page; public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + @jakarta.annotation.Nullable private Integer pageSize; public ListInfoResponse() { @@ -71,7 +75,7 @@ static public ListInfoResponse init(HashMap data) throws Exception { ); } - public ListInfoResponse numPages(Integer numPages) { + public ListInfoResponse numPages(@jakarta.annotation.Nullable Integer numPages) { this.numPages = numPages; return this; } @@ -91,12 +95,12 @@ public Integer getNumPages() { @JsonProperty(JSON_PROPERTY_NUM_PAGES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumPages(Integer numPages) { + public void setNumPages(@jakarta.annotation.Nullable Integer numPages) { this.numPages = numPages; } - public ListInfoResponse numResults(Integer numResults) { + public ListInfoResponse numResults(@jakarta.annotation.Nullable Integer numResults) { this.numResults = numResults; return this; } @@ -116,12 +120,12 @@ public Integer getNumResults() { @JsonProperty(JSON_PROPERTY_NUM_RESULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumResults(Integer numResults) { + public void setNumResults(@jakarta.annotation.Nullable Integer numResults) { this.numResults = numResults; } - public ListInfoResponse page(Integer page) { + public ListInfoResponse page(@jakarta.annotation.Nullable Integer page) { this.page = page; return this; } @@ -141,12 +145,12 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@jakarta.annotation.Nullable Integer page) { this.page = page; } - public ListInfoResponse pageSize(Integer pageSize) { + public ListInfoResponse pageSize(@jakarta.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; return this; } @@ -166,7 +170,7 @@ public Integer getPageSize() { @JsonProperty(JSON_PROPERTY_PAGE_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(Integer pageSize) { + public void setPageSize(@jakarta.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java index 176c0ee1e..bd6324a5d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java @@ -39,22 +39,27 @@ OAuthTokenGenerateRequest.JSON_PROPERTY_GRANT_TYPE, OAuthTokenGenerateRequest.JSON_PROPERTY_STATE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class OAuthTokenGenerateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + @jakarta.annotation.Nonnull private String clientSecret; public static final String JSON_PROPERTY_CODE = "code"; + @jakarta.annotation.Nonnull private String code; public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; + @jakarta.annotation.Nonnull private String grantType = "authorization_code"; public static final String JSON_PROPERTY_STATE = "state"; + @jakarta.annotation.Nonnull private String state; public OAuthTokenGenerateRequest() { @@ -75,7 +80,7 @@ static public OAuthTokenGenerateRequest init(HashMap data) throws Exception { ); } - public OAuthTokenGenerateRequest clientId(String clientId) { + public OAuthTokenGenerateRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -95,12 +100,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public OAuthTokenGenerateRequest clientSecret(String clientSecret) { + public OAuthTokenGenerateRequest clientSecret(@jakarta.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -120,12 +125,12 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@jakarta.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; } - public OAuthTokenGenerateRequest code(String code) { + public OAuthTokenGenerateRequest code(@jakarta.annotation.Nonnull String code) { this.code = code; return this; } @@ -145,12 +150,12 @@ public String getCode() { @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(@jakarta.annotation.Nonnull String code) { this.code = code; } - public OAuthTokenGenerateRequest grantType(String grantType) { + public OAuthTokenGenerateRequest grantType(@jakarta.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -170,12 +175,12 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@jakarta.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenGenerateRequest state(String state) { + public OAuthTokenGenerateRequest state(@jakarta.annotation.Nonnull String state) { this.state = state; return this; } @@ -195,7 +200,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setState(String state) { + public void setState(@jakarta.annotation.Nonnull String state) { this.state = state; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java index fafe689fc..550d2ee1b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java @@ -38,19 +38,23 @@ OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_ID, OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_SECRET }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; + @jakarta.annotation.Nonnull private String grantType = "refresh_token"; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; + @jakarta.annotation.Nonnull private String refreshToken; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + @jakarta.annotation.Nullable private String clientSecret; public OAuthTokenRefreshRequest() { @@ -71,7 +75,7 @@ static public OAuthTokenRefreshRequest init(HashMap data) throws Exception { ); } - public OAuthTokenRefreshRequest grantType(String grantType) { + public OAuthTokenRefreshRequest grantType(@jakarta.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -91,12 +95,12 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@jakarta.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenRefreshRequest refreshToken(String refreshToken) { + public OAuthTokenRefreshRequest refreshToken(@jakarta.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -116,12 +120,12 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@jakarta.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenRefreshRequest clientId(String clientId) { + public OAuthTokenRefreshRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -141,12 +145,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + public OAuthTokenRefreshRequest clientSecret(@jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -166,7 +170,7 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@jakarta.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java index 94e707373..844693917 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java @@ -39,22 +39,27 @@ OAuthTokenResponse.JSON_PROPERTY_EXPIRES_IN, OAuthTokenResponse.JSON_PROPERTY_STATE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class OAuthTokenResponse { public static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token"; + @jakarta.annotation.Nullable private String accessToken; public static final String JSON_PROPERTY_TOKEN_TYPE = "token_type"; + @jakarta.annotation.Nullable private String tokenType; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; + @jakarta.annotation.Nullable private String refreshToken; public static final String JSON_PROPERTY_EXPIRES_IN = "expires_in"; + @jakarta.annotation.Nullable private Integer expiresIn; public static final String JSON_PROPERTY_STATE = "state"; + @jakarta.annotation.Nullable private String state; public OAuthTokenResponse() { @@ -75,7 +80,7 @@ static public OAuthTokenResponse init(HashMap data) throws Exception { ); } - public OAuthTokenResponse accessToken(String accessToken) { + public OAuthTokenResponse accessToken(@jakarta.annotation.Nullable String accessToken) { this.accessToken = accessToken; return this; } @@ -95,12 +100,12 @@ public String getAccessToken() { @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccessToken(String accessToken) { + public void setAccessToken(@jakarta.annotation.Nullable String accessToken) { this.accessToken = accessToken; } - public OAuthTokenResponse tokenType(String tokenType) { + public OAuthTokenResponse tokenType(@jakarta.annotation.Nullable String tokenType) { this.tokenType = tokenType; return this; } @@ -120,12 +125,12 @@ public String getTokenType() { @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenType(String tokenType) { + public void setTokenType(@jakarta.annotation.Nullable String tokenType) { this.tokenType = tokenType; } - public OAuthTokenResponse refreshToken(String refreshToken) { + public OAuthTokenResponse refreshToken(@jakarta.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -145,12 +150,12 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@jakarta.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenResponse expiresIn(Integer expiresIn) { + public OAuthTokenResponse expiresIn(@jakarta.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; return this; } @@ -170,12 +175,12 @@ public Integer getExpiresIn() { @JsonProperty(JSON_PROPERTY_EXPIRES_IN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresIn(Integer expiresIn) { + public void setExpiresIn(@jakarta.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; } - public OAuthTokenResponse state(String state) { + public OAuthTokenResponse state(@jakarta.annotation.Nullable String state) { this.state = state; return this; } @@ -195,7 +200,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setState(String state) { + public void setState(@jakarta.annotation.Nullable String state) { this.state = state; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java index bef5001e6..e88dbb0e2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java @@ -39,19 +39,20 @@ ReportCreateRequest.JSON_PROPERTY_REPORT_TYPE, ReportCreateRequest.JSON_PROPERTY_START_DATE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ReportCreateRequest { public static final String JSON_PROPERTY_END_DATE = "end_date"; + @jakarta.annotation.Nonnull private String endDate; /** * Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -81,9 +82,11 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; + @jakarta.annotation.Nonnull private List reportType = new ArrayList<>(); public static final String JSON_PROPERTY_START_DATE = "start_date"; + @jakarta.annotation.Nonnull private String startDate; public ReportCreateRequest() { @@ -104,7 +107,7 @@ static public ReportCreateRequest init(HashMap data) throws Exception { ); } - public ReportCreateRequest endDate(String endDate) { + public ReportCreateRequest endDate(@jakarta.annotation.Nonnull String endDate) { this.endDate = endDate; return this; } @@ -124,12 +127,12 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEndDate(String endDate) { + public void setEndDate(@jakarta.annotation.Nonnull String endDate) { this.endDate = endDate; } - public ReportCreateRequest reportType(List reportType) { + public ReportCreateRequest reportType(@jakarta.annotation.Nonnull List reportType) { this.reportType = reportType; return this; } @@ -157,12 +160,12 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReportType(List reportType) { + public void setReportType(@jakarta.annotation.Nonnull List reportType) { this.reportType = reportType; } - public ReportCreateRequest startDate(String startDate) { + public ReportCreateRequest startDate(@jakarta.annotation.Nonnull String startDate) { this.startDate = startDate; return this; } @@ -182,7 +185,7 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStartDate(String startDate) { + public void setStartDate(@jakarta.annotation.Nonnull String startDate) { this.startDate = startDate; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java index 3a042b474..0ca150bf4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java @@ -40,13 +40,15 @@ ReportCreateResponse.JSON_PROPERTY_REPORT, ReportCreateResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ReportCreateResponse { public static final String JSON_PROPERTY_REPORT = "report"; + @jakarta.annotation.Nonnull private ReportResponse report; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public ReportCreateResponse() { @@ -67,7 +69,7 @@ static public ReportCreateResponse init(HashMap data) throws Exception { ); } - public ReportCreateResponse report(ReportResponse report) { + public ReportCreateResponse report(@jakarta.annotation.Nonnull ReportResponse report) { this.report = report; return this; } @@ -87,12 +89,12 @@ public ReportResponse getReport() { @JsonProperty(JSON_PROPERTY_REPORT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReport(ReportResponse report) { + public void setReport(@jakarta.annotation.Nonnull ReportResponse report) { this.report = report; } - public ReportCreateResponse warnings(List warnings) { + public ReportCreateResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportResponse.java index 7491ccb4d..35770fa6c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ReportResponse.java @@ -40,25 +40,28 @@ ReportResponse.JSON_PROPERTY_END_DATE, ReportResponse.JSON_PROPERTY_REPORT_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class ReportResponse { public static final String JSON_PROPERTY_SUCCESS = "success"; + @jakarta.annotation.Nullable private String success; public static final String JSON_PROPERTY_START_DATE = "start_date"; + @jakarta.annotation.Nullable private String startDate; public static final String JSON_PROPERTY_END_DATE = "end_date"; + @jakarta.annotation.Nullable private String endDate; /** * Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -88,6 +91,7 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; + @jakarta.annotation.Nullable private List reportType = null; public ReportResponse() { @@ -108,7 +112,7 @@ static public ReportResponse init(HashMap data) throws Exception { ); } - public ReportResponse success(String success) { + public ReportResponse success(@jakarta.annotation.Nullable String success) { this.success = success; return this; } @@ -128,12 +132,12 @@ public String getSuccess() { @JsonProperty(JSON_PROPERTY_SUCCESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(String success) { + public void setSuccess(@jakarta.annotation.Nullable String success) { this.success = success; } - public ReportResponse startDate(String startDate) { + public ReportResponse startDate(@jakarta.annotation.Nullable String startDate) { this.startDate = startDate; return this; } @@ -153,12 +157,12 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartDate(String startDate) { + public void setStartDate(@jakarta.annotation.Nullable String startDate) { this.startDate = startDate; } - public ReportResponse endDate(String endDate) { + public ReportResponse endDate(@jakarta.annotation.Nullable String endDate) { this.endDate = endDate; return this; } @@ -178,12 +182,12 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndDate(String endDate) { + public void setEndDate(@jakarta.annotation.Nullable String endDate) { this.endDate = endDate; } - public ReportResponse reportType(List reportType) { + public ReportResponse reportType(@jakarta.annotation.Nullable List reportType) { this.reportType = reportType; return this; } @@ -211,7 +215,7 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportType(List reportType) { + public void setReportType(@jakarta.annotation.Nullable List reportType) { this.reportType = reportType; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index 0e3b1ce06..949ddb44b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -55,46 +55,59 @@ SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; + @jakarta.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; + @jakarta.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public SignatureRequestBulkCreateEmbeddedWithTemplateRequest() { @@ -115,7 +128,7 @@ static public SignatureRequestBulkCreateEmbeddedWithTemplateRequest init(HashMap ); } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -143,12 +156,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -168,12 +181,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile(@jakarta.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -193,12 +206,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@jakarta.annotation.Nullable File signerFile) { this.signerFile = signerFile; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerList(List signerList) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerList(@jakarta.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -226,12 +239,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@jakarta.annotation.Nullable List signerList) { this.signerList = signerList; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -251,12 +264,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -284,12 +297,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest customFields(List customFields) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -317,12 +330,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -342,12 +355,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest metadata(Map metadata) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -375,12 +388,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -400,12 +413,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -425,12 +438,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -450,12 +463,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -475,7 +488,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index f25da057d..1efde34d5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -55,46 +55,59 @@ SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_TEST_MODE, SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestBulkSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; + @jakarta.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; + @jakarta.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public SignatureRequestBulkSendWithTemplateRequest() { @@ -115,7 +128,7 @@ static public SignatureRequestBulkSendWithTemplateRequest init(HashMap data) thr ); } - public SignatureRequestBulkSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestBulkSendWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -143,12 +156,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkSendWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkSendWithTemplateRequest signerFile(@jakarta.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -168,12 +181,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@jakarta.annotation.Nullable File signerFile) { this.signerFile = signerFile; } - public SignatureRequestBulkSendWithTemplateRequest signerList(List signerList) { + public SignatureRequestBulkSendWithTemplateRequest signerList(@jakarta.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -201,12 +214,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@jakarta.annotation.Nullable List signerList) { this.signerList = signerList; } - public SignatureRequestBulkSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestBulkSendWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -226,12 +239,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkSendWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -259,12 +272,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestBulkSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkSendWithTemplateRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -284,12 +297,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestBulkSendWithTemplateRequest customFields(List customFields) { + public SignatureRequestBulkSendWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -317,12 +330,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkSendWithTemplateRequest message(String message) { + public SignatureRequestBulkSendWithTemplateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -342,12 +355,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestBulkSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestBulkSendWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -375,12 +388,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestBulkSendWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestBulkSendWithTemplateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -400,12 +413,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkSendWithTemplateRequest subject(String subject) { + public SignatureRequestBulkSendWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -425,12 +438,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkSendWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -450,12 +463,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkSendWithTemplateRequest title(String title) { + public SignatureRequestBulkSendWithTemplateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -475,7 +488,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java index 14fdbca17..3002deccd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java @@ -72,79 +72,103 @@ SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + @jakarta.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public SignatureRequestCreateEmbeddedRequest() { @@ -165,7 +189,7 @@ static public SignatureRequestCreateEmbeddedRequest init(HashMap data) throws Ex ); } - public SignatureRequestCreateEmbeddedRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -185,12 +209,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestCreateEmbeddedRequest files(List files) { + public SignatureRequestCreateEmbeddedRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -218,12 +242,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -251,12 +275,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedRequest signers(List signers) { + public SignatureRequestCreateEmbeddedRequest signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -284,12 +308,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } - public SignatureRequestCreateEmbeddedRequest groupedSigners(List groupedSigners) { + public SignatureRequestCreateEmbeddedRequest groupedSigners(@jakarta.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -317,12 +341,12 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners(@jakarta.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -342,12 +366,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public SignatureRequestCreateEmbeddedRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -367,12 +391,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestCreateEmbeddedRequest attachments(List attachments) { + public SignatureRequestCreateEmbeddedRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -400,12 +424,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestCreateEmbeddedRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -433,12 +457,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestCreateEmbeddedRequest customFields(List customFields) { + public SignatureRequestCreateEmbeddedRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -466,12 +490,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestCreateEmbeddedRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -491,12 +515,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public SignatureRequestCreateEmbeddedRequest formFieldGroups(List formFieldGroups) { + public SignatureRequestCreateEmbeddedRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -524,12 +548,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public SignatureRequestCreateEmbeddedRequest formFieldRules(List formFieldRules) { + public SignatureRequestCreateEmbeddedRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -557,12 +581,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public SignatureRequestCreateEmbeddedRequest formFieldsPerDocument(List formFieldsPerDocument) { + public SignatureRequestCreateEmbeddedRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -590,12 +614,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestCreateEmbeddedRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -615,12 +639,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public SignatureRequestCreateEmbeddedRequest message(String message) { + public SignatureRequestCreateEmbeddedRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -640,12 +664,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestCreateEmbeddedRequest metadata(Map metadata) { + public SignatureRequestCreateEmbeddedRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -673,12 +697,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestCreateEmbeddedRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -698,12 +722,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedRequest subject(String subject) { + public SignatureRequestCreateEmbeddedRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -723,12 +747,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -748,12 +772,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedRequest title(String title) { + public SignatureRequestCreateEmbeddedRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -773,12 +797,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public SignatureRequestCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public SignatureRequestCreateEmbeddedRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -798,12 +822,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public SignatureRequestCreateEmbeddedRequest populateAutoFillFields(Boolean populateAutoFillFields) { + public SignatureRequestCreateEmbeddedRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -823,12 +847,12 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public SignatureRequestCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public SignatureRequestCreateEmbeddedRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -848,7 +872,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java index 82e075ace..6dc29fb8e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java @@ -58,52 +58,67 @@ SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable private Boolean populateAutoFillFields = false; public SignatureRequestCreateEmbeddedWithTemplateRequest() { @@ -124,7 +139,7 @@ static public SignatureRequestCreateEmbeddedWithTemplateRequest init(HashMap dat ); } - public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -152,12 +167,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedWithTemplateRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -177,12 +192,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestCreateEmbeddedWithTemplateRequest signers(List signers) { + public SignatureRequestCreateEmbeddedWithTemplateRequest signers(@jakarta.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -210,12 +225,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -235,12 +250,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestCreateEmbeddedWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -268,12 +283,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestCreateEmbeddedWithTemplateRequest customFields(List customFields) { + public SignatureRequestCreateEmbeddedWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -301,12 +316,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedWithTemplateRequest files(List files) { + public SignatureRequestCreateEmbeddedWithTemplateRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -334,12 +349,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -367,12 +382,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestCreateEmbeddedWithTemplateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -392,12 +407,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestCreateEmbeddedWithTemplateRequest metadata(Map metadata) { + public SignatureRequestCreateEmbeddedWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -425,12 +440,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestCreateEmbeddedWithTemplateRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestCreateEmbeddedWithTemplateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -450,12 +465,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestCreateEmbeddedWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -475,12 +490,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -500,12 +515,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestCreateEmbeddedWithTemplateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -525,12 +540,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public SignatureRequestCreateEmbeddedWithTemplateRequest populateAutoFillFields(Boolean populateAutoFillFields) { + public SignatureRequestCreateEmbeddedWithTemplateRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -550,7 +565,7 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java new file mode 100644 index 000000000..9a40b64a2 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java @@ -0,0 +1,1454 @@ +/* + * 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 java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.SubAttachment; +import com.dropbox.sign.model.SubCustomField; +import com.dropbox.sign.model.SubFieldOptions; +import com.dropbox.sign.model.SubFormFieldGroup; +import com.dropbox.sign.model.SubFormFieldRule; +import com.dropbox.sign.model.SubFormFieldsPerDocumentBase; +import com.dropbox.sign.model.SubSignatureRequestGroupedSigners; +import com.dropbox.sign.model.SubSignatureRequestSigner; +import com.dropbox.sign.model.SubSigningOptions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * SignatureRequestEditEmbeddedRequest + */ +@JsonPropertyOrder({ + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_GROUPED_SIGNERS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_REASSIGN, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ATTACHMENTS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FIELD_OPTIONS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_RULES, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_USE_TEXT_TAGS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, + SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SignatureRequestEditEmbeddedRequest { + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull + private String clientId; + + public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable + private List fileUrls = null; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable + private List signers = null; + + public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + @jakarta.annotation.Nullable + private List groupedSigners = null; + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable + private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable + private Boolean allowReassign = false; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable + private List attachments = null; + + public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable + private List ccEmailAddresses = null; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable + private List customFields = null; + + public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable + private SubFieldOptions fieldOptions; + + public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable + private List formFieldGroups = null; + + public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable + private List formFieldRules = null; + + public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable + private List formFieldsPerDocument = null; + + public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable + private Boolean hideTextTags = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable + private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable + private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable + private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable + private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable + private String title; + + public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable + private Boolean useTextTags = false; + + public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable + private Boolean populateAutoFillFields = false; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable + private Integer expiresAt; + + public SignatureRequestEditEmbeddedRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SignatureRequestEditEmbeddedRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditEmbeddedRequest.class); + } + + static public SignatureRequestEditEmbeddedRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditEmbeddedRequest.class + ); + } + + public SignatureRequestEditEmbeddedRequest clientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app you're using to create this embedded signature request. Used for security purposes. + * @return clientId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClientId() { + return clientId; + } + + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + + public SignatureRequestEditEmbeddedRequest files(@jakarta.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return files + */ + @jakarta.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(@jakarta.annotation.Nullable List files) { + this.files = files; + } + + + public SignatureRequestEditEmbeddedRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return fileUrls + */ + @jakarta.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(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + + public SignatureRequestEditEmbeddedRequest signers(@jakarta.annotation.Nullable List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditEmbeddedRequest addSignersItem(SubSignatureRequestSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * @return signers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSigners() { + return signers; + } + + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigners(@jakarta.annotation.Nullable List signers) { + this.signers = signers; + } + + + public SignatureRequestEditEmbeddedRequest groupedSigners(@jakarta.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + return this; + } + + public SignatureRequestEditEmbeddedRequest addGroupedSignersItem(SubSignatureRequestGroupedSigners groupedSignersItem) { + if (this.groupedSigners == null) { + this.groupedSigners = new ArrayList<>(); + } + this.groupedSigners.add(groupedSignersItem); + return this; + } + + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * @return groupedSigners + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getGroupedSigners() { + return groupedSigners; + } + + + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroupedSigners(@jakarta.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + } + + + public SignatureRequestEditEmbeddedRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + * @return allowDecline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowDecline() { + return allowDecline; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + + public SignatureRequestEditEmbeddedRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + return this; + } + + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + * @return allowReassign + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowReassign() { + return allowReassign; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + } + + + public SignatureRequestEditEmbeddedRequest attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = attachments; + return this; + } + + public SignatureRequestEditEmbeddedRequest addAttachmentsItem(SubAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * A list describing the attachments + * @return attachments + */ + @jakarta.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(@jakarta.annotation.Nullable List attachments) { + this.attachments = attachments; + } + + + public SignatureRequestEditEmbeddedRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + return this; + } + + public SignatureRequestEditEmbeddedRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { + if (this.ccEmailAddresses == null) { + this.ccEmailAddresses = new ArrayList<>(); + } + this.ccEmailAddresses.add(ccEmailAddressesItem); + return this; + } + + /** + * The email addresses that should be CCed. + * @return ccEmailAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCcEmailAddresses() { + return ccEmailAddresses; + } + + + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + } + + + public SignatureRequestEditEmbeddedRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditEmbeddedRequest addCustomFieldsItem(SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + + public SignatureRequestEditEmbeddedRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + return this; + } + + /** + * Get fieldOptions + * @return fieldOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubFieldOptions getFieldOptions() { + return fieldOptions; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + } + + + public SignatureRequestEditEmbeddedRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldGroupsItem(SubFormFieldGroup formFieldGroupsItem) { + if (this.formFieldGroups == null) { + this.formFieldGroups = new ArrayList<>(); + } + this.formFieldGroups.add(formFieldGroupsItem); + return this; + } + + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * @return formFieldGroups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldGroups() { + return formFieldGroups; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + } + + + public SignatureRequestEditEmbeddedRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { + if (this.formFieldRules == null) { + this.formFieldRules = new ArrayList<>(); + } + this.formFieldRules.add(formFieldRulesItem); + return this; + } + + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + * @return formFieldRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldRules() { + return formFieldRules; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + } + + + public SignatureRequestEditEmbeddedRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + return this; + } + + public SignatureRequestEditEmbeddedRequest addFormFieldsPerDocumentItem(SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { + if (this.formFieldsPerDocument == null) { + this.formFieldsPerDocument = new ArrayList<>(); + } + this.formFieldsPerDocument.add(formFieldsPerDocumentItem); + return this; + } + + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * @return formFieldsPerDocument + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldsPerDocument() { + return formFieldsPerDocument; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + } + + + public SignatureRequestEditEmbeddedRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + return this; + } + + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * @return hideTextTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHideTextTags() { + return hideTextTags; + } + + + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + } + + + public SignatureRequestEditEmbeddedRequest message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + + public SignatureRequestEditEmbeddedRequest metadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditEmbeddedRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public SignatureRequestEditEmbeddedRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * @return signingOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + + public SignatureRequestEditEmbeddedRequest subject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubject() { + return subject; + } + + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + } + + + public SignatureRequestEditEmbeddedRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * @return testMode + */ + @jakarta.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(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + + public SignatureRequestEditEmbeddedRequest title(@jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * @return title + */ + @jakarta.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(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + + public SignatureRequestEditEmbeddedRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * @return useTextTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getUseTextTags() { + return useTextTags; + } + + + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + } + + + public SignatureRequestEditEmbeddedRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + return this; + } + + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * @return populateAutoFillFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPopulateAutoFillFields() { + return populateAutoFillFields; + } + + + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + } + + + public SignatureRequestEditEmbeddedRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExpiresAt() { + return expiresAt; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + } + + + /** + * Return true if this SignatureRequestEditEmbeddedRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest = (SignatureRequestEditEmbeddedRequest) o; + return Objects.equals(this.clientId, signatureRequestEditEmbeddedRequest.clientId) && + Objects.equals(this.files, signatureRequestEditEmbeddedRequest.files) && + Objects.equals(this.fileUrls, signatureRequestEditEmbeddedRequest.fileUrls) && + Objects.equals(this.signers, signatureRequestEditEmbeddedRequest.signers) && + Objects.equals(this.groupedSigners, signatureRequestEditEmbeddedRequest.groupedSigners) && + Objects.equals(this.allowDecline, signatureRequestEditEmbeddedRequest.allowDecline) && + Objects.equals(this.allowReassign, signatureRequestEditEmbeddedRequest.allowReassign) && + Objects.equals(this.attachments, signatureRequestEditEmbeddedRequest.attachments) && + Objects.equals(this.ccEmailAddresses, signatureRequestEditEmbeddedRequest.ccEmailAddresses) && + Objects.equals(this.customFields, signatureRequestEditEmbeddedRequest.customFields) && + Objects.equals(this.fieldOptions, signatureRequestEditEmbeddedRequest.fieldOptions) && + Objects.equals(this.formFieldGroups, signatureRequestEditEmbeddedRequest.formFieldGroups) && + Objects.equals(this.formFieldRules, signatureRequestEditEmbeddedRequest.formFieldRules) && + Objects.equals(this.formFieldsPerDocument, signatureRequestEditEmbeddedRequest.formFieldsPerDocument) && + Objects.equals(this.hideTextTags, signatureRequestEditEmbeddedRequest.hideTextTags) && + Objects.equals(this.message, signatureRequestEditEmbeddedRequest.message) && + Objects.equals(this.metadata, signatureRequestEditEmbeddedRequest.metadata) && + Objects.equals(this.signingOptions, signatureRequestEditEmbeddedRequest.signingOptions) && + Objects.equals(this.subject, signatureRequestEditEmbeddedRequest.subject) && + Objects.equals(this.testMode, signatureRequestEditEmbeddedRequest.testMode) && + Objects.equals(this.title, signatureRequestEditEmbeddedRequest.title) && + Objects.equals(this.useTextTags, signatureRequestEditEmbeddedRequest.useTextTags) && + Objects.equals(this.populateAutoFillFields, signatureRequestEditEmbeddedRequest.populateAutoFillFields) && + Objects.equals(this.expiresAt, signatureRequestEditEmbeddedRequest.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(clientId, files, fileUrls, signers, groupedSigners, allowDecline, allowReassign, attachments, ccEmailAddresses, customFields, fieldOptions, formFieldGroups, formFieldRules, formFieldsPerDocument, hideTextTags, message, metadata, signingOptions, subject, testMode, title, useTextTags, populateAutoFillFields, expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditEmbeddedRequest {\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); + sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); + sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); + sb.append(" formFieldsPerDocument: ").append(toIndentedString(formFieldsPerDocument)).append("\n"); + sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); + sb.append(" populateAutoFillFields: ").append(toIndentedString(populateAutoFillFields)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + 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 (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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) || + signers.getClass().equals(Integer.class) || + signers.getClass().equals(String.class) || + signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for(int i = 0; i< getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } + else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (groupedSigners != null) { + if (isFileTypeOrListOfFiles(groupedSigners)) { + fileTypeFound = true; + } + + if (groupedSigners.getClass().equals(java.io.File.class) || + groupedSigners.getClass().equals(Integer.class) || + groupedSigners.getClass().equals(String.class) || + groupedSigners.getClass().isEnum()) { + map.put("grouped_signers", groupedSigners); + } else if (isListOfFile(groupedSigners)) { + for(int i = 0; i< getListSize(groupedSigners); i++) { + map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); + } + } + else { + map.put("grouped_signers", JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) || + allowDecline.getClass().equals(Integer.class) || + allowDecline.getClass().equals(String.class) || + allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for(int i = 0; i< getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } + else { + map.put("allow_decline", JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (allowReassign != null) { + if (isFileTypeOrListOfFiles(allowReassign)) { + fileTypeFound = true; + } + + if (allowReassign.getClass().equals(java.io.File.class) || + allowReassign.getClass().equals(Integer.class) || + allowReassign.getClass().equals(String.class) || + allowReassign.getClass().isEnum()) { + map.put("allow_reassign", allowReassign); + } else if (isListOfFile(allowReassign)) { + for(int i = 0; i< getListSize(allowReassign); i++) { + map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); + } + } + else { + map.put("allow_reassign", JSON.getDefault().getMapper().writeValueAsString(allowReassign)); + } + } + 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)); + } + } + if (ccEmailAddresses != null) { + if (isFileTypeOrListOfFiles(ccEmailAddresses)) { + fileTypeFound = true; + } + + if (ccEmailAddresses.getClass().equals(java.io.File.class) || + ccEmailAddresses.getClass().equals(Integer.class) || + ccEmailAddresses.getClass().equals(String.class) || + ccEmailAddresses.getClass().isEnum()) { + map.put("cc_email_addresses", ccEmailAddresses); + } else if (isListOfFile(ccEmailAddresses)) { + for(int i = 0; i< getListSize(ccEmailAddresses); i++) { + map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); + } + } + else { + map.put("cc_email_addresses", JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); + } + } + if (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) || + customFields.getClass().equals(Integer.class) || + customFields.getClass().equals(String.class) || + customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for(int i = 0; i< getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } + else { + map.put("custom_fields", JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + if (fieldOptions != null) { + if (isFileTypeOrListOfFiles(fieldOptions)) { + fileTypeFound = true; + } + + if (fieldOptions.getClass().equals(java.io.File.class) || + fieldOptions.getClass().equals(Integer.class) || + fieldOptions.getClass().equals(String.class) || + fieldOptions.getClass().isEnum()) { + map.put("field_options", fieldOptions); + } else if (isListOfFile(fieldOptions)) { + for(int i = 0; i< getListSize(fieldOptions); i++) { + map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); + } + } + else { + map.put("field_options", JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); + } + } + if (formFieldGroups != null) { + if (isFileTypeOrListOfFiles(formFieldGroups)) { + fileTypeFound = true; + } + + if (formFieldGroups.getClass().equals(java.io.File.class) || + formFieldGroups.getClass().equals(Integer.class) || + formFieldGroups.getClass().equals(String.class) || + formFieldGroups.getClass().isEnum()) { + map.put("form_field_groups", formFieldGroups); + } else if (isListOfFile(formFieldGroups)) { + for(int i = 0; i< getListSize(formFieldGroups); i++) { + map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); + } + } + else { + map.put("form_field_groups", JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); + } + } + if (formFieldRules != null) { + if (isFileTypeOrListOfFiles(formFieldRules)) { + fileTypeFound = true; + } + + if (formFieldRules.getClass().equals(java.io.File.class) || + formFieldRules.getClass().equals(Integer.class) || + formFieldRules.getClass().equals(String.class) || + formFieldRules.getClass().isEnum()) { + map.put("form_field_rules", formFieldRules); + } else if (isListOfFile(formFieldRules)) { + for(int i = 0; i< getListSize(formFieldRules); i++) { + map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); + } + } + else { + map.put("form_field_rules", JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); + } + } + if (formFieldsPerDocument != null) { + if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { + fileTypeFound = true; + } + + if (formFieldsPerDocument.getClass().equals(java.io.File.class) || + formFieldsPerDocument.getClass().equals(Integer.class) || + formFieldsPerDocument.getClass().equals(String.class) || + formFieldsPerDocument.getClass().isEnum()) { + map.put("form_fields_per_document", formFieldsPerDocument); + } else if (isListOfFile(formFieldsPerDocument)) { + for(int i = 0; i< getListSize(formFieldsPerDocument); i++) { + map.put("form_fields_per_document[" + i + "]", getFromList(formFieldsPerDocument, i)); + } + } + else { + map.put("form_fields_per_document", JSON.getDefault().getMapper().writeValueAsString(formFieldsPerDocument)); + } + } + if (hideTextTags != null) { + if (isFileTypeOrListOfFiles(hideTextTags)) { + fileTypeFound = true; + } + + if (hideTextTags.getClass().equals(java.io.File.class) || + hideTextTags.getClass().equals(Integer.class) || + hideTextTags.getClass().equals(String.class) || + hideTextTags.getClass().isEnum()) { + map.put("hide_text_tags", hideTextTags); + } else if (isListOfFile(hideTextTags)) { + for(int i = 0; i< getListSize(hideTextTags); i++) { + map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); + } + } + else { + map.put("hide_text_tags", JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) || + signingOptions.getClass().equals(Integer.class) || + signingOptions.getClass().equals(String.class) || + signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for(int i = 0; i< getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } + else { + map.put("signing_options", JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + 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 (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 (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 (useTextTags != null) { + if (isFileTypeOrListOfFiles(useTextTags)) { + fileTypeFound = true; + } + + if (useTextTags.getClass().equals(java.io.File.class) || + useTextTags.getClass().equals(Integer.class) || + useTextTags.getClass().equals(String.class) || + useTextTags.getClass().isEnum()) { + map.put("use_text_tags", useTextTags); + } else if (isListOfFile(useTextTags)) { + for(int i = 0; i< getListSize(useTextTags); i++) { + map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); + } + } + else { + map.put("use_text_tags", JSON.getDefault().getMapper().writeValueAsString(useTextTags)); + } + } + if (populateAutoFillFields != null) { + if (isFileTypeOrListOfFiles(populateAutoFillFields)) { + fileTypeFound = true; + } + + if (populateAutoFillFields.getClass().equals(java.io.File.class) || + populateAutoFillFields.getClass().equals(Integer.class) || + populateAutoFillFields.getClass().equals(String.class) || + populateAutoFillFields.getClass().isEnum()) { + map.put("populate_auto_fill_fields", populateAutoFillFields); + } else if (isListOfFile(populateAutoFillFields)) { + for(int i = 0; i< getListSize(populateAutoFillFields); i++) { + map.put("populate_auto_fill_fields[" + i + "]", getFromList(populateAutoFillFields, i)); + } + } + else { + map.put("populate_auto_fill_fields", JSON.getDefault().getMapper().writeValueAsString(populateAutoFillFields)); + } + } + if (expiresAt != null) { + if (isFileTypeOrListOfFiles(expiresAt)) { + fileTypeFound = true; + } + + if (expiresAt.getClass().equals(java.io.File.class) || + expiresAt.getClass().equals(Integer.class) || + expiresAt.getClass().equals(String.class) || + expiresAt.getClass().isEnum()) { + map.put("expires_at", expiresAt); + } else if (isListOfFile(expiresAt)) { + for(int i = 0; i< getListSize(expiresAt); i++) { + map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); + } + } + else { + map.put("expires_at", JSON.getDefault().getMapper().writeValueAsString(expiresAt)); + } + } + } 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/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java new file mode 100644 index 000000000..af702922f --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java @@ -0,0 +1,958 @@ +/* + * 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 java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.SubCC; +import com.dropbox.sign.model.SubCustomField; +import com.dropbox.sign.model.SubSignatureRequestTemplateSigner; +import com.dropbox.sign.model.SubSigningOptions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * SignatureRequestEditEmbeddedWithTemplateRequest + */ +@JsonPropertyOrder({ + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILES, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SignatureRequestEditEmbeddedWithTemplateRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull + private List templateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull + private String clientId; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nonnull + private List signers = new ArrayList<>(); + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable + private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable + private List ccs = null; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable + private List customFields = null; + + public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable + private List fileUrls = null; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable + private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable + private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable + private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable + private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable + private String title; + + public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable + private Boolean populateAutoFillFields = false; + + public SignatureRequestEditEmbeddedWithTemplateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SignatureRequestEditEmbeddedWithTemplateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditEmbeddedWithTemplateRequest.class); + } + + static public SignatureRequestEditEmbeddedWithTemplateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditEmbeddedWithTemplateRequest.class + ); + } + + public SignatureRequestEditEmbeddedWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + * @return templateIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTemplateIds() { + return templateIds; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest clientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app you're using to create this embedded signature request. Used for security purposes. + * @return clientId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getClientId() { + return clientId; + } + + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setClientId(@jakarta.annotation.Nonnull String clientId) { + this.clientId = clientId; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest signers(@jakarta.annotation.Nonnull List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addSignersItem(SubSignatureRequestTemplateSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Templated-based Signature Request. + * @return signers + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSigners() { + return signers; + } + + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigners(@jakarta.annotation.Nonnull List signers) { + this.signers = signers; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + * @return allowDecline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowDecline() { + return allowDecline; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { + this.ccs = ccs; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { + if (this.ccs == null) { + this.ccs = new ArrayList<>(); + } + this.ccs.add(ccsItem); + return this; + } + + /** + * Add CC email recipients. Required when a CC role exists for the Template. + * @return ccs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCcs() { + return ccs; + } + + + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcs(@jakarta.annotation.Nullable List ccs) { + this.ccs = ccs; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addCustomFieldsItem(SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest files(@jakarta.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return files + */ + @jakarta.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(@jakarta.annotation.Nullable List files) { + this.files = files; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return fileUrls + */ + @jakarta.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(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditEmbeddedWithTemplateRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * @return signingOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubject() { + return subject; + } + + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * @return testMode + */ + @jakarta.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(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest title(@jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * @return title + */ + @jakarta.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(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + + public SignatureRequestEditEmbeddedWithTemplateRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + return this; + } + + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * @return populateAutoFillFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getPopulateAutoFillFields() { + return populateAutoFillFields; + } + + + @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { + this.populateAutoFillFields = populateAutoFillFields; + } + + + /** + * Return true if this SignatureRequestEditEmbeddedWithTemplateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditEmbeddedWithTemplateRequest signatureRequestEditEmbeddedWithTemplateRequest = (SignatureRequestEditEmbeddedWithTemplateRequest) o; + return Objects.equals(this.templateIds, signatureRequestEditEmbeddedWithTemplateRequest.templateIds) && + Objects.equals(this.clientId, signatureRequestEditEmbeddedWithTemplateRequest.clientId) && + Objects.equals(this.signers, signatureRequestEditEmbeddedWithTemplateRequest.signers) && + Objects.equals(this.allowDecline, signatureRequestEditEmbeddedWithTemplateRequest.allowDecline) && + Objects.equals(this.ccs, signatureRequestEditEmbeddedWithTemplateRequest.ccs) && + Objects.equals(this.customFields, signatureRequestEditEmbeddedWithTemplateRequest.customFields) && + Objects.equals(this.files, signatureRequestEditEmbeddedWithTemplateRequest.files) && + Objects.equals(this.fileUrls, signatureRequestEditEmbeddedWithTemplateRequest.fileUrls) && + Objects.equals(this.message, signatureRequestEditEmbeddedWithTemplateRequest.message) && + Objects.equals(this.metadata, signatureRequestEditEmbeddedWithTemplateRequest.metadata) && + Objects.equals(this.signingOptions, signatureRequestEditEmbeddedWithTemplateRequest.signingOptions) && + Objects.equals(this.subject, signatureRequestEditEmbeddedWithTemplateRequest.subject) && + Objects.equals(this.testMode, signatureRequestEditEmbeddedWithTemplateRequest.testMode) && + Objects.equals(this.title, signatureRequestEditEmbeddedWithTemplateRequest.title) && + Objects.equals(this.populateAutoFillFields, signatureRequestEditEmbeddedWithTemplateRequest.populateAutoFillFields); + } + + @Override + public int hashCode() { + return Objects.hash(templateIds, clientId, signers, allowDecline, ccs, customFields, files, fileUrls, message, metadata, signingOptions, subject, testMode, title, populateAutoFillFields); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditEmbeddedWithTemplateRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" populateAutoFillFields: ").append(toIndentedString(populateAutoFillFields)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (templateIds != null) { + if (isFileTypeOrListOfFiles(templateIds)) { + fileTypeFound = true; + } + + if (templateIds.getClass().equals(java.io.File.class) || + templateIds.getClass().equals(Integer.class) || + templateIds.getClass().equals(String.class) || + templateIds.getClass().isEnum()) { + map.put("template_ids", templateIds); + } else if (isListOfFile(templateIds)) { + for(int i = 0; i< getListSize(templateIds); i++) { + map.put("template_ids[" + i + "]", getFromList(templateIds, i)); + } + } + else { + map.put("template_ids", JSON.getDefault().getMapper().writeValueAsString(templateIds)); + } + } + 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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) || + signers.getClass().equals(Integer.class) || + signers.getClass().equals(String.class) || + signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for(int i = 0; i< getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } + else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) || + allowDecline.getClass().equals(Integer.class) || + allowDecline.getClass().equals(String.class) || + allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for(int i = 0; i< getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } + else { + map.put("allow_decline", JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (ccs != null) { + if (isFileTypeOrListOfFiles(ccs)) { + fileTypeFound = true; + } + + if (ccs.getClass().equals(java.io.File.class) || + ccs.getClass().equals(Integer.class) || + ccs.getClass().equals(String.class) || + ccs.getClass().isEnum()) { + map.put("ccs", ccs); + } else if (isListOfFile(ccs)) { + for(int i = 0; i< getListSize(ccs); i++) { + map.put("ccs[" + i + "]", getFromList(ccs, i)); + } + } + else { + map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); + } + } + if (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) || + customFields.getClass().equals(Integer.class) || + customFields.getClass().equals(String.class) || + customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for(int i = 0; i< getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } + else { + map.put("custom_fields", JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + 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 (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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) || + signingOptions.getClass().equals(Integer.class) || + signingOptions.getClass().equals(String.class) || + signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for(int i = 0; i< getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } + else { + map.put("signing_options", JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + 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 (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 (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 (populateAutoFillFields != null) { + if (isFileTypeOrListOfFiles(populateAutoFillFields)) { + fileTypeFound = true; + } + + if (populateAutoFillFields.getClass().equals(java.io.File.class) || + populateAutoFillFields.getClass().equals(Integer.class) || + populateAutoFillFields.getClass().equals(String.class) || + populateAutoFillFields.getClass().isEnum()) { + map.put("populate_auto_fill_fields", populateAutoFillFields); + } else if (isListOfFile(populateAutoFillFields)) { + for(int i = 0; i< getListSize(populateAutoFillFields); i++) { + map.put("populate_auto_fill_fields[" + i + "]", getFromList(populateAutoFillFields, i)); + } + } + else { + map.put("populate_auto_fill_fields", JSON.getDefault().getMapper().writeValueAsString(populateAutoFillFields)); + } + } + } 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/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java new file mode 100644 index 000000000..719a6b457 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java @@ -0,0 +1,1505 @@ +/* + * 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 java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.SubAttachment; +import com.dropbox.sign.model.SubCustomField; +import com.dropbox.sign.model.SubFieldOptions; +import com.dropbox.sign.model.SubFormFieldGroup; +import com.dropbox.sign.model.SubFormFieldRule; +import com.dropbox.sign.model.SubFormFieldsPerDocumentBase; +import com.dropbox.sign.model.SubSignatureRequestGroupedSigners; +import com.dropbox.sign.model.SubSignatureRequestSigner; +import com.dropbox.sign.model.SubSigningOptions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * SignatureRequestEditRequest + */ +@JsonPropertyOrder({ + SignatureRequestEditRequest.JSON_PROPERTY_FILES, + SignatureRequestEditRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditRequest.JSON_PROPERTY_GROUPED_SIGNERS, + SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_REASSIGN, + SignatureRequestEditRequest.JSON_PROPERTY_ATTACHMENTS, + SignatureRequestEditRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, + SignatureRequestEditRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditRequest.JSON_PROPERTY_FIELD_OPTIONS, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_RULES, + SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, + SignatureRequestEditRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, + SignatureRequestEditRequest.JSON_PROPERTY_IS_EID, + SignatureRequestEditRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, + SignatureRequestEditRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditRequest.JSON_PROPERTY_TITLE, + SignatureRequestEditRequest.JSON_PROPERTY_USE_TEXT_TAGS, + SignatureRequestEditRequest.JSON_PROPERTY_EXPIRES_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SignatureRequestEditRequest { + public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable + private List fileUrls = null; + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable + private List signers = null; + + public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + @jakarta.annotation.Nullable + private List groupedSigners = null; + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable + private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable + private Boolean allowReassign = false; + + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable + private List attachments = null; + + public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable + private List ccEmailAddresses = null; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable + private String clientId; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable + private List customFields = null; + + public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable + private SubFieldOptions fieldOptions; + + public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable + private List formFieldGroups = null; + + public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable + private List formFieldRules = null; + + public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable + private List formFieldsPerDocument = null; + + public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable + private Boolean hideTextTags = false; + + public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @jakarta.annotation.Nullable + private Boolean isEid = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable + private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable + private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable + private String signingRedirectUrl; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable + private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable + private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable + private String title; + + public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable + private Boolean useTextTags = false; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable + private Integer expiresAt; + + public SignatureRequestEditRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SignatureRequestEditRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditRequest.class); + } + + static public SignatureRequestEditRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditRequest.class + ); + } + + public SignatureRequestEditRequest files(@jakarta.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return files + */ + @jakarta.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(@jakarta.annotation.Nullable List files) { + this.files = files; + } + + + public SignatureRequestEditRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return fileUrls + */ + @jakarta.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(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + + public SignatureRequestEditRequest signers(@jakarta.annotation.Nullable List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditRequest addSignersItem(SubSignatureRequestSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * @return signers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getSigners() { + return signers; + } + + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigners(@jakarta.annotation.Nullable List signers) { + this.signers = signers; + } + + + public SignatureRequestEditRequest groupedSigners(@jakarta.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + return this; + } + + public SignatureRequestEditRequest addGroupedSignersItem(SubSignatureRequestGroupedSigners groupedSignersItem) { + if (this.groupedSigners == null) { + this.groupedSigners = new ArrayList<>(); + } + this.groupedSigners.add(groupedSignersItem); + return this; + } + + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * @return groupedSigners + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getGroupedSigners() { + return groupedSigners; + } + + + @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroupedSigners(@jakarta.annotation.Nullable List groupedSigners) { + this.groupedSigners = groupedSigners; + } + + + public SignatureRequestEditRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + * @return allowDecline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowDecline() { + return allowDecline; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + + public SignatureRequestEditRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + return this; + } + + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + * @return allowReassign + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowReassign() { + return allowReassign; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { + this.allowReassign = allowReassign; + } + + + public SignatureRequestEditRequest attachments(@jakarta.annotation.Nullable List attachments) { + this.attachments = attachments; + return this; + } + + public SignatureRequestEditRequest addAttachmentsItem(SubAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * A list describing the attachments + * @return attachments + */ + @jakarta.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(@jakarta.annotation.Nullable List attachments) { + this.attachments = attachments; + } + + + public SignatureRequestEditRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + return this; + } + + public SignatureRequestEditRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { + if (this.ccEmailAddresses == null) { + this.ccEmailAddresses = new ArrayList<>(); + } + this.ccEmailAddresses.add(ccEmailAddressesItem); + return this; + } + + /** + * The email addresses that should be CCed. + * @return ccEmailAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCcEmailAddresses() { + return ccEmailAddresses; + } + + + @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { + this.ccEmailAddresses = ccEmailAddresses; + } + + + public SignatureRequestEditRequest clientId(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + * @return clientId + */ + @jakarta.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(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + } + + + public SignatureRequestEditRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditRequest addCustomFieldsItem(SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + + public SignatureRequestEditRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + return this; + } + + /** + * Get fieldOptions + * @return fieldOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubFieldOptions getFieldOptions() { + return fieldOptions; + } + + + @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { + this.fieldOptions = fieldOptions; + } + + + public SignatureRequestEditRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + return this; + } + + public SignatureRequestEditRequest addFormFieldGroupsItem(SubFormFieldGroup formFieldGroupsItem) { + if (this.formFieldGroups == null) { + this.formFieldGroups = new ArrayList<>(); + } + this.formFieldGroups.add(formFieldGroupsItem); + return this; + } + + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * @return formFieldGroups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldGroups() { + return formFieldGroups; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { + this.formFieldGroups = formFieldGroups; + } + + + public SignatureRequestEditRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + return this; + } + + public SignatureRequestEditRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { + if (this.formFieldRules == null) { + this.formFieldRules = new ArrayList<>(); + } + this.formFieldRules.add(formFieldRulesItem); + return this; + } + + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + * @return formFieldRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldRules() { + return formFieldRules; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { + this.formFieldRules = formFieldRules; + } + + + public SignatureRequestEditRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + return this; + } + + public SignatureRequestEditRequest addFormFieldsPerDocumentItem(SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { + if (this.formFieldsPerDocument == null) { + this.formFieldsPerDocument = new ArrayList<>(); + } + this.formFieldsPerDocument.add(formFieldsPerDocumentItem); + return this; + } + + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * @return formFieldsPerDocument + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFieldsPerDocument() { + return formFieldsPerDocument; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { + this.formFieldsPerDocument = formFieldsPerDocument; + } + + + public SignatureRequestEditRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + return this; + } + + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * @return hideTextTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getHideTextTags() { + return hideTextTags; + } + + + @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { + this.hideTextTags = hideTextTags; + } + + + public SignatureRequestEditRequest isEid(@jakarta.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * @return isEid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsEid() { + return isEid; + } + + + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsEid(@jakarta.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + } + + + public SignatureRequestEditRequest message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + + public SignatureRequestEditRequest metadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public SignatureRequestEditRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * @return signingOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + + public SignatureRequestEditRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + return this; + } + + /** + * The URL you want signers redirected to after they successfully sign. + * @return signingRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSigningRedirectUrl() { + return signingRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + } + + + public SignatureRequestEditRequest subject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubject() { + return subject; + } + + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + } + + + public SignatureRequestEditRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * @return testMode + */ + @jakarta.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(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + + public SignatureRequestEditRequest title(@jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * @return title + */ + @jakarta.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(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + + public SignatureRequestEditRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * @return useTextTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getUseTextTags() { + return useTextTags; + } + + + @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { + this.useTextTags = useTextTags; + } + + + public SignatureRequestEditRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getExpiresAt() { + return expiresAt; + } + + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { + this.expiresAt = expiresAt; + } + + + /** + * Return true if this SignatureRequestEditRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditRequest signatureRequestEditRequest = (SignatureRequestEditRequest) o; + return Objects.equals(this.files, signatureRequestEditRequest.files) && + Objects.equals(this.fileUrls, signatureRequestEditRequest.fileUrls) && + Objects.equals(this.signers, signatureRequestEditRequest.signers) && + Objects.equals(this.groupedSigners, signatureRequestEditRequest.groupedSigners) && + Objects.equals(this.allowDecline, signatureRequestEditRequest.allowDecline) && + Objects.equals(this.allowReassign, signatureRequestEditRequest.allowReassign) && + Objects.equals(this.attachments, signatureRequestEditRequest.attachments) && + Objects.equals(this.ccEmailAddresses, signatureRequestEditRequest.ccEmailAddresses) && + Objects.equals(this.clientId, signatureRequestEditRequest.clientId) && + Objects.equals(this.customFields, signatureRequestEditRequest.customFields) && + Objects.equals(this.fieldOptions, signatureRequestEditRequest.fieldOptions) && + Objects.equals(this.formFieldGroups, signatureRequestEditRequest.formFieldGroups) && + Objects.equals(this.formFieldRules, signatureRequestEditRequest.formFieldRules) && + Objects.equals(this.formFieldsPerDocument, signatureRequestEditRequest.formFieldsPerDocument) && + Objects.equals(this.hideTextTags, signatureRequestEditRequest.hideTextTags) && + Objects.equals(this.isEid, signatureRequestEditRequest.isEid) && + Objects.equals(this.message, signatureRequestEditRequest.message) && + Objects.equals(this.metadata, signatureRequestEditRequest.metadata) && + Objects.equals(this.signingOptions, signatureRequestEditRequest.signingOptions) && + Objects.equals(this.signingRedirectUrl, signatureRequestEditRequest.signingRedirectUrl) && + Objects.equals(this.subject, signatureRequestEditRequest.subject) && + Objects.equals(this.testMode, signatureRequestEditRequest.testMode) && + Objects.equals(this.title, signatureRequestEditRequest.title) && + Objects.equals(this.useTextTags, signatureRequestEditRequest.useTextTags) && + Objects.equals(this.expiresAt, signatureRequestEditRequest.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(files, fileUrls, signers, groupedSigners, allowDecline, allowReassign, attachments, ccEmailAddresses, clientId, customFields, fieldOptions, formFieldGroups, formFieldRules, formFieldsPerDocument, hideTextTags, isEid, message, metadata, signingOptions, signingRedirectUrl, subject, testMode, title, useTextTags, expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditRequest {\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); + sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); + sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); + sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); + sb.append(" formFieldsPerDocument: ").append(toIndentedString(formFieldsPerDocument)).append("\n"); + sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); + sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" signingRedirectUrl: ").append(toIndentedString(signingRedirectUrl)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + 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 (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) || + signers.getClass().equals(Integer.class) || + signers.getClass().equals(String.class) || + signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for(int i = 0; i< getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } + else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (groupedSigners != null) { + if (isFileTypeOrListOfFiles(groupedSigners)) { + fileTypeFound = true; + } + + if (groupedSigners.getClass().equals(java.io.File.class) || + groupedSigners.getClass().equals(Integer.class) || + groupedSigners.getClass().equals(String.class) || + groupedSigners.getClass().isEnum()) { + map.put("grouped_signers", groupedSigners); + } else if (isListOfFile(groupedSigners)) { + for(int i = 0; i< getListSize(groupedSigners); i++) { + map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); + } + } + else { + map.put("grouped_signers", JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) || + allowDecline.getClass().equals(Integer.class) || + allowDecline.getClass().equals(String.class) || + allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for(int i = 0; i< getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } + else { + map.put("allow_decline", JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (allowReassign != null) { + if (isFileTypeOrListOfFiles(allowReassign)) { + fileTypeFound = true; + } + + if (allowReassign.getClass().equals(java.io.File.class) || + allowReassign.getClass().equals(Integer.class) || + allowReassign.getClass().equals(String.class) || + allowReassign.getClass().isEnum()) { + map.put("allow_reassign", allowReassign); + } else if (isListOfFile(allowReassign)) { + for(int i = 0; i< getListSize(allowReassign); i++) { + map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); + } + } + else { + map.put("allow_reassign", JSON.getDefault().getMapper().writeValueAsString(allowReassign)); + } + } + 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)); + } + } + if (ccEmailAddresses != null) { + if (isFileTypeOrListOfFiles(ccEmailAddresses)) { + fileTypeFound = true; + } + + if (ccEmailAddresses.getClass().equals(java.io.File.class) || + ccEmailAddresses.getClass().equals(Integer.class) || + ccEmailAddresses.getClass().equals(String.class) || + ccEmailAddresses.getClass().isEnum()) { + map.put("cc_email_addresses", ccEmailAddresses); + } else if (isListOfFile(ccEmailAddresses)) { + for(int i = 0; i< getListSize(ccEmailAddresses); i++) { + map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); + } + } + else { + map.put("cc_email_addresses", JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); + } + } + 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 (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) || + customFields.getClass().equals(Integer.class) || + customFields.getClass().equals(String.class) || + customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for(int i = 0; i< getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } + else { + map.put("custom_fields", JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + if (fieldOptions != null) { + if (isFileTypeOrListOfFiles(fieldOptions)) { + fileTypeFound = true; + } + + if (fieldOptions.getClass().equals(java.io.File.class) || + fieldOptions.getClass().equals(Integer.class) || + fieldOptions.getClass().equals(String.class) || + fieldOptions.getClass().isEnum()) { + map.put("field_options", fieldOptions); + } else if (isListOfFile(fieldOptions)) { + for(int i = 0; i< getListSize(fieldOptions); i++) { + map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); + } + } + else { + map.put("field_options", JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); + } + } + if (formFieldGroups != null) { + if (isFileTypeOrListOfFiles(formFieldGroups)) { + fileTypeFound = true; + } + + if (formFieldGroups.getClass().equals(java.io.File.class) || + formFieldGroups.getClass().equals(Integer.class) || + formFieldGroups.getClass().equals(String.class) || + formFieldGroups.getClass().isEnum()) { + map.put("form_field_groups", formFieldGroups); + } else if (isListOfFile(formFieldGroups)) { + for(int i = 0; i< getListSize(formFieldGroups); i++) { + map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); + } + } + else { + map.put("form_field_groups", JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); + } + } + if (formFieldRules != null) { + if (isFileTypeOrListOfFiles(formFieldRules)) { + fileTypeFound = true; + } + + if (formFieldRules.getClass().equals(java.io.File.class) || + formFieldRules.getClass().equals(Integer.class) || + formFieldRules.getClass().equals(String.class) || + formFieldRules.getClass().isEnum()) { + map.put("form_field_rules", formFieldRules); + } else if (isListOfFile(formFieldRules)) { + for(int i = 0; i< getListSize(formFieldRules); i++) { + map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); + } + } + else { + map.put("form_field_rules", JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); + } + } + if (formFieldsPerDocument != null) { + if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { + fileTypeFound = true; + } + + if (formFieldsPerDocument.getClass().equals(java.io.File.class) || + formFieldsPerDocument.getClass().equals(Integer.class) || + formFieldsPerDocument.getClass().equals(String.class) || + formFieldsPerDocument.getClass().isEnum()) { + map.put("form_fields_per_document", formFieldsPerDocument); + } else if (isListOfFile(formFieldsPerDocument)) { + for(int i = 0; i< getListSize(formFieldsPerDocument); i++) { + map.put("form_fields_per_document[" + i + "]", getFromList(formFieldsPerDocument, i)); + } + } + else { + map.put("form_fields_per_document", JSON.getDefault().getMapper().writeValueAsString(formFieldsPerDocument)); + } + } + if (hideTextTags != null) { + if (isFileTypeOrListOfFiles(hideTextTags)) { + fileTypeFound = true; + } + + if (hideTextTags.getClass().equals(java.io.File.class) || + hideTextTags.getClass().equals(Integer.class) || + hideTextTags.getClass().equals(String.class) || + hideTextTags.getClass().isEnum()) { + map.put("hide_text_tags", hideTextTags); + } else if (isListOfFile(hideTextTags)) { + for(int i = 0; i< getListSize(hideTextTags); i++) { + map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); + } + } + else { + map.put("hide_text_tags", JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); + } + } + if (isEid != null) { + if (isFileTypeOrListOfFiles(isEid)) { + fileTypeFound = true; + } + + if (isEid.getClass().equals(java.io.File.class) || + isEid.getClass().equals(Integer.class) || + isEid.getClass().equals(String.class) || + isEid.getClass().isEnum()) { + map.put("is_eid", isEid); + } else if (isListOfFile(isEid)) { + for(int i = 0; i< getListSize(isEid); i++) { + map.put("is_eid[" + i + "]", getFromList(isEid, i)); + } + } + else { + map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) || + signingOptions.getClass().equals(Integer.class) || + signingOptions.getClass().equals(String.class) || + signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for(int i = 0; i< getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } + else { + map.put("signing_options", JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + if (signingRedirectUrl != null) { + if (isFileTypeOrListOfFiles(signingRedirectUrl)) { + fileTypeFound = true; + } + + if (signingRedirectUrl.getClass().equals(java.io.File.class) || + signingRedirectUrl.getClass().equals(Integer.class) || + signingRedirectUrl.getClass().equals(String.class) || + signingRedirectUrl.getClass().isEnum()) { + map.put("signing_redirect_url", signingRedirectUrl); + } else if (isListOfFile(signingRedirectUrl)) { + for(int i = 0; i< getListSize(signingRedirectUrl); i++) { + map.put("signing_redirect_url[" + i + "]", getFromList(signingRedirectUrl, i)); + } + } + else { + map.put("signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); + } + } + 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 (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 (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 (useTextTags != null) { + if (isFileTypeOrListOfFiles(useTextTags)) { + fileTypeFound = true; + } + + if (useTextTags.getClass().equals(java.io.File.class) || + useTextTags.getClass().equals(Integer.class) || + useTextTags.getClass().equals(String.class) || + useTextTags.getClass().isEnum()) { + map.put("use_text_tags", useTextTags); + } else if (isListOfFile(useTextTags)) { + for(int i = 0; i< getListSize(useTextTags); i++) { + map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); + } + } + else { + map.put("use_text_tags", JSON.getDefault().getMapper().writeValueAsString(useTextTags)); + } + } + if (expiresAt != null) { + if (isFileTypeOrListOfFiles(expiresAt)) { + fileTypeFound = true; + } + + if (expiresAt.getClass().equals(java.io.File.class) || + expiresAt.getClass().equals(Integer.class) || + expiresAt.getClass().equals(String.class) || + expiresAt.getClass().isEnum()) { + map.put("expires_at", expiresAt); + } else if (isListOfFile(expiresAt)) { + for(int i = 0; i< getListSize(expiresAt); i++) { + map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); + } + } + else { + map.put("expires_at", JSON.getDefault().getMapper().writeValueAsString(expiresAt)); + } + } + } 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/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java new file mode 100644 index 000000000..02f2a4d2f --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java @@ -0,0 +1,1009 @@ +/* + * 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 java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.SubCC; +import com.dropbox.sign.model.SubCustomField; +import com.dropbox.sign.model.SubSignatureRequestTemplateSigner; +import com.dropbox.sign.model.SubSigningOptions; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * + */ +@JsonPropertyOrder({ + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNERS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CCS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILES, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILE_URLS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_IS_EID, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_MESSAGE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_METADATA, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SUBJECT, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEST_MODE, + SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SignatureRequestEditWithTemplateRequest { + public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull + private List templateIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nonnull + private List signers = new ArrayList<>(); + + public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable + private Boolean allowDecline = false; + + public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable + private List ccs = null; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable + private String clientId; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable + private List customFields = null; + + public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable + private List fileUrls = null; + + public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @jakarta.annotation.Nullable + private Boolean isEid = false; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable + private Map metadata = null; + + public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable + private SubSigningOptions signingOptions; + + public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable + private String signingRedirectUrl; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable + private String subject; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable + private Boolean testMode = false; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable + private String title; + + public SignatureRequestEditWithTemplateRequest() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SignatureRequestEditWithTemplateRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SignatureRequestEditWithTemplateRequest.class); + } + + static public SignatureRequestEditWithTemplateRequest init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SignatureRequestEditWithTemplateRequest.class + ); + } + + public SignatureRequestEditWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + return this; + } + + public SignatureRequestEditWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { + if (this.templateIds == null) { + this.templateIds = new ArrayList<>(); + } + this.templateIds.add(templateIdsItem); + return this; + } + + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + * @return templateIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getTemplateIds() { + return templateIds; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + + public SignatureRequestEditWithTemplateRequest signers(@jakarta.annotation.Nonnull List signers) { + this.signers = signers; + return this; + } + + public SignatureRequestEditWithTemplateRequest addSignersItem(SubSignatureRequestTemplateSigner signersItem) { + if (this.signers == null) { + this.signers = new ArrayList<>(); + } + this.signers.add(signersItem); + return this; + } + + /** + * Add Signers to your Templated-based Signature Request. + * @return signers + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSigners() { + return signers; + } + + + @JsonProperty(JSON_PROPERTY_SIGNERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigners(@jakarta.annotation.Nonnull List signers) { + this.signers = signers; + } + + + public SignatureRequestEditWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + return this; + } + + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + * @return allowDecline + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAllowDecline() { + return allowDecline; + } + + + @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { + this.allowDecline = allowDecline; + } + + + public SignatureRequestEditWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { + this.ccs = ccs; + return this; + } + + public SignatureRequestEditWithTemplateRequest addCcsItem(SubCC ccsItem) { + if (this.ccs == null) { + this.ccs = new ArrayList<>(); + } + this.ccs.add(ccsItem); + return this; + } + + /** + * Add CC email recipients. Required when a CC role exists for the Template. + * @return ccs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCcs() { + return ccs; + } + + + @JsonProperty(JSON_PROPERTY_CCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCcs(@jakarta.annotation.Nullable List ccs) { + this.ccs = ccs; + } + + + public SignatureRequestEditWithTemplateRequest clientId(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + * @return clientId + */ + @jakarta.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(@jakarta.annotation.Nullable String clientId) { + this.clientId = clientId; + } + + + public SignatureRequestEditWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public SignatureRequestEditWithTemplateRequest addCustomFieldsItem(SubCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + + public SignatureRequestEditWithTemplateRequest files(@jakarta.annotation.Nullable List files) { + this.files = files; + return this; + } + + public SignatureRequestEditWithTemplateRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return files + */ + @jakarta.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(@jakarta.annotation.Nullable List files) { + this.files = files; + } + + + public SignatureRequestEditWithTemplateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public SignatureRequestEditWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * @return fileUrls + */ + @jakarta.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(@jakarta.annotation.Nullable List fileUrls) { + this.fileUrls = fileUrls; + } + + + public SignatureRequestEditWithTemplateRequest isEid(@jakarta.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + return this; + } + + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br> **NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * @return isEid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getIsEid() { + return isEid; + } + + + @JsonProperty(JSON_PROPERTY_IS_EID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsEid(@jakarta.annotation.Nullable Boolean isEid) { + this.isEid = isEid; + } + + + public SignatureRequestEditWithTemplateRequest message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The custom message in the email that will be sent to the signers. + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + + public SignatureRequestEditWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + return this; + } + + public SignatureRequestEditWithTemplateRequest putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getMetadata() { + return metadata; + } + + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { + this.metadata = metadata; + } + + + public SignatureRequestEditWithTemplateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + return this; + } + + /** + * Get signingOptions + * @return signingOptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SubSigningOptions getSigningOptions() { + return signingOptions; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { + this.signingOptions = signingOptions; + } + + + public SignatureRequestEditWithTemplateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + return this; + } + + /** + * The URL you want signers redirected to after they successfully sign. + * @return signingRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSigningRedirectUrl() { + return signingRedirectUrl; + } + + + @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { + this.signingRedirectUrl = signingRedirectUrl; + } + + + public SignatureRequestEditWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * The subject in the email that will be sent to the signers. + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubject() { + return subject; + } + + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubject(@jakarta.annotation.Nullable String subject) { + this.subject = subject; + } + + + public SignatureRequestEditWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * @return testMode + */ + @jakarta.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(@jakarta.annotation.Nullable Boolean testMode) { + this.testMode = testMode; + } + + + public SignatureRequestEditWithTemplateRequest title(@jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title you want to assign to the SignatureRequest. + * @return title + */ + @jakarta.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(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + + /** + * Return true if this SignatureRequestEditWithTemplateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest = (SignatureRequestEditWithTemplateRequest) o; + return Objects.equals(this.templateIds, signatureRequestEditWithTemplateRequest.templateIds) && + Objects.equals(this.signers, signatureRequestEditWithTemplateRequest.signers) && + Objects.equals(this.allowDecline, signatureRequestEditWithTemplateRequest.allowDecline) && + Objects.equals(this.ccs, signatureRequestEditWithTemplateRequest.ccs) && + Objects.equals(this.clientId, signatureRequestEditWithTemplateRequest.clientId) && + Objects.equals(this.customFields, signatureRequestEditWithTemplateRequest.customFields) && + Objects.equals(this.files, signatureRequestEditWithTemplateRequest.files) && + Objects.equals(this.fileUrls, signatureRequestEditWithTemplateRequest.fileUrls) && + Objects.equals(this.isEid, signatureRequestEditWithTemplateRequest.isEid) && + Objects.equals(this.message, signatureRequestEditWithTemplateRequest.message) && + Objects.equals(this.metadata, signatureRequestEditWithTemplateRequest.metadata) && + Objects.equals(this.signingOptions, signatureRequestEditWithTemplateRequest.signingOptions) && + Objects.equals(this.signingRedirectUrl, signatureRequestEditWithTemplateRequest.signingRedirectUrl) && + Objects.equals(this.subject, signatureRequestEditWithTemplateRequest.subject) && + Objects.equals(this.testMode, signatureRequestEditWithTemplateRequest.testMode) && + Objects.equals(this.title, signatureRequestEditWithTemplateRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash(templateIds, signers, allowDecline, ccs, clientId, customFields, files, fileUrls, isEid, message, metadata, signingOptions, signingRedirectUrl, subject, testMode, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignatureRequestEditWithTemplateRequest {\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); + sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); + sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); + sb.append(" signingRedirectUrl: ").append(toIndentedString(signingRedirectUrl)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).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 (templateIds != null) { + if (isFileTypeOrListOfFiles(templateIds)) { + fileTypeFound = true; + } + + if (templateIds.getClass().equals(java.io.File.class) || + templateIds.getClass().equals(Integer.class) || + templateIds.getClass().equals(String.class) || + templateIds.getClass().isEnum()) { + map.put("template_ids", templateIds); + } else if (isListOfFile(templateIds)) { + for(int i = 0; i< getListSize(templateIds); i++) { + map.put("template_ids[" + i + "]", getFromList(templateIds, i)); + } + } + else { + map.put("template_ids", JSON.getDefault().getMapper().writeValueAsString(templateIds)); + } + } + if (signers != null) { + if (isFileTypeOrListOfFiles(signers)) { + fileTypeFound = true; + } + + if (signers.getClass().equals(java.io.File.class) || + signers.getClass().equals(Integer.class) || + signers.getClass().equals(String.class) || + signers.getClass().isEnum()) { + map.put("signers", signers); + } else if (isListOfFile(signers)) { + for(int i = 0; i< getListSize(signers); i++) { + map.put("signers[" + i + "]", getFromList(signers, i)); + } + } + else { + map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); + } + } + if (allowDecline != null) { + if (isFileTypeOrListOfFiles(allowDecline)) { + fileTypeFound = true; + } + + if (allowDecline.getClass().equals(java.io.File.class) || + allowDecline.getClass().equals(Integer.class) || + allowDecline.getClass().equals(String.class) || + allowDecline.getClass().isEnum()) { + map.put("allow_decline", allowDecline); + } else if (isListOfFile(allowDecline)) { + for(int i = 0; i< getListSize(allowDecline); i++) { + map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); + } + } + else { + map.put("allow_decline", JSON.getDefault().getMapper().writeValueAsString(allowDecline)); + } + } + if (ccs != null) { + if (isFileTypeOrListOfFiles(ccs)) { + fileTypeFound = true; + } + + if (ccs.getClass().equals(java.io.File.class) || + ccs.getClass().equals(Integer.class) || + ccs.getClass().equals(String.class) || + ccs.getClass().isEnum()) { + map.put("ccs", ccs); + } else if (isListOfFile(ccs)) { + for(int i = 0; i< getListSize(ccs); i++) { + map.put("ccs[" + i + "]", getFromList(ccs, i)); + } + } + else { + map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); + } + } + 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 (customFields != null) { + if (isFileTypeOrListOfFiles(customFields)) { + fileTypeFound = true; + } + + if (customFields.getClass().equals(java.io.File.class) || + customFields.getClass().equals(Integer.class) || + customFields.getClass().equals(String.class) || + customFields.getClass().isEnum()) { + map.put("custom_fields", customFields); + } else if (isListOfFile(customFields)) { + for(int i = 0; i< getListSize(customFields); i++) { + map.put("custom_fields[" + i + "]", getFromList(customFields, i)); + } + } + else { + map.put("custom_fields", JSON.getDefault().getMapper().writeValueAsString(customFields)); + } + } + 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 (isEid != null) { + if (isFileTypeOrListOfFiles(isEid)) { + fileTypeFound = true; + } + + if (isEid.getClass().equals(java.io.File.class) || + isEid.getClass().equals(Integer.class) || + isEid.getClass().equals(String.class) || + isEid.getClass().isEnum()) { + map.put("is_eid", isEid); + } else if (isListOfFile(isEid)) { + for(int i = 0; i< getListSize(isEid); i++) { + map.put("is_eid[" + i + "]", getFromList(isEid, i)); + } + } + else { + map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); + } + } + 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 (signingOptions != null) { + if (isFileTypeOrListOfFiles(signingOptions)) { + fileTypeFound = true; + } + + if (signingOptions.getClass().equals(java.io.File.class) || + signingOptions.getClass().equals(Integer.class) || + signingOptions.getClass().equals(String.class) || + signingOptions.getClass().isEnum()) { + map.put("signing_options", signingOptions); + } else if (isListOfFile(signingOptions)) { + for(int i = 0; i< getListSize(signingOptions); i++) { + map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); + } + } + else { + map.put("signing_options", JSON.getDefault().getMapper().writeValueAsString(signingOptions)); + } + } + if (signingRedirectUrl != null) { + if (isFileTypeOrListOfFiles(signingRedirectUrl)) { + fileTypeFound = true; + } + + if (signingRedirectUrl.getClass().equals(java.io.File.class) || + signingRedirectUrl.getClass().equals(Integer.class) || + signingRedirectUrl.getClass().equals(String.class) || + signingRedirectUrl.getClass().isEnum()) { + map.put("signing_redirect_url", signingRedirectUrl); + } else if (isListOfFile(signingRedirectUrl)) { + for(int i = 0; i< getListSize(signingRedirectUrl); i++) { + map.put("signing_redirect_url[" + i + "]", getFromList(signingRedirectUrl, i)); + } + } + else { + map.put("signing_redirect_url", JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); + } + } + 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 (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 (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/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java index 6f1fe1d68..489a922dc 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java @@ -40,13 +40,15 @@ SignatureRequestGetResponse.JSON_PROPERTY_SIGNATURE_REQUEST, SignatureRequestGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestGetResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; + @jakarta.annotation.Nonnull private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public SignatureRequestGetResponse() { @@ -67,7 +69,7 @@ static public SignatureRequestGetResponse init(HashMap data) throws Exception { ); } - public SignatureRequestGetResponse signatureRequest(SignatureRequestResponse signatureRequest) { + public SignatureRequestGetResponse signatureRequest(@jakarta.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -87,12 +89,12 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest(@jakarta.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public SignatureRequestGetResponse warnings(List warnings) { + public SignatureRequestGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java index cbb3d1fb1..5c8169269 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java @@ -42,16 +42,19 @@ SignatureRequestListResponse.JSON_PROPERTY_LIST_INFO, SignatureRequestListResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestListResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + @jakarta.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public SignatureRequestListResponse() { @@ -72,7 +75,7 @@ static public SignatureRequestListResponse init(HashMap data) throws Exception { ); } - public SignatureRequestListResponse signatureRequests(List signatureRequests) { + public SignatureRequestListResponse signatureRequests(@jakarta.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -100,12 +103,12 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests(List signatureRequests) { + public void setSignatureRequests(@jakarta.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; } - public SignatureRequestListResponse listInfo(ListInfoResponse listInfo) { + public SignatureRequestListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public SignatureRequestListResponse warnings(List warnings) { + public SignatureRequestListResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java index b736aa7de..dc2b5f5fd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java @@ -36,13 +36,15 @@ SignatureRequestRemindRequest.JSON_PROPERTY_EMAIL_ADDRESS, SignatureRequestRemindRequest.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestRemindRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public SignatureRequestRemindRequest() { @@ -63,7 +65,7 @@ static public SignatureRequestRemindRequest init(HashMap data) throws Exception ); } - public SignatureRequestRemindRequest emailAddress(String emailAddress) { + public SignatureRequestRemindRequest emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -83,12 +85,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestRemindRequest name(String name) { + public SignatureRequestRemindRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -108,7 +110,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java index 44fdde922..481b8bd6b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java @@ -67,82 +67,107 @@ SignatureRequestResponse.JSON_PROPERTY_SIGNATURES, SignatureRequestResponse.JSON_PROPERTY_BULK_SEND_JOB_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestResponse { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; + @jakarta.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; + @jakarta.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + @jakarta.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + @jakarta.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; + @jakarta.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; + @jakarta.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; + @jakarta.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; + @jakarta.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; + @jakarta.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; + @jakarta.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; + @jakarta.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; + @jakarta.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; + @jakarta.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; + @jakarta.annotation.Nullable private String bulkSendJobId; public SignatureRequestResponse() { @@ -163,7 +188,7 @@ static public SignatureRequestResponse init(HashMap data) throws Exception { ); } - public SignatureRequestResponse testMode(Boolean testMode) { + public SignatureRequestResponse testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -183,12 +208,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestResponse signatureRequestId(String signatureRequestId) { + public SignatureRequestResponse signatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -208,12 +233,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public SignatureRequestResponse requesterEmailAddress(String requesterEmailAddress) { + public SignatureRequestResponse requesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -233,12 +258,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public SignatureRequestResponse title(String title) { + public SignatureRequestResponse title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -258,12 +283,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public SignatureRequestResponse originalTitle(String originalTitle) { + public SignatureRequestResponse originalTitle(@jakarta.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -283,12 +308,12 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@jakarta.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public SignatureRequestResponse subject(String subject) { + public SignatureRequestResponse subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -308,12 +333,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestResponse message(String message) { + public SignatureRequestResponse message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -333,12 +358,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestResponse metadata(Map metadata) { + public SignatureRequestResponse metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -366,12 +391,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestResponse createdAt(Integer createdAt) { + public SignatureRequestResponse createdAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -391,12 +416,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@jakarta.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public SignatureRequestResponse expiresAt(Integer expiresAt) { + public SignatureRequestResponse expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -416,12 +441,12 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public SignatureRequestResponse isComplete(Boolean isComplete) { + public SignatureRequestResponse isComplete(@jakarta.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -441,12 +466,12 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@jakarta.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public SignatureRequestResponse isDeclined(Boolean isDeclined) { + public SignatureRequestResponse isDeclined(@jakarta.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -466,12 +491,12 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@jakarta.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public SignatureRequestResponse hasError(Boolean hasError) { + public SignatureRequestResponse hasError(@jakarta.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -491,12 +516,12 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@jakarta.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public SignatureRequestResponse filesUrl(String filesUrl) { + public SignatureRequestResponse filesUrl(@jakarta.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -516,12 +541,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@jakarta.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public SignatureRequestResponse signingUrl(String signingUrl) { + public SignatureRequestResponse signingUrl(@jakarta.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -541,12 +566,12 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@jakarta.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public SignatureRequestResponse detailsUrl(String detailsUrl) { + public SignatureRequestResponse detailsUrl(@jakarta.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -566,12 +591,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@jakarta.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public SignatureRequestResponse ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestResponse ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -599,12 +624,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestResponse signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestResponse signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -624,12 +649,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestResponse finalCopyUri(String finalCopyUri) { + public SignatureRequestResponse finalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -649,12 +674,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@jakarta.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public SignatureRequestResponse templateIds(List templateIds) { + public SignatureRequestResponse templateIds(@jakarta.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -682,12 +707,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nullable List templateIds) { this.templateIds = templateIds; } - public SignatureRequestResponse customFields(List customFields) { + public SignatureRequestResponse customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -715,12 +740,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestResponse attachments(List attachments) { + public SignatureRequestResponse attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -748,12 +773,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestResponse responseData(List responseData) { + public SignatureRequestResponse responseData(@jakarta.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -781,12 +806,12 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData(@jakarta.annotation.Nullable List responseData) { this.responseData = responseData; } - public SignatureRequestResponse signatures(List signatures) { + public SignatureRequestResponse signatures(@jakarta.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -814,12 +839,12 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures(@jakarta.annotation.Nullable List signatures) { this.signatures = signatures; } - public SignatureRequestResponse bulkSendJobId(String bulkSendJobId) { + public SignatureRequestResponse bulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -839,7 +864,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@jakarta.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java index 125fc6666..388774fd2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java @@ -40,25 +40,31 @@ SignatureRequestResponseAttachment.JSON_PROPERTY_INSTRUCTIONS, SignatureRequestResponseAttachment.JSON_PROPERTY_UPLOADED_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestResponseAttachment { public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; public static final String JSON_PROPERTY_SIGNER = "signer"; + @jakarta.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + @jakarta.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_UPLOADED_AT = "uploaded_at"; + @jakarta.annotation.Nullable private Integer uploadedAt; public SignatureRequestResponseAttachment() { @@ -79,7 +85,7 @@ static public SignatureRequestResponseAttachment init(HashMap data) throws Excep ); } - public SignatureRequestResponseAttachment id(String id) { + public SignatureRequestResponseAttachment id(@jakarta.annotation.Nonnull String id) { this.id = id; return this; } @@ -99,12 +105,12 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@jakarta.annotation.Nonnull String id) { this.id = id; } - public SignatureRequestResponseAttachment signer(String signer) { + public SignatureRequestResponseAttachment signer(@jakarta.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -128,7 +134,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@jakarta.annotation.Nonnull String signer) { this.signer = signer; } @@ -137,7 +143,7 @@ public void setSigner(Integer signer) { } - public SignatureRequestResponseAttachment name(String name) { + public SignatureRequestResponseAttachment name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -157,12 +163,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseAttachment required(Boolean required) { + public SignatureRequestResponseAttachment required(@jakarta.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -182,12 +188,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nonnull Boolean required) { this.required = required; } - public SignatureRequestResponseAttachment instructions(String instructions) { + public SignatureRequestResponseAttachment instructions(@jakarta.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -207,12 +213,12 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@jakarta.annotation.Nullable String instructions) { this.instructions = instructions; } - public SignatureRequestResponseAttachment uploadedAt(Integer uploadedAt) { + public SignatureRequestResponseAttachment uploadedAt(@jakarta.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; return this; } @@ -232,7 +238,7 @@ public Integer getUploadedAt() { @JsonProperty(JSON_PROPERTY_UPLOADED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUploadedAt(Integer uploadedAt) { + public void setUploadedAt(@jakarta.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java index fca222226..0901f46c4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java @@ -42,7 +42,7 @@ SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_API_ID, SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_EDITOR }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -55,18 +55,23 @@ public class SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_EDITOR = "editor"; + @jakarta.annotation.Nullable private String editor; public SignatureRequestResponseCustomFieldBase() { @@ -87,7 +92,7 @@ static public SignatureRequestResponseCustomFieldBase init(HashMap data) throws ); } - public SignatureRequestResponseCustomFieldBase type(String type) { + public SignatureRequestResponseCustomFieldBase type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -107,12 +112,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldBase name(String name) { + public SignatureRequestResponseCustomFieldBase name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -132,12 +137,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseCustomFieldBase required(Boolean required) { + public SignatureRequestResponseCustomFieldBase required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -157,12 +162,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseCustomFieldBase apiId(String apiId) { + public SignatureRequestResponseCustomFieldBase apiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -182,12 +187,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseCustomFieldBase editor(String editor) { + public SignatureRequestResponseCustomFieldBase editor(@jakarta.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -207,7 +212,7 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@jakarta.annotation.Nullable String editor) { this.editor = editor; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java index 9943467c8..7ab1636dc 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java @@ -40,7 +40,7 @@ SignatureRequestResponseCustomFieldCheckbox.JSON_PROPERTY_TYPE, SignatureRequestResponseCustomFieldCheckbox.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private Boolean value; public SignatureRequestResponseCustomFieldCheckbox() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseCustomFieldCheckbox init(HashMap data) thr ); } - public SignatureRequestResponseCustomFieldCheckbox type(String type) { + public SignatureRequestResponseCustomFieldCheckbox type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldCheckbox value(Boolean value) { + public SignatureRequestResponseCustomFieldCheckbox value(@jakarta.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@jakarta.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java index 9c7e628a0..7157610f4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java @@ -40,7 +40,7 @@ SignatureRequestResponseCustomFieldText.JSON_PROPERTY_TYPE, SignatureRequestResponseCustomFieldText.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseCustomFieldText() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseCustomFieldText init(HashMap data) throws ); } - public SignatureRequestResponseCustomFieldText type(String type) { + public SignatureRequestResponseCustomFieldText type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldText value(String value) { + public SignatureRequestResponseCustomFieldText value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java index 54788629e..d572079a4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java @@ -42,7 +42,7 @@ SignatureRequestResponseDataBase.JSON_PROPERTY_REQUIRED, SignatureRequestResponseDataBase.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -62,18 +62,23 @@ public class SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; + @jakarta.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type; public SignatureRequestResponseDataBase() { @@ -94,7 +99,7 @@ static public SignatureRequestResponseDataBase init(HashMap data) throws Excepti ); } - public SignatureRequestResponseDataBase apiId(String apiId) { + public SignatureRequestResponseDataBase apiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -114,12 +119,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseDataBase signatureId(String signatureId) { + public SignatureRequestResponseDataBase signatureId(@jakarta.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -139,12 +144,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@jakarta.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseDataBase name(String name) { + public SignatureRequestResponseDataBase name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -164,12 +169,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public SignatureRequestResponseDataBase required(Boolean required) { + public SignatureRequestResponseDataBase required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -189,12 +194,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseDataBase type(String type) { + public SignatureRequestResponseDataBase type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -214,7 +219,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java index ed72505f3..ea881f7d9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueCheckbox.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueCheckbox.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueCheckbox() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueCheckbox init(HashMap data) throw ); } - public SignatureRequestResponseDataValueCheckbox type(String type) { + public SignatureRequestResponseDataValueCheckbox type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckbox value(Boolean value) { + public SignatureRequestResponseDataValueCheckbox value(@jakarta.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@jakarta.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java index 386212b8b..b36555469 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueCheckboxMerge.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueCheckboxMerge.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "checkbox-merge"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseDataValueCheckboxMerge() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueCheckboxMerge init(HashMap data) ); } - public SignatureRequestResponseDataValueCheckboxMerge type(String type) { + public SignatureRequestResponseDataValueCheckboxMerge type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckboxMerge value(String value) { + public SignatureRequestResponseDataValueCheckboxMerge value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java index c793034df..6c8c35134 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueDateSigned.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueDateSigned.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "date_signed"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseDataValueDateSigned() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueDateSigned init(HashMap data) thr ); } - public SignatureRequestResponseDataValueDateSigned type(String type) { + public SignatureRequestResponseDataValueDateSigned type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDateSigned value(String value) { + public SignatureRequestResponseDataValueDateSigned value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java index 9f72ae3d4..8d7a8425c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueDropdown.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueDropdown.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "dropdown"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseDataValueDropdown() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueDropdown init(HashMap data) throw ); } - public SignatureRequestResponseDataValueDropdown type(String type) { + public SignatureRequestResponseDataValueDropdown type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDropdown value(String value) { + public SignatureRequestResponseDataValueDropdown value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java index 3724d3e55..1a68d9a22 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java @@ -41,7 +41,7 @@ SignatureRequestResponseDataValueInitials.JSON_PROPERTY_VALUE, SignatureRequestResponseDataValueInitials.JSON_PROPERTY_IS_SIGNED }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,12 +50,15 @@ public class SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "initials"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; + @jakarta.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueInitials() { @@ -76,7 +79,7 @@ static public SignatureRequestResponseDataValueInitials init(HashMap data) throw ); } - public SignatureRequestResponseDataValueInitials type(String type) { + public SignatureRequestResponseDataValueInitials type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -96,12 +99,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueInitials value(String value) { + public SignatureRequestResponseDataValueInitials value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -121,12 +124,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueInitials isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueInitials isSigned(@jakarta.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -146,7 +149,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@jakarta.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java index a3176945b..027c4d911 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueRadio.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueRadio.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "radio"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueRadio() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueRadio init(HashMap data) throws E ); } - public SignatureRequestResponseDataValueRadio type(String type) { + public SignatureRequestResponseDataValueRadio type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueRadio value(Boolean value) { + public SignatureRequestResponseDataValueRadio value(@jakarta.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@jakarta.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java index 1a789fb30..95953be9e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java @@ -41,7 +41,7 @@ SignatureRequestResponseDataValueSignature.JSON_PROPERTY_VALUE, SignatureRequestResponseDataValueSignature.JSON_PROPERTY_IS_SIGNED }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,12 +50,15 @@ public class SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "signature"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; + @jakarta.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueSignature() { @@ -76,7 +79,7 @@ static public SignatureRequestResponseDataValueSignature init(HashMap data) thro ); } - public SignatureRequestResponseDataValueSignature type(String type) { + public SignatureRequestResponseDataValueSignature type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -96,12 +99,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueSignature value(String value) { + public SignatureRequestResponseDataValueSignature value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -121,12 +124,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueSignature isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueSignature isSigned(@jakarta.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -146,7 +149,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@jakarta.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java index 47f82d4d1..63225480d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueText.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueText.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseDataValueText() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueText init(HashMap data) throws Ex ); } - public SignatureRequestResponseDataValueText type(String type) { + public SignatureRequestResponseDataValueText type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueText value(String value) { + public SignatureRequestResponseDataValueText value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java index c25f4b10e..b420f7552 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java @@ -40,7 +40,7 @@ SignatureRequestResponseDataValueTextMerge.JSON_PROPERTY_TYPE, SignatureRequestResponseDataValueTextMerge.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private String type = "text-merge"; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SignatureRequestResponseDataValueTextMerge() { @@ -72,7 +74,7 @@ static public SignatureRequestResponseDataValueTextMerge init(HashMap data) thro ); } - public SignatureRequestResponseDataValueTextMerge type(String type) { + public SignatureRequestResponseDataValueTextMerge type(@jakarta.annotation.Nullable String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueTextMerge value(String value) { + public SignatureRequestResponseDataValueTextMerge value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -117,7 +119,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java index 16e202047..59472ad36 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java @@ -53,64 +53,83 @@ SignatureRequestResponseSignatures.JSON_PROPERTY_REASSIGNED_FROM, SignatureRequestResponseSignatures.JSON_PROPERTY_ERROR }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestResponseSignatures { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; + @jakarta.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_SIGNER_GROUP_GUID = "signer_group_guid"; + @jakarta.annotation.Nullable private String signerGroupGuid; public static final String JSON_PROPERTY_SIGNER_EMAIL_ADDRESS = "signer_email_address"; + @jakarta.annotation.Nullable private String signerEmailAddress; public static final String JSON_PROPERTY_SIGNER_NAME = "signer_name"; + @jakarta.annotation.Nullable private String signerName; public static final String JSON_PROPERTY_SIGNER_ROLE = "signer_role"; + @jakarta.annotation.Nullable private String signerRole; public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; + @jakarta.annotation.Nullable private String statusCode; public static final String JSON_PROPERTY_DECLINE_REASON = "decline_reason"; + @jakarta.annotation.Nullable private String declineReason; public static final String JSON_PROPERTY_SIGNED_AT = "signed_at"; + @jakarta.annotation.Nullable private Integer signedAt; public static final String JSON_PROPERTY_LAST_VIEWED_AT = "last_viewed_at"; + @jakarta.annotation.Nullable private Integer lastViewedAt; public static final String JSON_PROPERTY_LAST_REMINDED_AT = "last_reminded_at"; + @jakarta.annotation.Nullable private Integer lastRemindedAt; public static final String JSON_PROPERTY_HAS_PIN = "has_pin"; + @jakarta.annotation.Nullable private Boolean hasPin; public static final String JSON_PROPERTY_HAS_SMS_AUTH = "has_sms_auth"; + @jakarta.annotation.Nullable private Boolean hasSmsAuth; public static final String JSON_PROPERTY_HAS_SMS_DELIVERY = "has_sms_delivery"; + @jakarta.annotation.Nullable private Boolean hasSmsDelivery; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; + @jakarta.annotation.Nullable private String smsPhoneNumber; public static final String JSON_PROPERTY_REASSIGNED_BY = "reassigned_by"; + @jakarta.annotation.Nullable private String reassignedBy; public static final String JSON_PROPERTY_REASSIGNMENT_REASON = "reassignment_reason"; + @jakarta.annotation.Nullable private String reassignmentReason; public static final String JSON_PROPERTY_REASSIGNED_FROM = "reassigned_from"; + @jakarta.annotation.Nullable private String reassignedFrom; public static final String JSON_PROPERTY_ERROR = "error"; + @jakarta.annotation.Nullable private String error; public SignatureRequestResponseSignatures() { @@ -131,7 +150,7 @@ static public SignatureRequestResponseSignatures init(HashMap data) throws Excep ); } - public SignatureRequestResponseSignatures signatureId(String signatureId) { + public SignatureRequestResponseSignatures signatureId(@jakarta.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -151,12 +170,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@jakarta.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseSignatures signerGroupGuid(String signerGroupGuid) { + public SignatureRequestResponseSignatures signerGroupGuid(@jakarta.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; return this; } @@ -176,12 +195,12 @@ public String getSignerGroupGuid() { @JsonProperty(JSON_PROPERTY_SIGNER_GROUP_GUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerGroupGuid(String signerGroupGuid) { + public void setSignerGroupGuid(@jakarta.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; } - public SignatureRequestResponseSignatures signerEmailAddress(String signerEmailAddress) { + public SignatureRequestResponseSignatures signerEmailAddress(@jakarta.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; return this; } @@ -201,12 +220,12 @@ public String getSignerEmailAddress() { @JsonProperty(JSON_PROPERTY_SIGNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerEmailAddress(String signerEmailAddress) { + public void setSignerEmailAddress(@jakarta.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; } - public SignatureRequestResponseSignatures signerName(String signerName) { + public SignatureRequestResponseSignatures signerName(@jakarta.annotation.Nullable String signerName) { this.signerName = signerName; return this; } @@ -226,12 +245,12 @@ public String getSignerName() { @JsonProperty(JSON_PROPERTY_SIGNER_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerName(String signerName) { + public void setSignerName(@jakarta.annotation.Nullable String signerName) { this.signerName = signerName; } - public SignatureRequestResponseSignatures signerRole(String signerRole) { + public SignatureRequestResponseSignatures signerRole(@jakarta.annotation.Nullable String signerRole) { this.signerRole = signerRole; return this; } @@ -251,12 +270,12 @@ public String getSignerRole() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRole(String signerRole) { + public void setSignerRole(@jakarta.annotation.Nullable String signerRole) { this.signerRole = signerRole; } - public SignatureRequestResponseSignatures order(Integer order) { + public SignatureRequestResponseSignatures order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -276,12 +295,12 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } - public SignatureRequestResponseSignatures statusCode(String statusCode) { + public SignatureRequestResponseSignatures statusCode(@jakarta.annotation.Nullable String statusCode) { this.statusCode = statusCode; return this; } @@ -301,12 +320,12 @@ public String getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatusCode(String statusCode) { + public void setStatusCode(@jakarta.annotation.Nullable String statusCode) { this.statusCode = statusCode; } - public SignatureRequestResponseSignatures declineReason(String declineReason) { + public SignatureRequestResponseSignatures declineReason(@jakarta.annotation.Nullable String declineReason) { this.declineReason = declineReason; return this; } @@ -326,12 +345,12 @@ public String getDeclineReason() { @JsonProperty(JSON_PROPERTY_DECLINE_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclineReason(String declineReason) { + public void setDeclineReason(@jakarta.annotation.Nullable String declineReason) { this.declineReason = declineReason; } - public SignatureRequestResponseSignatures signedAt(Integer signedAt) { + public SignatureRequestResponseSignatures signedAt(@jakarta.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; return this; } @@ -351,12 +370,12 @@ public Integer getSignedAt() { @JsonProperty(JSON_PROPERTY_SIGNED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignedAt(Integer signedAt) { + public void setSignedAt(@jakarta.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; } - public SignatureRequestResponseSignatures lastViewedAt(Integer lastViewedAt) { + public SignatureRequestResponseSignatures lastViewedAt(@jakarta.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; return this; } @@ -376,12 +395,12 @@ public Integer getLastViewedAt() { @JsonProperty(JSON_PROPERTY_LAST_VIEWED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastViewedAt(Integer lastViewedAt) { + public void setLastViewedAt(@jakarta.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; } - public SignatureRequestResponseSignatures lastRemindedAt(Integer lastRemindedAt) { + public SignatureRequestResponseSignatures lastRemindedAt(@jakarta.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; return this; } @@ -401,12 +420,12 @@ public Integer getLastRemindedAt() { @JsonProperty(JSON_PROPERTY_LAST_REMINDED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastRemindedAt(Integer lastRemindedAt) { + public void setLastRemindedAt(@jakarta.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; } - public SignatureRequestResponseSignatures hasPin(Boolean hasPin) { + public SignatureRequestResponseSignatures hasPin(@jakarta.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; return this; } @@ -426,12 +445,12 @@ public Boolean getHasPin() { @JsonProperty(JSON_PROPERTY_HAS_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasPin(Boolean hasPin) { + public void setHasPin(@jakarta.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; } - public SignatureRequestResponseSignatures hasSmsAuth(Boolean hasSmsAuth) { + public SignatureRequestResponseSignatures hasSmsAuth(@jakarta.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; return this; } @@ -451,12 +470,12 @@ public Boolean getHasSmsAuth() { @JsonProperty(JSON_PROPERTY_HAS_SMS_AUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsAuth(Boolean hasSmsAuth) { + public void setHasSmsAuth(@jakarta.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; } - public SignatureRequestResponseSignatures hasSmsDelivery(Boolean hasSmsDelivery) { + public SignatureRequestResponseSignatures hasSmsDelivery(@jakarta.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; return this; } @@ -476,12 +495,12 @@ public Boolean getHasSmsDelivery() { @JsonProperty(JSON_PROPERTY_HAS_SMS_DELIVERY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsDelivery(Boolean hasSmsDelivery) { + public void setHasSmsDelivery(@jakarta.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; } - public SignatureRequestResponseSignatures smsPhoneNumber(String smsPhoneNumber) { + public SignatureRequestResponseSignatures smsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -501,12 +520,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SignatureRequestResponseSignatures reassignedBy(String reassignedBy) { + public SignatureRequestResponseSignatures reassignedBy(@jakarta.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; return this; } @@ -526,12 +545,12 @@ public String getReassignedBy() { @JsonProperty(JSON_PROPERTY_REASSIGNED_BY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedBy(String reassignedBy) { + public void setReassignedBy(@jakarta.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; } - public SignatureRequestResponseSignatures reassignmentReason(String reassignmentReason) { + public SignatureRequestResponseSignatures reassignmentReason(@jakarta.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; return this; } @@ -551,12 +570,12 @@ public String getReassignmentReason() { @JsonProperty(JSON_PROPERTY_REASSIGNMENT_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignmentReason(String reassignmentReason) { + public void setReassignmentReason(@jakarta.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; } - public SignatureRequestResponseSignatures reassignedFrom(String reassignedFrom) { + public SignatureRequestResponseSignatures reassignedFrom(@jakarta.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; return this; } @@ -576,12 +595,12 @@ public String getReassignedFrom() { @JsonProperty(JSON_PROPERTY_REASSIGNED_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedFrom(String reassignedFrom) { + public void setReassignedFrom(@jakarta.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; } - public SignatureRequestResponseSignatures error(String error) { + public SignatureRequestResponseSignatures error(@jakarta.annotation.Nullable String error) { this.error = error; return this; } @@ -601,7 +620,7 @@ public String getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(String error) { + public void setError(@jakarta.annotation.Nullable String error) { this.error = error; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java index 160f345aa..a76ab911f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java @@ -74,86 +74,112 @@ SignatureRequestSendRequest.JSON_PROPERTY_USE_TEXT_TAGS, SignatureRequestSendRequest.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestSendRequest { public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; + @jakarta.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; @Deprecated + @jakarta.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @jakarta.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public SignatureRequestSendRequest() { @@ -174,7 +200,7 @@ static public SignatureRequestSendRequest init(HashMap data) throws Exception { ); } - public SignatureRequestSendRequest files(List files) { + public SignatureRequestSendRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -202,12 +228,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendRequest fileUrls(List fileUrls) { + public SignatureRequestSendRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -235,12 +261,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestSendRequest signers(List signers) { + public SignatureRequestSendRequest signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -268,12 +294,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } - public SignatureRequestSendRequest groupedSigners(List groupedSigners) { + public SignatureRequestSendRequest groupedSigners(@jakarta.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -301,12 +327,12 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners(@jakarta.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestSendRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -326,12 +352,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendRequest allowReassign(Boolean allowReassign) { + public SignatureRequestSendRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -351,12 +377,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestSendRequest attachments(List attachments) { + public SignatureRequestSendRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -384,12 +410,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestSendRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestSendRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -417,12 +443,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestSendRequest clientId(String clientId) { + public SignatureRequestSendRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -442,12 +468,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendRequest customFields(List customFields) { + public SignatureRequestSendRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -475,12 +501,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestSendRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -500,12 +526,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public SignatureRequestSendRequest formFieldGroups(List formFieldGroups) { + public SignatureRequestSendRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -533,12 +559,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public SignatureRequestSendRequest formFieldRules(List formFieldRules) { + public SignatureRequestSendRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -566,12 +592,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public SignatureRequestSendRequest formFieldsPerDocument(List formFieldsPerDocument) { + public SignatureRequestSendRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -599,12 +625,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestSendRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestSendRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -624,13 +650,13 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } @Deprecated - public SignatureRequestSendRequest isQualifiedSignature(Boolean isQualifiedSignature) { + public SignatureRequestSendRequest isQualifiedSignature(@jakarta.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -653,12 +679,12 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@jakarta.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendRequest isEid(Boolean isEid) { + public SignatureRequestSendRequest isEid(@jakarta.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -678,12 +704,12 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@jakarta.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendRequest message(String message) { + public SignatureRequestSendRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -703,12 +729,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendRequest metadata(Map metadata) { + public SignatureRequestSendRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -736,12 +762,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestSendRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestSendRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -761,12 +787,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -786,12 +812,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendRequest subject(String subject) { + public SignatureRequestSendRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -811,12 +837,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendRequest testMode(Boolean testMode) { + public SignatureRequestSendRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -836,12 +862,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendRequest title(String title) { + public SignatureRequestSendRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -861,12 +887,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public SignatureRequestSendRequest useTextTags(Boolean useTextTags) { + public SignatureRequestSendRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -886,12 +912,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public SignatureRequestSendRequest expiresAt(Integer expiresAt) { + public SignatureRequestSendRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -911,7 +937,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java index c498d8723..861f52e96 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java @@ -60,59 +60,76 @@ SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_TEST_MODE, SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_TITLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; @Deprecated + @jakarta.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; + @jakarta.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public SignatureRequestSendWithTemplateRequest() { @@ -133,7 +150,7 @@ static public SignatureRequestSendWithTemplateRequest init(HashMap data) throws ); } - public SignatureRequestSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestSendWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -161,12 +178,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestSendWithTemplateRequest signers(List signers) { + public SignatureRequestSendWithTemplateRequest signers(@jakarta.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -194,12 +211,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -219,12 +236,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestSendWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -252,12 +269,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestSendWithTemplateRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -277,12 +294,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendWithTemplateRequest customFields(List customFields) { + public SignatureRequestSendWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -310,12 +327,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendWithTemplateRequest files(List files) { + public SignatureRequestSendWithTemplateRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -343,12 +360,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestSendWithTemplateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -376,13 +393,13 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } @Deprecated - public SignatureRequestSendWithTemplateRequest isQualifiedSignature(Boolean isQualifiedSignature) { + public SignatureRequestSendWithTemplateRequest isQualifiedSignature(@jakarta.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -405,12 +422,12 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@jakarta.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendWithTemplateRequest isEid(Boolean isEid) { + public SignatureRequestSendWithTemplateRequest isEid(@jakarta.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -430,12 +447,12 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@jakarta.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendWithTemplateRequest message(String message) { + public SignatureRequestSendWithTemplateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -455,12 +472,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestSendWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -488,12 +505,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestSendWithTemplateRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestSendWithTemplateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -513,12 +530,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendWithTemplateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -538,12 +555,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendWithTemplateRequest subject(String subject) { + public SignatureRequestSendWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -563,12 +580,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestSendWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -588,12 +605,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendWithTemplateRequest title(String title) { + public SignatureRequestSendWithTemplateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -613,7 +630,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java index e5b31ad56..599e2b0b6 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java @@ -38,19 +38,23 @@ SignatureRequestUpdateRequest.JSON_PROPERTY_NAME, SignatureRequestUpdateRequest.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SignatureRequestUpdateRequest { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; + @jakarta.annotation.Nonnull private String signatureId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public SignatureRequestUpdateRequest() { @@ -71,7 +75,7 @@ static public SignatureRequestUpdateRequest init(HashMap data) throws Exception ); } - public SignatureRequestUpdateRequest signatureId(String signatureId) { + public SignatureRequestUpdateRequest signatureId(@jakarta.annotation.Nonnull String signatureId) { this.signatureId = signatureId; return this; } @@ -91,12 +95,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@jakarta.annotation.Nonnull String signatureId) { this.signatureId = signatureId; } - public SignatureRequestUpdateRequest emailAddress(String emailAddress) { + public SignatureRequestUpdateRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -116,12 +120,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestUpdateRequest name(String name) { + public SignatureRequestUpdateRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -141,12 +145,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public SignatureRequestUpdateRequest expiresAt(Integer expiresAt) { + public SignatureRequestUpdateRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -166,7 +170,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubAttachment.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubAttachment.java index 47c26c174..2194103c4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubAttachment.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubAttachment.java @@ -38,19 +38,23 @@ SubAttachment.JSON_PROPERTY_INSTRUCTIONS, SubAttachment.JSON_PROPERTY_REQUIRED }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubAttachment { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_SIGNER_INDEX = "signer_index"; + @jakarta.annotation.Nonnull private Integer signerIndex; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + @jakarta.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required = false; public SubAttachment() { @@ -71,7 +75,7 @@ static public SubAttachment init(HashMap data) throws Exception { ); } - public SubAttachment name(String name) { + public SubAttachment name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -91,12 +95,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubAttachment signerIndex(Integer signerIndex) { + public SubAttachment signerIndex(@jakarta.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; return this; } @@ -116,12 +120,12 @@ public Integer getSignerIndex() { @JsonProperty(JSON_PROPERTY_SIGNER_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerIndex(Integer signerIndex) { + public void setSignerIndex(@jakarta.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; } - public SubAttachment instructions(String instructions) { + public SubAttachment instructions(@jakarta.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -141,12 +145,12 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@jakarta.annotation.Nullable String instructions) { this.instructions = instructions; } - public SubAttachment required(Boolean required) { + public SubAttachment required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -166,7 +170,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index 670dd4bb4..beb21db0b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -40,13 +40,15 @@ SubBulkSignerList.JSON_PROPERTY_CUSTOM_FIELDS, SubBulkSignerList.JSON_PROPERTY_SIGNERS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubBulkSignerList { public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public SubBulkSignerList() { @@ -67,7 +69,7 @@ static public SubBulkSignerList init(HashMap data) throws Exception { ); } - public SubBulkSignerList customFields(List customFields) { + public SubBulkSignerList customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -95,12 +97,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public SubBulkSignerList signers(List signers) { + public SubBulkSignerList signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -128,7 +130,7 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java index f2b250c2d..a71f2a667 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java @@ -36,13 +36,15 @@ SubBulkSignerListCustomField.JSON_PROPERTY_NAME, SubBulkSignerListCustomField.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubBulkSignerListCustomField { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull private String value; public SubBulkSignerListCustomField() { @@ -63,7 +65,7 @@ static public SubBulkSignerListCustomField init(HashMap data) throws Exception { ); } - public SubBulkSignerListCustomField name(String name) { + public SubBulkSignerListCustomField name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -83,12 +85,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubBulkSignerListCustomField value(String value) { + public SubBulkSignerListCustomField value(@jakarta.annotation.Nonnull String value) { this.value = value; return this; } @@ -108,7 +110,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nonnull String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCC.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCC.java index 1edd1df1e..282cbf9fe 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCC.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCC.java @@ -36,13 +36,15 @@ SubCC.JSON_PROPERTY_ROLE, SubCC.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubCC { public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nonnull private String role; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public SubCC() { @@ -63,7 +65,7 @@ static public SubCC init(HashMap data) throws Exception { ); } - public SubCC role(String role) { + public SubCC role(@jakarta.annotation.Nonnull String role) { this.role = role; return this; } @@ -83,12 +85,12 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@jakarta.annotation.Nonnull String role) { this.role = role; } - public SubCC emailAddress(String emailAddress) { + public SubCC emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -108,7 +110,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCustomField.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCustomField.java index 027d857aa..425a89560 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCustomField.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubCustomField.java @@ -38,19 +38,23 @@ SubCustomField.JSON_PROPERTY_REQUIRED, SubCustomField.JSON_PROPERTY_VALUE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubCustomField { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EDITOR = "editor"; + @jakarta.annotation.Nullable private String editor; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required = false; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public SubCustomField() { @@ -71,7 +75,7 @@ static public SubCustomField init(HashMap data) throws Exception { ); } - public SubCustomField name(String name) { + public SubCustomField name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -91,12 +95,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubCustomField editor(String editor) { + public SubCustomField editor(@jakarta.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -116,12 +120,12 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@jakarta.annotation.Nullable String editor) { this.editor = editor; } - public SubCustomField required(Boolean required) { + public SubCustomField required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -141,12 +145,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } - public SubCustomField value(String value) { + public SubCustomField value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -166,7 +170,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubEditorOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubEditorOptions.java index 0d2542d3e..5612b5104 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubEditorOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubEditorOptions.java @@ -36,13 +36,15 @@ SubEditorOptions.JSON_PROPERTY_ALLOW_EDIT_SIGNERS, SubEditorOptions.JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubEditorOptions { public static final String JSON_PROPERTY_ALLOW_EDIT_SIGNERS = "allow_edit_signers"; + @jakarta.annotation.Nullable private Boolean allowEditSigners = false; public static final String JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS = "allow_edit_documents"; + @jakarta.annotation.Nullable private Boolean allowEditDocuments = false; public SubEditorOptions() { @@ -63,7 +65,7 @@ static public SubEditorOptions init(HashMap data) throws Exception { ); } - public SubEditorOptions allowEditSigners(Boolean allowEditSigners) { + public SubEditorOptions allowEditSigners(@jakarta.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; return this; } @@ -83,12 +85,12 @@ public Boolean getAllowEditSigners() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditSigners(Boolean allowEditSigners) { + public void setAllowEditSigners(@jakarta.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; } - public SubEditorOptions allowEditDocuments(Boolean allowEditDocuments) { + public SubEditorOptions allowEditDocuments(@jakarta.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; return this; } @@ -108,7 +110,7 @@ public Boolean getAllowEditDocuments() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditDocuments(Boolean allowEditDocuments) { + public void setAllowEditDocuments(@jakarta.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFieldOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFieldOptions.java index 186faba37..9d39fc483 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFieldOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFieldOptions.java @@ -35,24 +35,24 @@ @JsonPropertyOrder({ SubFieldOptions.JSON_PROPERTY_DATE_FORMAT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubFieldOptions { /** * Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher. */ public enum DateFormatEnum { - MMDDYYYY("MM / DD / YYYY"), + MMDDYYYY(String.valueOf("MM / DD / YYYY")), - MM_DD_YYYY("MM - DD - YYYY"), + MM_DD_YYYY(String.valueOf("MM - DD - YYYY")), - DDMMYYYY("DD / MM / YYYY"), + DDMMYYYY(String.valueOf("DD / MM / YYYY")), - DD_MM_YYYY("DD - MM - YYYY"), + DD_MM_YYYY(String.valueOf("DD - MM - YYYY")), - YYYYMMDD("YYYY / MM / DD"), + YYYYMMDD(String.valueOf("YYYY / MM / DD")), - YYYY_MM_DD("YYYY - MM - DD"); + YYYY_MM_DD(String.valueOf("YYYY - MM - DD")); private String value; @@ -82,6 +82,7 @@ public static DateFormatEnum fromValue(String value) { } public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; + @jakarta.annotation.Nonnull private DateFormatEnum dateFormat; public SubFieldOptions() { @@ -102,7 +103,7 @@ static public SubFieldOptions init(HashMap data) throws Exception { ); } - public SubFieldOptions dateFormat(DateFormatEnum dateFormat) { + public SubFieldOptions dateFormat(@jakarta.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; return this; } @@ -122,7 +123,7 @@ public DateFormatEnum getDateFormat() { @JsonProperty(JSON_PROPERTY_DATE_FORMAT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDateFormat(DateFormatEnum dateFormat) { + public void setDateFormat(@jakarta.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java index 80dd46eb5..9993e171b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java @@ -37,16 +37,19 @@ SubFormFieldGroup.JSON_PROPERTY_GROUP_LABEL, SubFormFieldGroup.JSON_PROPERTY_REQUIREMENT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubFormFieldGroup { public static final String JSON_PROPERTY_GROUP_ID = "group_id"; + @jakarta.annotation.Nonnull private String groupId; public static final String JSON_PROPERTY_GROUP_LABEL = "group_label"; + @jakarta.annotation.Nonnull private String groupLabel; public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; + @jakarta.annotation.Nonnull private String requirement; public SubFormFieldGroup() { @@ -67,7 +70,7 @@ static public SubFormFieldGroup init(HashMap data) throws Exception { ); } - public SubFormFieldGroup groupId(String groupId) { + public SubFormFieldGroup groupId(@jakarta.annotation.Nonnull String groupId) { this.groupId = groupId; return this; } @@ -87,12 +90,12 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupId(String groupId) { + public void setGroupId(@jakarta.annotation.Nonnull String groupId) { this.groupId = groupId; } - public SubFormFieldGroup groupLabel(String groupLabel) { + public SubFormFieldGroup groupLabel(@jakarta.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -112,12 +115,12 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@jakarta.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; } - public SubFormFieldGroup requirement(String requirement) { + public SubFormFieldGroup requirement(@jakarta.annotation.Nonnull String requirement) { this.requirement = requirement; return this; } @@ -137,7 +140,7 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequirement(String requirement) { + public void setRequirement(@jakarta.annotation.Nonnull String requirement) { this.requirement = requirement; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java index 629d8f492..7c6eda114 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java @@ -42,19 +42,23 @@ SubFormFieldRule.JSON_PROPERTY_TRIGGERS, SubFormFieldRule.JSON_PROPERTY_ACTIONS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubFormFieldRule { public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; public static final String JSON_PROPERTY_TRIGGER_OPERATOR = "trigger_operator"; + @jakarta.annotation.Nonnull private String triggerOperator = "AND"; public static final String JSON_PROPERTY_TRIGGERS = "triggers"; + @jakarta.annotation.Nonnull private List triggers = new ArrayList<>(); public static final String JSON_PROPERTY_ACTIONS = "actions"; + @jakarta.annotation.Nonnull private List actions = new ArrayList<>(); public SubFormFieldRule() { @@ -75,7 +79,7 @@ static public SubFormFieldRule init(HashMap data) throws Exception { ); } - public SubFormFieldRule id(String id) { + public SubFormFieldRule id(@jakarta.annotation.Nonnull String id) { this.id = id; return this; } @@ -95,12 +99,12 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@jakarta.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRule triggerOperator(String triggerOperator) { + public SubFormFieldRule triggerOperator(@jakarta.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; return this; } @@ -120,12 +124,12 @@ public String getTriggerOperator() { @JsonProperty(JSON_PROPERTY_TRIGGER_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerOperator(String triggerOperator) { + public void setTriggerOperator(@jakarta.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; } - public SubFormFieldRule triggers(List triggers) { + public SubFormFieldRule triggers(@jakarta.annotation.Nonnull List triggers) { this.triggers = triggers; return this; } @@ -153,12 +157,12 @@ public List getTriggers() { @JsonProperty(JSON_PROPERTY_TRIGGERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggers(List triggers) { + public void setTriggers(@jakarta.annotation.Nonnull List triggers) { this.triggers = triggers; } - public SubFormFieldRule actions(List actions) { + public SubFormFieldRule actions(@jakarta.annotation.Nonnull List actions) { this.actions = actions; return this; } @@ -186,7 +190,7 @@ public List getActions() { @JsonProperty(JSON_PROPERTY_ACTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setActions(List actions) { + public void setActions(@jakarta.annotation.Nonnull List actions) { this.actions = actions; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java index 7aebfc1c6..096164a36 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java @@ -38,19 +38,22 @@ SubFormFieldRuleAction.JSON_PROPERTY_FIELD_ID, SubFormFieldRuleAction.JSON_PROPERTY_GROUP_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubFormFieldRuleAction { public static final String JSON_PROPERTY_HIDDEN = "hidden"; + @jakarta.annotation.Nonnull private Boolean hidden; /** * Gets or Sets type */ public enum TypeEnum { - FIELD_VISIBILITY("change-field-visibility"), + CHANGE_FIELD_VISIBILITY(String.valueOf("change-field-visibility")), + FIELD_VISIBILITY(String.valueOf("change-field-visibility")), - GROUP_VISIBILITY("change-group-visibility"); + CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")), + GROUP_VISIBILITY(String.valueOf("change-group-visibility")); private String value; @@ -80,12 +83,15 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FIELD_ID = "field_id"; + @jakarta.annotation.Nullable private String fieldId; public static final String JSON_PROPERTY_GROUP_ID = "group_id"; + @jakarta.annotation.Nullable private String groupId; public SubFormFieldRuleAction() { @@ -106,7 +112,7 @@ static public SubFormFieldRuleAction init(HashMap data) throws Exception { ); } - public SubFormFieldRuleAction hidden(Boolean hidden) { + public SubFormFieldRuleAction hidden(@jakarta.annotation.Nonnull Boolean hidden) { this.hidden = hidden; return this; } @@ -126,12 +132,12 @@ public Boolean getHidden() { @JsonProperty(JSON_PROPERTY_HIDDEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHidden(Boolean hidden) { + public void setHidden(@jakarta.annotation.Nonnull Boolean hidden) { this.hidden = hidden; } - public SubFormFieldRuleAction type(TypeEnum type) { + public SubFormFieldRuleAction type(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -151,12 +157,12 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } - public SubFormFieldRuleAction fieldId(String fieldId) { + public SubFormFieldRuleAction fieldId(@jakarta.annotation.Nullable String fieldId) { this.fieldId = fieldId; return this; } @@ -176,12 +182,12 @@ public String getFieldId() { @JsonProperty(JSON_PROPERTY_FIELD_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldId(String fieldId) { + public void setFieldId(@jakarta.annotation.Nullable String fieldId) { this.fieldId = fieldId; } - public SubFormFieldRuleAction groupId(String groupId) { + public SubFormFieldRuleAction groupId(@jakarta.annotation.Nullable String groupId) { this.groupId = groupId; return this; } @@ -201,7 +207,7 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupId(String groupId) { + public void setGroupId(@jakarta.annotation.Nullable String groupId) { this.groupId = groupId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java index 466d6192f..d29de9d18 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java @@ -40,25 +40,26 @@ SubFormFieldRuleTrigger.JSON_PROPERTY_VALUE, SubFormFieldRuleTrigger.JSON_PROPERTY_VALUES }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubFormFieldRuleTrigger { public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; /** * Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value */ public enum OperatorEnum { - ANY("any"), + ANY(String.valueOf("any")), - IS("is"), + IS(String.valueOf("is")), - MATCH("match"), + MATCH(String.valueOf("match")), - NONE("none"), + NONE(String.valueOf("none")), - NOT("not"); + NOT(String.valueOf("not")); private String value; @@ -88,12 +89,15 @@ public static OperatorEnum fromValue(String value) { } public static final String JSON_PROPERTY_OPERATOR = "operator"; + @jakarta.annotation.Nonnull private OperatorEnum operator; public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nullable private String value; public static final String JSON_PROPERTY_VALUES = "values"; + @jakarta.annotation.Nullable private List values = null; public SubFormFieldRuleTrigger() { @@ -114,7 +118,7 @@ static public SubFormFieldRuleTrigger init(HashMap data) throws Exception { ); } - public SubFormFieldRuleTrigger id(String id) { + public SubFormFieldRuleTrigger id(@jakarta.annotation.Nonnull String id) { this.id = id; return this; } @@ -134,12 +138,12 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@jakarta.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRuleTrigger operator(OperatorEnum operator) { + public SubFormFieldRuleTrigger operator(@jakarta.annotation.Nonnull OperatorEnum operator) { this.operator = operator; return this; } @@ -159,12 +163,12 @@ public OperatorEnum getOperator() { @JsonProperty(JSON_PROPERTY_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOperator(OperatorEnum operator) { + public void setOperator(@jakarta.annotation.Nonnull OperatorEnum operator) { this.operator = operator; } - public SubFormFieldRuleTrigger value(String value) { + public SubFormFieldRuleTrigger value(@jakarta.annotation.Nullable String value) { this.value = value; return this; } @@ -184,12 +188,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@jakarta.annotation.Nullable String value) { this.value = value; } - public SubFormFieldRuleTrigger values(List values) { + public SubFormFieldRuleTrigger values(@jakarta.annotation.Nullable List values) { this.values = values; return this; } @@ -217,7 +221,7 @@ public List getValues() { @JsonProperty(JSON_PROPERTY_VALUES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValues(List values) { + public void setValues(@jakarta.annotation.Nullable List values) { this.values = values; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java index a0a521746..2a37ad187 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java @@ -48,7 +48,7 @@ SubFormFieldsPerDocumentBase.JSON_PROPERTY_NAME, SubFormFieldsPerDocumentBase.JSON_PROPERTY_PAGE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -69,36 +69,47 @@ public class SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_DOCUMENT_INDEX = "document_index"; + @jakarta.annotation.Nonnull private Integer documentIndex; public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nonnull private String apiId; public static final String JSON_PROPERTY_HEIGHT = "height"; + @jakarta.annotation.Nonnull private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_SIGNER = "signer"; + @jakarta.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type; public static final String JSON_PROPERTY_WIDTH = "width"; + @jakarta.annotation.Nonnull private Integer width; public static final String JSON_PROPERTY_X = "x"; + @jakarta.annotation.Nonnull private Integer x; public static final String JSON_PROPERTY_Y = "y"; + @jakarta.annotation.Nonnull private Integer y; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_PAGE = "page"; + @jakarta.annotation.Nullable private Integer page; public SubFormFieldsPerDocumentBase() { @@ -119,7 +130,7 @@ static public SubFormFieldsPerDocumentBase init(HashMap data) throws Exception { ); } - public SubFormFieldsPerDocumentBase documentIndex(Integer documentIndex) { + public SubFormFieldsPerDocumentBase documentIndex(@jakarta.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; return this; } @@ -139,12 +150,12 @@ public Integer getDocumentIndex() { @JsonProperty(JSON_PROPERTY_DOCUMENT_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDocumentIndex(Integer documentIndex) { + public void setDocumentIndex(@jakarta.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; } - public SubFormFieldsPerDocumentBase apiId(String apiId) { + public SubFormFieldsPerDocumentBase apiId(@jakarta.annotation.Nonnull String apiId) { this.apiId = apiId; return this; } @@ -164,12 +175,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nonnull String apiId) { this.apiId = apiId; } - public SubFormFieldsPerDocumentBase height(Integer height) { + public SubFormFieldsPerDocumentBase height(@jakarta.annotation.Nonnull Integer height) { this.height = height; return this; } @@ -189,12 +200,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHeight(Integer height) { + public void setHeight(@jakarta.annotation.Nonnull Integer height) { this.height = height; } - public SubFormFieldsPerDocumentBase required(Boolean required) { + public SubFormFieldsPerDocumentBase required(@jakarta.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -214,12 +225,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nonnull Boolean required) { this.required = required; } - public SubFormFieldsPerDocumentBase signer(String signer) { + public SubFormFieldsPerDocumentBase signer(@jakarta.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -243,7 +254,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@jakarta.annotation.Nonnull String signer) { this.signer = signer; } @@ -252,7 +263,7 @@ public void setSigner(Integer signer) { } - public SubFormFieldsPerDocumentBase type(String type) { + public SubFormFieldsPerDocumentBase type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -272,12 +283,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentBase width(Integer width) { + public SubFormFieldsPerDocumentBase width(@jakarta.annotation.Nonnull Integer width) { this.width = width; return this; } @@ -297,12 +308,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWidth(Integer width) { + public void setWidth(@jakarta.annotation.Nonnull Integer width) { this.width = width; } - public SubFormFieldsPerDocumentBase x(Integer x) { + public SubFormFieldsPerDocumentBase x(@jakarta.annotation.Nonnull Integer x) { this.x = x; return this; } @@ -322,12 +333,12 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setX(Integer x) { + public void setX(@jakarta.annotation.Nonnull Integer x) { this.x = x; } - public SubFormFieldsPerDocumentBase y(Integer y) { + public SubFormFieldsPerDocumentBase y(@jakarta.annotation.Nonnull Integer y) { this.y = y; return this; } @@ -347,12 +358,12 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setY(Integer y) { + public void setY(@jakarta.annotation.Nonnull Integer y) { this.y = y; } - public SubFormFieldsPerDocumentBase name(String name) { + public SubFormFieldsPerDocumentBase name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -372,12 +383,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public SubFormFieldsPerDocumentBase page(Integer page) { + public SubFormFieldsPerDocumentBase page(@jakarta.annotation.Nullable Integer page) { this.page = page; return this; } @@ -397,7 +408,7 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@jakarta.annotation.Nullable Integer page) { this.page = page; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java index 25cc889d0..660550c4d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java @@ -41,7 +41,7 @@ SubFormFieldsPerDocumentCheckbox.JSON_PROPERTY_IS_CHECKED, SubFormFieldsPerDocumentCheckbox.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,12 +50,15 @@ public class SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; + @jakarta.annotation.Nonnull private Boolean isChecked; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public SubFormFieldsPerDocumentCheckbox() { @@ -76,7 +79,7 @@ static public SubFormFieldsPerDocumentCheckbox init(HashMap data) throws Excepti ); } - public SubFormFieldsPerDocumentCheckbox type(String type) { + public SubFormFieldsPerDocumentCheckbox type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -96,12 +99,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentCheckbox isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentCheckbox isChecked(@jakarta.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -121,12 +124,12 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@jakarta.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } - public SubFormFieldsPerDocumentCheckbox group(String group) { + public SubFormFieldsPerDocumentCheckbox group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -146,7 +149,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java index ea0b0dfc6..6275827fe 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ SubFormFieldsPerDocumentCheckboxMerge.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox-merge"; public SubFormFieldsPerDocumentCheckboxMerge() { @@ -68,7 +69,7 @@ static public SubFormFieldsPerDocumentCheckboxMerge init(HashMap data) throws Ex ); } - public SubFormFieldsPerDocumentCheckboxMerge type(String type) { + public SubFormFieldsPerDocumentCheckboxMerge type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java index ff673233e..314aef5ae 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java @@ -41,7 +41,7 @@ SubFormFieldsPerDocumentDateSigned.JSON_PROPERTY_FONT_FAMILY, SubFormFieldsPerDocumentDateSigned.JSON_PROPERTY_FONT_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,43 +50,44 @@ public class SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "date_signed"; /** * Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -116,9 +117,11 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; + @jakarta.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; + @jakarta.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDateSigned() { @@ -139,7 +142,7 @@ static public SubFormFieldsPerDocumentDateSigned init(HashMap data) throws Excep ); } - public SubFormFieldsPerDocumentDateSigned type(String type) { + public SubFormFieldsPerDocumentDateSigned type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -159,12 +162,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDateSigned fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDateSigned fontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -184,12 +187,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDateSigned fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDateSigned fontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -209,7 +212,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java index ce35e13ab..154fec957 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java @@ -45,7 +45,7 @@ SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_FONT_FAMILY, SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_FONT_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -54,49 +54,52 @@ public class SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nonnull private List options = new ArrayList<>(); public static final String JSON_PROPERTY_CONTENT = "content"; + @jakarta.annotation.Nullable private String content; /** * Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -126,9 +129,11 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; + @jakarta.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; + @jakarta.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDropdown() { @@ -149,7 +154,7 @@ static public SubFormFieldsPerDocumentDropdown init(HashMap data) throws Excepti ); } - public SubFormFieldsPerDocumentDropdown type(String type) { + public SubFormFieldsPerDocumentDropdown type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -169,12 +174,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDropdown options(List options) { + public SubFormFieldsPerDocumentDropdown options(@jakarta.annotation.Nonnull List options) { this.options = options; return this; } @@ -202,12 +207,12 @@ public List getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOptions(List options) { + public void setOptions(@jakarta.annotation.Nonnull List options) { this.options = options; } - public SubFormFieldsPerDocumentDropdown content(String content) { + public SubFormFieldsPerDocumentDropdown content(@jakarta.annotation.Nullable String content) { this.content = content; return this; } @@ -227,12 +232,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@jakarta.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentDropdown fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDropdown fontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -252,12 +257,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDropdown fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDropdown fontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -277,7 +282,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java index 44cb48384..491da0641 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java @@ -43,7 +43,7 @@ SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_FONT_FAMILY, SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_FONT_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -52,49 +52,52 @@ public class SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_CONTENT = "content"; + @jakarta.annotation.Nonnull private String content; public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; + @jakarta.annotation.Nonnull private String contentUrl; /** * Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -124,9 +127,11 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; + @jakarta.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; + @jakarta.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentHyperlink() { @@ -147,7 +152,7 @@ static public SubFormFieldsPerDocumentHyperlink init(HashMap data) throws Except ); } - public SubFormFieldsPerDocumentHyperlink type(String type) { + public SubFormFieldsPerDocumentHyperlink type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -167,12 +172,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentHyperlink content(String content) { + public SubFormFieldsPerDocumentHyperlink content(@jakarta.annotation.Nonnull String content) { this.content = content; return this; } @@ -192,12 +197,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContent(String content) { + public void setContent(@jakarta.annotation.Nonnull String content) { this.content = content; } - public SubFormFieldsPerDocumentHyperlink contentUrl(String contentUrl) { + public SubFormFieldsPerDocumentHyperlink contentUrl(@jakarta.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; return this; } @@ -217,12 +222,12 @@ public String getContentUrl() { @JsonProperty(JSON_PROPERTY_CONTENT_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContentUrl(String contentUrl) { + public void setContentUrl(@jakarta.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; } - public SubFormFieldsPerDocumentHyperlink fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentHyperlink fontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -242,12 +247,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentHyperlink fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentHyperlink fontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -267,7 +272,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java index 886c59fe8..9c522f0f4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ SubFormFieldsPerDocumentInitials.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "initials"; public SubFormFieldsPerDocumentInitials() { @@ -68,7 +69,7 @@ static public SubFormFieldsPerDocumentInitials init(HashMap data) throws Excepti ); } - public SubFormFieldsPerDocumentInitials type(String type) { + public SubFormFieldsPerDocumentInitials type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java index b21b9da60..e2db055cd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java @@ -41,7 +41,7 @@ SubFormFieldsPerDocumentRadio.JSON_PROPERTY_GROUP, SubFormFieldsPerDocumentRadio.JSON_PROPERTY_IS_CHECKED }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,12 +50,15 @@ public class SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nonnull private String group; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; + @jakarta.annotation.Nonnull private Boolean isChecked; public SubFormFieldsPerDocumentRadio() { @@ -76,7 +79,7 @@ static public SubFormFieldsPerDocumentRadio init(HashMap data) throws Exception ); } - public SubFormFieldsPerDocumentRadio type(String type) { + public SubFormFieldsPerDocumentRadio type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -96,12 +99,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentRadio group(String group) { + public SubFormFieldsPerDocumentRadio group(@jakarta.annotation.Nonnull String group) { this.group = group; return this; } @@ -121,12 +124,12 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nonnull String group) { this.group = group; } - public SubFormFieldsPerDocumentRadio isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentRadio isChecked(@jakarta.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -146,7 +149,7 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@jakarta.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java index fb56d681c..fd72a6bd2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ SubFormFieldsPerDocumentSignature.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "signature"; public SubFormFieldsPerDocumentSignature() { @@ -68,7 +69,7 @@ static public SubFormFieldsPerDocumentSignature init(HashMap data) throws Except ); } - public SubFormFieldsPerDocumentSignature type(String type) { + public SubFormFieldsPerDocumentSignature type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java index 385ec2893..396c85dbe 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java @@ -49,7 +49,7 @@ SubFormFieldsPerDocumentText.JSON_PROPERTY_FONT_FAMILY, SubFormFieldsPerDocumentText.JSON_PROPERTY_FONT_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -58,43 +58,48 @@ public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_PLACEHOLDER = "placeholder"; + @jakarta.annotation.Nullable private String placeholder; public static final String JSON_PROPERTY_AUTO_FILL_TYPE = "auto_fill_type"; + @jakarta.annotation.Nullable private String autoFillType; public static final String JSON_PROPERTY_LINK_ID = "link_id"; + @jakarta.annotation.Nullable private String linkId; public static final String JSON_PROPERTY_MASKED = "masked"; + @jakarta.annotation.Nullable private Boolean masked; /** * 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. **NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -124,52 +129,56 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; + @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_CONTENT = "content"; + @jakarta.annotation.Nullable private String content; /** * Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -199,9 +208,11 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; + @jakarta.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; + @jakarta.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentText() { @@ -222,7 +233,7 @@ static public SubFormFieldsPerDocumentText init(HashMap data) throws Exception { ); } - public SubFormFieldsPerDocumentText type(String type) { + public SubFormFieldsPerDocumentText type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -242,12 +253,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentText placeholder(String placeholder) { + public SubFormFieldsPerDocumentText placeholder(@jakarta.annotation.Nullable String placeholder) { this.placeholder = placeholder; return this; } @@ -267,12 +278,12 @@ public String getPlaceholder() { @JsonProperty(JSON_PROPERTY_PLACEHOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlaceholder(String placeholder) { + public void setPlaceholder(@jakarta.annotation.Nullable String placeholder) { this.placeholder = placeholder; } - public SubFormFieldsPerDocumentText autoFillType(String autoFillType) { + public SubFormFieldsPerDocumentText autoFillType(@jakarta.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; return this; } @@ -292,12 +303,12 @@ public String getAutoFillType() { @JsonProperty(JSON_PROPERTY_AUTO_FILL_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAutoFillType(String autoFillType) { + public void setAutoFillType(@jakarta.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; } - public SubFormFieldsPerDocumentText linkId(String linkId) { + public SubFormFieldsPerDocumentText linkId(@jakarta.annotation.Nullable String linkId) { this.linkId = linkId; return this; } @@ -317,12 +328,12 @@ public String getLinkId() { @JsonProperty(JSON_PROPERTY_LINK_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkId(String linkId) { + public void setLinkId(@jakarta.annotation.Nullable String linkId) { this.linkId = linkId; } - public SubFormFieldsPerDocumentText masked(Boolean masked) { + public SubFormFieldsPerDocumentText masked(@jakarta.annotation.Nullable Boolean masked) { this.masked = masked; return this; } @@ -342,12 +353,12 @@ public Boolean getMasked() { @JsonProperty(JSON_PROPERTY_MASKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMasked(Boolean masked) { + public void setMasked(@jakarta.annotation.Nullable Boolean masked) { this.masked = masked; } - public SubFormFieldsPerDocumentText validationType(ValidationTypeEnum validationType) { + public SubFormFieldsPerDocumentText validationType(@jakarta.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -367,12 +378,12 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@jakarta.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public SubFormFieldsPerDocumentText validationCustomRegex(String validationCustomRegex) { + public SubFormFieldsPerDocumentText validationCustomRegex(@jakarta.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; return this; } @@ -392,12 +403,12 @@ public String getValidationCustomRegex() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegex(String validationCustomRegex) { + public void setValidationCustomRegex(@jakarta.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; } - public SubFormFieldsPerDocumentText validationCustomRegexFormatLabel(String validationCustomRegexFormatLabel) { + public SubFormFieldsPerDocumentText validationCustomRegexFormatLabel(@jakarta.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; return this; } @@ -417,12 +428,12 @@ public String getValidationCustomRegexFormatLabel() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegexFormatLabel(String validationCustomRegexFormatLabel) { + public void setValidationCustomRegexFormatLabel(@jakarta.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; } - public SubFormFieldsPerDocumentText content(String content) { + public SubFormFieldsPerDocumentText content(@jakarta.annotation.Nullable String content) { this.content = content; return this; } @@ -442,12 +453,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@jakarta.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentText fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentText fontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -467,12 +478,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentText fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentText fontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -492,7 +503,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java index 799a0efee..1024f05cc 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java @@ -41,7 +41,7 @@ SubFormFieldsPerDocumentTextMerge.JSON_PROPERTY_FONT_FAMILY, SubFormFieldsPerDocumentTextMerge.JSON_PROPERTY_FONT_SIZE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -50,43 +50,44 @@ public class SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text-merge"; /** * Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -116,9 +117,11 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; + @jakarta.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; + @jakarta.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentTextMerge() { @@ -139,7 +142,7 @@ static public SubFormFieldsPerDocumentTextMerge init(HashMap data) throws Except ); } - public SubFormFieldsPerDocumentTextMerge type(String type) { + public SubFormFieldsPerDocumentTextMerge type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -159,12 +162,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentTextMerge fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentTextMerge fontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -184,12 +187,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentTextMerge fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentTextMerge fontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -209,7 +212,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@jakarta.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubMergeField.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubMergeField.java index cc612873d..9b039b46f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubMergeField.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubMergeField.java @@ -36,19 +36,20 @@ SubMergeField.JSON_PROPERTY_NAME, SubMergeField.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubMergeField { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; /** * The type of merge field. */ public enum TypeEnum { - TEXT("text"), + TEXT(String.valueOf("text")), - CHECKBOX("checkbox"); + CHECKBOX(String.valueOf("checkbox")); private String value; @@ -78,6 +79,7 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; public SubMergeField() { @@ -98,7 +100,7 @@ static public SubMergeField init(HashMap data) throws Exception { ); } - public SubMergeField name(String name) { + public SubMergeField name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -118,12 +120,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubMergeField type(TypeEnum type) { + public SubMergeField type(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -143,7 +145,7 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOAuth.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOAuth.java index c9976269f..c5a779573 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOAuth.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOAuth.java @@ -38,31 +38,32 @@ SubOAuth.JSON_PROPERTY_CALLBACK_URL, SubOAuth.JSON_PROPERTY_SCOPES }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; + @jakarta.annotation.Nullable private String callbackUrl; /** * Gets or Sets scopes */ public enum ScopesEnum { - REQUEST_SIGNATURE("request_signature"), + REQUEST_SIGNATURE(String.valueOf("request_signature")), - BASIC_ACCOUNT_INFO("basic_account_info"), + BASIC_ACCOUNT_INFO(String.valueOf("basic_account_info")), - ACCOUNT_ACCESS("account_access"), + ACCOUNT_ACCESS(String.valueOf("account_access")), - SIGNATURE_REQUEST_ACCESS("signature_request_access"), + SIGNATURE_REQUEST_ACCESS(String.valueOf("signature_request_access")), - TEMPLATE_ACCESS("template_access"), + TEMPLATE_ACCESS(String.valueOf("template_access")), - TEAM_ACCESS("team_access"), + TEAM_ACCESS(String.valueOf("team_access")), - API_APP_ACCESS("api_app_access"), + API_APP_ACCESS(String.valueOf("api_app_access")), - EMPTY(""); + EMPTY(String.valueOf("")); private String value; @@ -92,6 +93,7 @@ public static ScopesEnum fromValue(String value) { } public static final String JSON_PROPERTY_SCOPES = "scopes"; + @jakarta.annotation.Nullable private List scopes = null; public SubOAuth() { @@ -112,7 +114,7 @@ static public SubOAuth init(HashMap data) throws Exception { ); } - public SubOAuth callbackUrl(String callbackUrl) { + public SubOAuth callbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -132,12 +134,12 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@jakarta.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public SubOAuth scopes(List scopes) { + public SubOAuth scopes(@jakarta.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -165,7 +167,7 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@jakarta.annotation.Nullable List scopes) { this.scopes = scopes; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOptions.java index 73d5df621..2ff1672a9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubOptions.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ SubOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; + @jakarta.annotation.Nullable private Boolean canInsertEverywhere = false; public SubOptions() { @@ -59,7 +60,7 @@ static public SubOptions init(HashMap data) throws Exception { ); } - public SubOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public SubOptions canInsertEverywhere(@jakarta.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -79,7 +80,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@jakarta.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java index 2120ea67b..e3906ba3f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java @@ -40,16 +40,19 @@ SubSignatureRequestGroupedSigners.JSON_PROPERTY_SIGNERS, SubSignatureRequestGroupedSigners.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubSignatureRequestGroupedSigners { public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nonnull private String group; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public SubSignatureRequestGroupedSigners() { @@ -70,7 +73,7 @@ static public SubSignatureRequestGroupedSigners init(HashMap data) throws Except ); } - public SubSignatureRequestGroupedSigners group(String group) { + public SubSignatureRequestGroupedSigners group(@jakarta.annotation.Nonnull String group) { this.group = group; return this; } @@ -90,12 +93,12 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nonnull String group) { this.group = group; } - public SubSignatureRequestGroupedSigners signers(List signers) { + public SubSignatureRequestGroupedSigners signers(@jakarta.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -123,12 +126,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nonnull List signers) { this.signers = signers; } - public SubSignatureRequestGroupedSigners order(Integer order) { + public SubSignatureRequestGroupedSigners order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -148,7 +151,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java index d1900a147..c0d16fef9 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java @@ -40,31 +40,36 @@ SubSignatureRequestSigner.JSON_PROPERTY_SMS_PHONE_NUMBER, SubSignatureRequestSigner.JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubSignatureRequestSigner { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_PIN = "pin"; + @jakarta.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; + @jakarta.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -94,6 +99,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; + @jakarta.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestSigner() { @@ -114,7 +120,7 @@ static public SubSignatureRequestSigner init(HashMap data) throws Exception { ); } - public SubSignatureRequestSigner name(String name) { + public SubSignatureRequestSigner name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -134,12 +140,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestSigner emailAddress(String emailAddress) { + public SubSignatureRequestSigner emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -159,12 +165,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestSigner order(Integer order) { + public SubSignatureRequestSigner order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -184,12 +190,12 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } - public SubSignatureRequestSigner pin(String pin) { + public SubSignatureRequestSigner pin(@jakarta.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -209,12 +215,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@jakarta.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestSigner smsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -234,12 +240,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SubSignatureRequestSigner smsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public SubSignatureRequestSigner smsPhoneNumberType(@jakarta.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -259,7 +265,7 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType(@jakarta.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java index 53222fa5f..c5c34786f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java @@ -40,31 +40,36 @@ SubSignatureRequestTemplateSigner.JSON_PROPERTY_SMS_PHONE_NUMBER, SubSignatureRequestTemplateSigner.JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubSignatureRequestTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_PIN = "pin"; + @jakarta.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; + @jakarta.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -94,6 +99,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; + @jakarta.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestTemplateSigner() { @@ -114,7 +120,7 @@ static public SubSignatureRequestTemplateSigner init(HashMap data) throws Except ); } - public SubSignatureRequestTemplateSigner role(String role) { + public SubSignatureRequestTemplateSigner role(@jakarta.annotation.Nonnull String role) { this.role = role; return this; } @@ -134,12 +140,12 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@jakarta.annotation.Nonnull String role) { this.role = role; } - public SubSignatureRequestTemplateSigner name(String name) { + public SubSignatureRequestTemplateSigner name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -159,12 +165,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestTemplateSigner emailAddress(String emailAddress) { + public SubSignatureRequestTemplateSigner emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -184,12 +190,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestTemplateSigner pin(String pin) { + public SubSignatureRequestTemplateSigner pin(@jakarta.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -209,12 +215,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@jakarta.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestTemplateSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestTemplateSigner smsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -234,12 +240,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@jakarta.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SubSignatureRequestTemplateSigner smsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public SubSignatureRequestTemplateSigner smsPhoneNumberType(@jakarta.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -259,7 +265,7 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType(@jakarta.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSigningOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSigningOptions.java index 4e2c33cc5..8a194e4bf 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSigningOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubSigningOptions.java @@ -39,20 +39,20 @@ SubSigningOptions.JSON_PROPERTY_TYPE, SubSigningOptions.JSON_PROPERTY_UPLOAD }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubSigningOptions { /** * The default type shown (limited to the listed types) */ public enum DefaultTypeEnum { - DRAW("draw"), + DRAW(String.valueOf("draw")), - PHONE("phone"), + PHONE(String.valueOf("phone")), - TYPE("type"), + TYPE(String.valueOf("type")), - UPLOAD("upload"); + UPLOAD(String.valueOf("upload")); private String value; @@ -82,18 +82,23 @@ public static DefaultTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_DEFAULT_TYPE = "default_type"; + @jakarta.annotation.Nonnull private DefaultTypeEnum defaultType; public static final String JSON_PROPERTY_DRAW = "draw"; + @jakarta.annotation.Nullable private Boolean draw = false; public static final String JSON_PROPERTY_PHONE = "phone"; + @jakarta.annotation.Nullable private Boolean phone = false; public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private Boolean type = false; public static final String JSON_PROPERTY_UPLOAD = "upload"; + @jakarta.annotation.Nullable private Boolean upload = false; public SubSigningOptions() { @@ -114,7 +119,7 @@ static public SubSigningOptions init(HashMap data) throws Exception { ); } - public SubSigningOptions defaultType(DefaultTypeEnum defaultType) { + public SubSigningOptions defaultType(@jakarta.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; return this; } @@ -134,12 +139,12 @@ public DefaultTypeEnum getDefaultType() { @JsonProperty(JSON_PROPERTY_DEFAULT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDefaultType(DefaultTypeEnum defaultType) { + public void setDefaultType(@jakarta.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; } - public SubSigningOptions draw(Boolean draw) { + public SubSigningOptions draw(@jakarta.annotation.Nullable Boolean draw) { this.draw = draw; return this; } @@ -159,12 +164,12 @@ public Boolean getDraw() { @JsonProperty(JSON_PROPERTY_DRAW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDraw(Boolean draw) { + public void setDraw(@jakarta.annotation.Nullable Boolean draw) { this.draw = draw; } - public SubSigningOptions phone(Boolean phone) { + public SubSigningOptions phone(@jakarta.annotation.Nullable Boolean phone) { this.phone = phone; return this; } @@ -184,12 +189,12 @@ public Boolean getPhone() { @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(Boolean phone) { + public void setPhone(@jakarta.annotation.Nullable Boolean phone) { this.phone = phone; } - public SubSigningOptions type(Boolean type) { + public SubSigningOptions type(@jakarta.annotation.Nullable Boolean type) { this.type = type; return this; } @@ -209,12 +214,12 @@ public Boolean getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(Boolean type) { + public void setType(@jakarta.annotation.Nullable Boolean type) { this.type = type; } - public SubSigningOptions upload(Boolean upload) { + public SubSigningOptions upload(@jakarta.annotation.Nullable Boolean upload) { this.upload = upload; return this; } @@ -234,7 +239,7 @@ public Boolean getUpload() { @JsonProperty(JSON_PROPERTY_UPLOAD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpload(Boolean upload) { + public void setUpload(@jakarta.annotation.Nullable Boolean upload) { this.upload = upload; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTeamResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTeamResponse.java index e653cbb13..5ff941e7f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTeamResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTeamResponse.java @@ -36,13 +36,15 @@ SubTeamResponse.JSON_PROPERTY_TEAM_ID, SubTeamResponse.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubTeamResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public SubTeamResponse() { @@ -63,7 +65,7 @@ static public SubTeamResponse init(HashMap data) throws Exception { ); } - public SubTeamResponse teamId(String teamId) { + public SubTeamResponse teamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -83,12 +85,12 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; } - public SubTeamResponse name(String name) { + public SubTeamResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -108,7 +110,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTemplateRole.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTemplateRole.java index 081d88d24..36ebe7ad3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTemplateRole.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubTemplateRole.java @@ -36,13 +36,15 @@ SubTemplateRole.JSON_PROPERTY_NAME, SubTemplateRole.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubTemplateRole { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public SubTemplateRole() { @@ -63,7 +65,7 @@ static public SubTemplateRole init(HashMap data) throws Exception { ); } - public SubTemplateRole name(String name) { + public SubTemplateRole name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -83,12 +85,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public SubTemplateRole order(Integer order) { + public SubTemplateRole order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -108,7 +110,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java index bc3ea96e0..0e08dbdb8 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java @@ -37,16 +37,19 @@ SubUnclaimedDraftSigner.JSON_PROPERTY_NAME, SubUnclaimedDraftSigner.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubUnclaimedDraftSigner { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public SubUnclaimedDraftSigner() { @@ -67,7 +70,7 @@ static public SubUnclaimedDraftSigner init(HashMap data) throws Exception { ); } - public SubUnclaimedDraftSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftSigner emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -87,12 +90,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubUnclaimedDraftSigner name(String name) { + public SubUnclaimedDraftSigner name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -112,12 +115,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftSigner order(Integer order) { + public SubUnclaimedDraftSigner order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -137,7 +140,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java index 2b7d02ca5..7cb716183 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java @@ -37,16 +37,19 @@ SubUnclaimedDraftTemplateSigner.JSON_PROPERTY_NAME, SubUnclaimedDraftTemplateSigner.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubUnclaimedDraftTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nonnull private String emailAddress; public SubUnclaimedDraftTemplateSigner() { @@ -67,7 +70,7 @@ static public SubUnclaimedDraftTemplateSigner init(HashMap data) throws Exceptio ); } - public SubUnclaimedDraftTemplateSigner role(String role) { + public SubUnclaimedDraftTemplateSigner role(@jakarta.annotation.Nonnull String role) { this.role = role; return this; } @@ -87,12 +90,12 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@jakarta.annotation.Nonnull String role) { this.role = role; } - public SubUnclaimedDraftTemplateSigner name(String name) { + public SubUnclaimedDraftTemplateSigner name(@jakarta.annotation.Nonnull String name) { this.name = name; return this; } @@ -112,12 +115,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftTemplateSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftTemplateSigner emailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -137,7 +140,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java index a14d8cc1a..0b98b9da3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java @@ -49,19 +49,20 @@ SubWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR2, SubWhiteLabelingOptions.JSON_PROPERTY_RESET_TO_DEFAULT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; + @jakarta.annotation.Nullable private String headerBackgroundColor = "#1a1a1a"; /** * Gets or Sets legalVersion */ public enum LegalVersionEnum { - TERMS1("terms1"), + TERMS1(String.valueOf("terms1")), - TERMS2("terms2"); + TERMS2(String.valueOf("terms2")); private String value; @@ -91,45 +92,59 @@ public static LegalVersionEnum fromValue(String value) { } public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; + @jakarta.annotation.Nullable private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; + @jakarta.annotation.Nullable private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; + @jakarta.annotation.Nullable private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; + @jakarta.annotation.Nullable private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; + @jakarta.annotation.Nullable private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; + @jakarta.annotation.Nullable private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; + @jakarta.annotation.Nullable private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; + @jakarta.annotation.Nullable private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; + @jakarta.annotation.Nullable private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; + @jakarta.annotation.Nullable private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; + @jakarta.annotation.Nullable private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; + @jakarta.annotation.Nullable private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; + @jakarta.annotation.Nullable private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; + @jakarta.annotation.Nullable private Boolean resetToDefault; public SubWhiteLabelingOptions() { @@ -150,7 +165,7 @@ static public SubWhiteLabelingOptions init(HashMap data) throws Exception { ); } - public SubWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public SubWhiteLabelingOptions headerBackgroundColor(@jakarta.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -170,12 +185,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@jakarta.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public SubWhiteLabelingOptions legalVersion(LegalVersionEnum legalVersion) { + public SubWhiteLabelingOptions legalVersion(@jakarta.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; return this; } @@ -195,12 +210,12 @@ public LegalVersionEnum getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(LegalVersionEnum legalVersion) { + public void setLegalVersion(@jakarta.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; } - public SubWhiteLabelingOptions linkColor(String linkColor) { + public SubWhiteLabelingOptions linkColor(@jakarta.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -220,12 +235,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@jakarta.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public SubWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public SubWhiteLabelingOptions pageBackgroundColor(@jakarta.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -245,12 +260,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@jakarta.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public SubWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public SubWhiteLabelingOptions primaryButtonColor(@jakarta.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -270,12 +285,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@jakarta.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } - public SubWhiteLabelingOptions primaryButtonColorHover(String primaryButtonColorHover) { + public SubWhiteLabelingOptions primaryButtonColorHover(@jakarta.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -295,12 +310,12 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover(@jakarta.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } - public SubWhiteLabelingOptions primaryButtonTextColor(String primaryButtonTextColor) { + public SubWhiteLabelingOptions primaryButtonTextColor(@jakarta.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -320,12 +335,12 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor(@jakarta.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } - public SubWhiteLabelingOptions primaryButtonTextColorHover(String primaryButtonTextColorHover) { + public SubWhiteLabelingOptions primaryButtonTextColorHover(@jakarta.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -345,12 +360,12 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover(@jakarta.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public SubWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public SubWhiteLabelingOptions secondaryButtonColor(@jakarta.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -370,12 +385,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@jakarta.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } - public SubWhiteLabelingOptions secondaryButtonColorHover(String secondaryButtonColorHover) { + public SubWhiteLabelingOptions secondaryButtonColorHover(@jakarta.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -395,12 +410,12 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover(@jakarta.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } - public SubWhiteLabelingOptions secondaryButtonTextColor(String secondaryButtonTextColor) { + public SubWhiteLabelingOptions secondaryButtonTextColor(@jakarta.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -420,12 +435,12 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor(@jakarta.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } - public SubWhiteLabelingOptions secondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public SubWhiteLabelingOptions secondaryButtonTextColorHover(@jakarta.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -445,12 +460,12 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover(@jakarta.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public SubWhiteLabelingOptions textColor1(String textColor1) { + public SubWhiteLabelingOptions textColor1(@jakarta.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -470,12 +485,12 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@jakarta.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public SubWhiteLabelingOptions textColor2(String textColor2) { + public SubWhiteLabelingOptions textColor2(@jakarta.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -495,12 +510,12 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@jakarta.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } - public SubWhiteLabelingOptions resetToDefault(Boolean resetToDefault) { + public SubWhiteLabelingOptions resetToDefault(@jakarta.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; return this; } @@ -520,7 +535,7 @@ public Boolean getResetToDefault() { @JsonProperty(JSON_PROPERTY_RESET_TO_DEFAULT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResetToDefault(Boolean resetToDefault) { + public void setResetToDefault(@jakarta.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java index d79399a8f..26ce74924 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java @@ -37,26 +37,28 @@ TeamAddMemberRequest.JSON_PROPERTY_EMAIL_ADDRESS, TeamAddMemberRequest.JSON_PROPERTY_ROLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamAddMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; /** * A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided. */ public enum RoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -86,6 +88,7 @@ public static RoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nullable private RoleEnum role; public TeamAddMemberRequest() { @@ -106,7 +109,7 @@ static public TeamAddMemberRequest init(HashMap data) throws Exception { ); } - public TeamAddMemberRequest accountId(String accountId) { + public TeamAddMemberRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -126,12 +129,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamAddMemberRequest emailAddress(String emailAddress) { + public TeamAddMemberRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -151,12 +154,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamAddMemberRequest role(RoleEnum role) { + public TeamAddMemberRequest role(@jakarta.annotation.Nullable RoleEnum role) { this.role = role; return this; } @@ -176,7 +179,7 @@ public RoleEnum getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(RoleEnum role) { + public void setRole(@jakarta.annotation.Nullable RoleEnum role) { this.role = role; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index cb5c87e34..f5b0e92ad 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ TeamCreateRequest.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamCreateRequest { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name = "Untitled Team"; public TeamCreateRequest() { @@ -59,7 +60,7 @@ static public TeamCreateRequest init(HashMap data) throws Exception { ); } - public TeamCreateRequest name(String name) { + public TeamCreateRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -79,7 +80,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java index f6a787003..8d2bf7896 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java @@ -40,13 +40,15 @@ TeamGetInfoResponse.JSON_PROPERTY_TEAM, TeamGetInfoResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamGetInfoResponse { public static final String JSON_PROPERTY_TEAM = "team"; + @jakarta.annotation.Nonnull private TeamInfoResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TeamGetInfoResponse() { @@ -67,7 +69,7 @@ static public TeamGetInfoResponse init(HashMap data) throws Exception { ); } - public TeamGetInfoResponse team(TeamInfoResponse team) { + public TeamGetInfoResponse team(@jakarta.annotation.Nonnull TeamInfoResponse team) { this.team = team; return this; } @@ -87,12 +89,12 @@ public TeamInfoResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamInfoResponse team) { + public void setTeam(@jakarta.annotation.Nonnull TeamInfoResponse team) { this.team = team; } - public TeamGetInfoResponse warnings(List warnings) { + public TeamGetInfoResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetResponse.java index f1670c185..957c890db 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamGetResponse.java @@ -40,13 +40,15 @@ TeamGetResponse.JSON_PROPERTY_TEAM, TeamGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamGetResponse { public static final String JSON_PROPERTY_TEAM = "team"; + @jakarta.annotation.Nonnull private TeamResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TeamGetResponse() { @@ -67,7 +69,7 @@ static public TeamGetResponse init(HashMap data) throws Exception { ); } - public TeamGetResponse team(TeamResponse team) { + public TeamGetResponse team(@jakarta.annotation.Nonnull TeamResponse team) { this.team = team; return this; } @@ -87,12 +89,12 @@ public TeamResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamResponse team) { + public void setTeam(@jakarta.annotation.Nonnull TeamResponse team) { this.team = team; } - public TeamGetResponse warnings(List warnings) { + public TeamGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java index 4a1e91ae2..39282f5f5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java @@ -40,22 +40,27 @@ TeamInfoResponse.JSON_PROPERTY_NUM_MEMBERS, TeamInfoResponse.JSON_PROPERTY_NUM_SUB_TEAMS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamInfoResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_TEAM_PARENT = "team_parent"; + @jakarta.annotation.Nullable private TeamParentResponse teamParent; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_NUM_MEMBERS = "num_members"; + @jakarta.annotation.Nullable private Integer numMembers; public static final String JSON_PROPERTY_NUM_SUB_TEAMS = "num_sub_teams"; + @jakarta.annotation.Nullable private Integer numSubTeams; public TeamInfoResponse() { @@ -76,7 +81,7 @@ static public TeamInfoResponse init(HashMap data) throws Exception { ); } - public TeamInfoResponse teamId(String teamId) { + public TeamInfoResponse teamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -96,12 +101,12 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInfoResponse teamParent(TeamParentResponse teamParent) { + public TeamInfoResponse teamParent(@jakarta.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; return this; } @@ -121,12 +126,12 @@ public TeamParentResponse getTeamParent() { @JsonProperty(JSON_PROPERTY_TEAM_PARENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamParent(TeamParentResponse teamParent) { + public void setTeamParent(@jakarta.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; } - public TeamInfoResponse name(String name) { + public TeamInfoResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -146,12 +151,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TeamInfoResponse numMembers(Integer numMembers) { + public TeamInfoResponse numMembers(@jakarta.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; return this; } @@ -171,12 +176,12 @@ public Integer getNumMembers() { @JsonProperty(JSON_PROPERTY_NUM_MEMBERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumMembers(Integer numMembers) { + public void setNumMembers(@jakarta.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; } - public TeamInfoResponse numSubTeams(Integer numSubTeams) { + public TeamInfoResponse numSubTeams(@jakarta.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; return this; } @@ -196,7 +201,7 @@ public Integer getNumSubTeams() { @JsonProperty(JSON_PROPERTY_NUM_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumSubTeams(Integer numSubTeams) { + public void setNumSubTeams(@jakarta.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java index fb8aef51e..1e1b4f1f0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java @@ -40,25 +40,31 @@ TeamInviteResponse.JSON_PROPERTY_REDEEMED_AT, TeamInviteResponse.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamInviteResponse { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nullable private String role; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; + @jakarta.annotation.Nullable private Integer sentAt; public static final String JSON_PROPERTY_REDEEMED_AT = "redeemed_at"; + @jakarta.annotation.Nullable private Integer redeemedAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public TeamInviteResponse() { @@ -79,7 +85,7 @@ static public TeamInviteResponse init(HashMap data) throws Exception { ); } - public TeamInviteResponse emailAddress(String emailAddress) { + public TeamInviteResponse emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -99,12 +105,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamInviteResponse teamId(String teamId) { + public TeamInviteResponse teamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -124,12 +130,12 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInviteResponse role(String role) { + public TeamInviteResponse role(@jakarta.annotation.Nullable String role) { this.role = role; return this; } @@ -149,12 +155,12 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@jakarta.annotation.Nullable String role) { this.role = role; } - public TeamInviteResponse sentAt(Integer sentAt) { + public TeamInviteResponse sentAt(@jakarta.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -174,12 +180,12 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@jakarta.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } - public TeamInviteResponse redeemedAt(Integer redeemedAt) { + public TeamInviteResponse redeemedAt(@jakarta.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; return this; } @@ -199,12 +205,12 @@ public Integer getRedeemedAt() { @JsonProperty(JSON_PROPERTY_REDEEMED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRedeemedAt(Integer redeemedAt) { + public void setRedeemedAt(@jakarta.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; } - public TeamInviteResponse expiresAt(Integer expiresAt) { + public TeamInviteResponse expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -224,7 +230,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java index b509eb0b9..4e1eb25a0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java @@ -40,13 +40,15 @@ TeamInvitesResponse.JSON_PROPERTY_TEAM_INVITES, TeamInvitesResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamInvitesResponse { public static final String JSON_PROPERTY_TEAM_INVITES = "team_invites"; + @jakarta.annotation.Nonnull private List teamInvites = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TeamInvitesResponse() { @@ -67,7 +69,7 @@ static public TeamInvitesResponse init(HashMap data) throws Exception { ); } - public TeamInvitesResponse teamInvites(List teamInvites) { + public TeamInvitesResponse teamInvites(@jakarta.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; return this; } @@ -95,12 +97,12 @@ public List getTeamInvites() { @JsonProperty(JSON_PROPERTY_TEAM_INVITES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamInvites(List teamInvites) { + public void setTeamInvites(@jakarta.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; } - public TeamInvitesResponse warnings(List warnings) { + public TeamInvitesResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -128,7 +130,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java index 888e9a858..b454ffb67 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java @@ -37,16 +37,19 @@ TeamMemberResponse.JSON_PROPERTY_EMAIL_ADDRESS, TeamMemberResponse.JSON_PROPERTY_ROLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamMemberResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_ROLE = "role"; + @jakarta.annotation.Nullable private String role; public TeamMemberResponse() { @@ -67,7 +70,7 @@ static public TeamMemberResponse init(HashMap data) throws Exception { ); } - public TeamMemberResponse accountId(String accountId) { + public TeamMemberResponse accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -87,12 +90,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamMemberResponse emailAddress(String emailAddress) { + public TeamMemberResponse emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -112,12 +115,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamMemberResponse role(String role) { + public TeamMemberResponse role(@jakarta.annotation.Nullable String role) { this.role = role; return this; } @@ -137,7 +140,7 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@jakarta.annotation.Nullable String role) { this.role = role; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java index 05fb9e496..181e65e4e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java @@ -42,16 +42,19 @@ TeamMembersResponse.JSON_PROPERTY_LIST_INFO, TeamMembersResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamMembersResponse { public static final String JSON_PROPERTY_TEAM_MEMBERS = "team_members"; + @jakarta.annotation.Nonnull private List teamMembers = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TeamMembersResponse() { @@ -72,7 +75,7 @@ static public TeamMembersResponse init(HashMap data) throws Exception { ); } - public TeamMembersResponse teamMembers(List teamMembers) { + public TeamMembersResponse teamMembers(@jakarta.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; return this; } @@ -100,12 +103,12 @@ public List getTeamMembers() { @JsonProperty(JSON_PROPERTY_TEAM_MEMBERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamMembers(List teamMembers) { + public void setTeamMembers(@jakarta.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; } - public TeamMembersResponse listInfo(ListInfoResponse listInfo) { + public TeamMembersResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamMembersResponse warnings(List warnings) { + public TeamMembersResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamParentResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamParentResponse.java index 482b58513..5928538d6 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamParentResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamParentResponse.java @@ -36,13 +36,15 @@ TeamParentResponse.JSON_PROPERTY_TEAM_ID, TeamParentResponse.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamParentResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + @jakarta.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public TeamParentResponse() { @@ -63,7 +65,7 @@ static public TeamParentResponse init(HashMap data) throws Exception { ); } - public TeamParentResponse teamId(String teamId) { + public TeamParentResponse teamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -83,12 +85,12 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@jakarta.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamParentResponse name(String name) { + public TeamParentResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -108,7 +110,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java index 9303f6861..f48daa1a0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java @@ -39,32 +39,36 @@ TeamRemoveMemberRequest.JSON_PROPERTY_NEW_TEAM_ID, TeamRemoveMemberRequest.JSON_PROPERTY_NEW_ROLE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamRemoveMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS = "new_owner_email_address"; + @jakarta.annotation.Nullable private String newOwnerEmailAddress; public static final String JSON_PROPERTY_NEW_TEAM_ID = "new_team_id"; + @jakarta.annotation.Nullable private String newTeamId; /** * A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided. */ public enum NewRoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -94,6 +98,7 @@ public static NewRoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_NEW_ROLE = "new_role"; + @jakarta.annotation.Nullable private NewRoleEnum newRole; public TeamRemoveMemberRequest() { @@ -114,7 +119,7 @@ static public TeamRemoveMemberRequest init(HashMap data) throws Exception { ); } - public TeamRemoveMemberRequest accountId(String accountId) { + public TeamRemoveMemberRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -134,12 +139,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamRemoveMemberRequest emailAddress(String emailAddress) { + public TeamRemoveMemberRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -159,12 +164,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamRemoveMemberRequest newOwnerEmailAddress(String newOwnerEmailAddress) { + public TeamRemoveMemberRequest newOwnerEmailAddress(@jakarta.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; return this; } @@ -184,12 +189,12 @@ public String getNewOwnerEmailAddress() { @JsonProperty(JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewOwnerEmailAddress(String newOwnerEmailAddress) { + public void setNewOwnerEmailAddress(@jakarta.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; } - public TeamRemoveMemberRequest newTeamId(String newTeamId) { + public TeamRemoveMemberRequest newTeamId(@jakarta.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; return this; } @@ -209,12 +214,12 @@ public String getNewTeamId() { @JsonProperty(JSON_PROPERTY_NEW_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewTeamId(String newTeamId) { + public void setNewTeamId(@jakarta.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; } - public TeamRemoveMemberRequest newRole(NewRoleEnum newRole) { + public TeamRemoveMemberRequest newRole(@jakarta.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; return this; } @@ -234,7 +239,7 @@ public NewRoleEnum getNewRole() { @JsonProperty(JSON_PROPERTY_NEW_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewRole(NewRoleEnum newRole) { + public void setNewRole(@jakarta.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java index 39a93c476..37128c92a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -41,19 +41,23 @@ TeamResponse.JSON_PROPERTY_INVITED_ACCOUNTS, TeamResponse.JSON_PROPERTY_INVITED_EMAILS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamResponse { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + @jakarta.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; + @jakarta.annotation.Nullable private List invitedAccounts = null; public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; + @jakarta.annotation.Nullable private List invitedEmails = null; public TeamResponse() { @@ -74,7 +78,7 @@ static public TeamResponse init(HashMap data) throws Exception { ); } - public TeamResponse name(String name) { + public TeamResponse name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -94,12 +98,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TeamResponse accounts(List accounts) { + public TeamResponse accounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -127,12 +131,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; } - public TeamResponse invitedAccounts(List invitedAccounts) { + public TeamResponse invitedAccounts(@jakarta.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; return this; } @@ -160,12 +164,12 @@ public List getInvitedAccounts() { @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedAccounts(List invitedAccounts) { + public void setInvitedAccounts(@jakarta.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; } - public TeamResponse invitedEmails(List invitedEmails) { + public TeamResponse invitedEmails(@jakarta.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; return this; } @@ -193,7 +197,7 @@ public List getInvitedEmails() { @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedEmails(List invitedEmails) { + public void setInvitedEmails(@jakarta.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java index b8c7190e2..1330e7c61 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java @@ -42,16 +42,19 @@ TeamSubTeamsResponse.JSON_PROPERTY_LIST_INFO, TeamSubTeamsResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamSubTeamsResponse { public static final String JSON_PROPERTY_SUB_TEAMS = "sub_teams"; + @jakarta.annotation.Nonnull private List subTeams = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TeamSubTeamsResponse() { @@ -72,7 +75,7 @@ static public TeamSubTeamsResponse init(HashMap data) throws Exception { ); } - public TeamSubTeamsResponse subTeams(List subTeams) { + public TeamSubTeamsResponse subTeams(@jakarta.annotation.Nonnull List subTeams) { this.subTeams = subTeams; return this; } @@ -100,12 +103,12 @@ public List getSubTeams() { @JsonProperty(JSON_PROPERTY_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSubTeams(List subTeams) { + public void setSubTeams(@jakarta.annotation.Nonnull List subTeams) { this.subTeams = subTeams; } - public TeamSubTeamsResponse listInfo(ListInfoResponse listInfo) { + public TeamSubTeamsResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamSubTeamsResponse warnings(List warnings) { + public TeamSubTeamsResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java index aa668a228..100923cd5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ TeamUpdateRequest.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TeamUpdateRequest { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public TeamUpdateRequest() { @@ -59,7 +60,7 @@ static public TeamUpdateRequest init(HashMap data) throws Exception { ); } - public TeamUpdateRequest name(String name) { + public TeamUpdateRequest name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -79,7 +80,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java index dc2bf3ae0..71356ac3d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java @@ -37,16 +37,19 @@ TemplateAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS, TemplateAddUserRequest.JSON_PROPERTY_SKIP_NOTIFICATION }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateAddUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_SKIP_NOTIFICATION = "skip_notification"; + @jakarta.annotation.Nullable private Boolean skipNotification = false; public TemplateAddUserRequest() { @@ -67,7 +70,7 @@ static public TemplateAddUserRequest init(HashMap data) throws Exception { ); } - public TemplateAddUserRequest accountId(String accountId) { + public TemplateAddUserRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -87,12 +90,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateAddUserRequest emailAddress(String emailAddress) { + public TemplateAddUserRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -112,12 +115,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateAddUserRequest skipNotification(Boolean skipNotification) { + public TemplateAddUserRequest skipNotification(@jakarta.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; return this; } @@ -137,7 +140,7 @@ public Boolean getSkipNotification() { @JsonProperty(JSON_PROPERTY_SKIP_NOTIFICATION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipNotification(Boolean skipNotification) { + public void setSkipNotification(@jakarta.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java index 8c6b2babe..d7786dade 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java @@ -72,82 +72,107 @@ TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_TITLE, TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateEmbeddedDraftRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; + @jakarta.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; + @jakarta.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; + @jakarta.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; + @jakarta.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; + @jakarta.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; + @jakarta.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; + @jakarta.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; + @jakarta.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; + @jakarta.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; + @jakarta.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateEmbeddedDraftRequest() { @@ -168,7 +193,7 @@ static public TemplateCreateEmbeddedDraftRequest init(HashMap data) throws Excep ); } - public TemplateCreateEmbeddedDraftRequest clientId(String clientId) { + public TemplateCreateEmbeddedDraftRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -188,12 +213,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public TemplateCreateEmbeddedDraftRequest files(List files) { + public TemplateCreateEmbeddedDraftRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -221,12 +246,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public TemplateCreateEmbeddedDraftRequest fileUrls(List fileUrls) { + public TemplateCreateEmbeddedDraftRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -254,12 +279,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateEmbeddedDraftRequest allowCcs(Boolean allowCcs) { + public TemplateCreateEmbeddedDraftRequest allowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -279,12 +304,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public TemplateCreateEmbeddedDraftRequest allowReassign(Boolean allowReassign) { + public TemplateCreateEmbeddedDraftRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -304,12 +329,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateEmbeddedDraftRequest attachments(List attachments) { + public TemplateCreateEmbeddedDraftRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -337,12 +362,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateEmbeddedDraftRequest ccRoles(List ccRoles) { + public TemplateCreateEmbeddedDraftRequest ccRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -370,12 +395,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateEmbeddedDraftRequest editorOptions(SubEditorOptions editorOptions) { + public TemplateCreateEmbeddedDraftRequest editorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -395,12 +420,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public TemplateCreateEmbeddedDraftRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateEmbeddedDraftRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -420,12 +445,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateEmbeddedDraftRequest forceSignerRoles(Boolean forceSignerRoles) { + public TemplateCreateEmbeddedDraftRequest forceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -445,12 +470,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public TemplateCreateEmbeddedDraftRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public TemplateCreateEmbeddedDraftRequest forceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -470,12 +495,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public TemplateCreateEmbeddedDraftRequest formFieldGroups(List formFieldGroups) { + public TemplateCreateEmbeddedDraftRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -503,12 +528,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public TemplateCreateEmbeddedDraftRequest formFieldRules(List formFieldRules) { + public TemplateCreateEmbeddedDraftRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -536,12 +561,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public TemplateCreateEmbeddedDraftRequest formFieldsPerDocument(List formFieldsPerDocument) { + public TemplateCreateEmbeddedDraftRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -569,12 +594,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateEmbeddedDraftRequest mergeFields(List mergeFields) { + public TemplateCreateEmbeddedDraftRequest mergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -602,12 +627,12 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateEmbeddedDraftRequest message(String message) { + public TemplateCreateEmbeddedDraftRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -627,12 +652,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public TemplateCreateEmbeddedDraftRequest metadata(Map metadata) { + public TemplateCreateEmbeddedDraftRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -660,12 +685,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateEmbeddedDraftRequest showPreview(Boolean showPreview) { + public TemplateCreateEmbeddedDraftRequest showPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -685,12 +710,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public TemplateCreateEmbeddedDraftRequest showProgressStepper(Boolean showProgressStepper) { + public TemplateCreateEmbeddedDraftRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -710,12 +735,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public TemplateCreateEmbeddedDraftRequest signerRoles(List signerRoles) { + public TemplateCreateEmbeddedDraftRequest signerRoles(@jakarta.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -743,12 +768,12 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@jakarta.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateEmbeddedDraftRequest skipMeNow(Boolean skipMeNow) { + public TemplateCreateEmbeddedDraftRequest skipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -768,12 +793,12 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public TemplateCreateEmbeddedDraftRequest subject(String subject) { + public TemplateCreateEmbeddedDraftRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -793,12 +818,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateEmbeddedDraftRequest testMode(Boolean testMode) { + public TemplateCreateEmbeddedDraftRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -818,12 +843,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateEmbeddedDraftRequest title(String title) { + public TemplateCreateEmbeddedDraftRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -843,12 +868,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public TemplateCreateEmbeddedDraftRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateEmbeddedDraftRequest usePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -868,7 +893,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java index e3e730062..3a1c18ad4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java @@ -40,13 +40,15 @@ TemplateCreateEmbeddedDraftResponse.JSON_PROPERTY_TEMPLATE, TemplateCreateEmbeddedDraftResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateEmbeddedDraftResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; + @jakarta.annotation.Nonnull private TemplateCreateEmbeddedDraftResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponse() { @@ -67,7 +69,7 @@ static public TemplateCreateEmbeddedDraftResponse init(HashMap data) throws Exce ); } - public TemplateCreateEmbeddedDraftResponse template(TemplateCreateEmbeddedDraftResponseTemplate template) { + public TemplateCreateEmbeddedDraftResponse template(@jakarta.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; return this; } @@ -87,12 +89,12 @@ public TemplateCreateEmbeddedDraftResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateEmbeddedDraftResponseTemplate template) { + public void setTemplate(@jakarta.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; } - public TemplateCreateEmbeddedDraftResponse warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java index f9c0286ac..d40592de4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java @@ -41,20 +41,24 @@ TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_EXPIRES_AT, TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateEmbeddedDraftResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @jakarta.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; + @jakarta.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_WARNINGS = "warnings"; @Deprecated + @jakarta.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponseTemplate() { @@ -75,7 +79,7 @@ static public TemplateCreateEmbeddedDraftResponseTemplate init(HashMap data) thr ); } - public TemplateCreateEmbeddedDraftResponseTemplate templateId(String templateId) { + public TemplateCreateEmbeddedDraftResponseTemplate templateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -95,12 +99,12 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateCreateEmbeddedDraftResponseTemplate editUrl(String editUrl) { + public TemplateCreateEmbeddedDraftResponseTemplate editUrl(@jakarta.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -120,12 +124,12 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@jakarta.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public TemplateCreateEmbeddedDraftResponseTemplate expiresAt(Integer expiresAt) { + public TemplateCreateEmbeddedDraftResponseTemplate expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -145,13 +149,13 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } @Deprecated - public TemplateCreateEmbeddedDraftResponseTemplate warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponseTemplate warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -182,7 +186,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java index b1ff55f4a..2a353e0ec 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java @@ -64,61 +64,79 @@ TemplateCreateRequest.JSON_PROPERTY_TITLE, TemplateCreateRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateRequest { public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nonnull private List formFieldsPerDocument = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; + @jakarta.annotation.Nonnull private List signerRoles = new ArrayList<>(); public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; + @jakarta.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; + @jakarta.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; + @jakarta.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateRequest() { @@ -139,7 +157,7 @@ static public TemplateCreateRequest init(HashMap data) throws Exception { ); } - public TemplateCreateRequest formFieldsPerDocument(List formFieldsPerDocument) { + public TemplateCreateRequest formFieldsPerDocument(@jakarta.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -167,12 +185,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateRequest signerRoles(List signerRoles) { + public TemplateCreateRequest signerRoles(@jakarta.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -200,12 +218,12 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@jakarta.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateRequest files(List files) { + public TemplateCreateRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -233,12 +251,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public TemplateCreateRequest fileUrls(List fileUrls) { + public TemplateCreateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -266,12 +284,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateRequest allowReassign(Boolean allowReassign) { + public TemplateCreateRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -291,12 +309,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateRequest attachments(List attachments) { + public TemplateCreateRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -324,12 +342,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateRequest ccRoles(List ccRoles) { + public TemplateCreateRequest ccRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -357,12 +375,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateRequest clientId(String clientId) { + public TemplateCreateRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -382,12 +400,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -407,12 +425,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateRequest formFieldGroups(List formFieldGroups) { + public TemplateCreateRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -440,12 +458,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public TemplateCreateRequest formFieldRules(List formFieldRules) { + public TemplateCreateRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -473,12 +491,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public TemplateCreateRequest mergeFields(List mergeFields) { + public TemplateCreateRequest mergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -506,12 +524,12 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@jakarta.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateRequest message(String message) { + public TemplateCreateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -531,12 +549,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public TemplateCreateRequest metadata(Map metadata) { + public TemplateCreateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -564,12 +582,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateRequest subject(String subject) { + public TemplateCreateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -589,12 +607,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateRequest testMode(Boolean testMode) { + public TemplateCreateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -614,12 +632,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateRequest title(String title) { + public TemplateCreateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -639,12 +657,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public TemplateCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateRequest usePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -664,7 +682,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java index 5d7d2c2cf..03910025a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java @@ -40,13 +40,15 @@ TemplateCreateResponse.JSON_PROPERTY_TEMPLATE, TemplateCreateResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; + @jakarta.annotation.Nonnull private TemplateCreateResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TemplateCreateResponse() { @@ -67,7 +69,7 @@ static public TemplateCreateResponse init(HashMap data) throws Exception { ); } - public TemplateCreateResponse template(TemplateCreateResponseTemplate template) { + public TemplateCreateResponse template(@jakarta.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; return this; } @@ -87,12 +89,12 @@ public TemplateCreateResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateResponseTemplate template) { + public void setTemplate(@jakarta.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; } - public TemplateCreateResponse warnings(List warnings) { + public TemplateCreateResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java index 6d668fd69..2222fc73e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ TemplateCreateResponseTemplate.JSON_PROPERTY_TEMPLATE_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateCreateResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @jakarta.annotation.Nullable private String templateId; public TemplateCreateResponseTemplate() { @@ -59,7 +60,7 @@ static public TemplateCreateResponseTemplate init(HashMap data) throws Exception ); } - public TemplateCreateResponseTemplate templateId(String templateId) { + public TemplateCreateResponseTemplate templateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -79,7 +80,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java index f660ab209..866a87fa3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ TemplateEditResponse.JSON_PROPERTY_TEMPLATE_ID }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateEditResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @jakarta.annotation.Nonnull private String templateId; public TemplateEditResponse() { @@ -59,7 +60,7 @@ static public TemplateEditResponse init(HashMap data) throws Exception { ); } - public TemplateEditResponse templateId(String templateId) { + public TemplateEditResponse templateId(@jakarta.annotation.Nonnull String templateId) { this.templateId = templateId; return this; } @@ -79,7 +80,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateId(String templateId) { + public void setTemplateId(@jakarta.annotation.Nonnull String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java index 30a55e879..248ae9fae 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java @@ -40,13 +40,15 @@ TemplateGetResponse.JSON_PROPERTY_TEMPLATE, TemplateGetResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateGetResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; + @jakarta.annotation.Nonnull private TemplateResponse template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TemplateGetResponse() { @@ -67,7 +69,7 @@ static public TemplateGetResponse init(HashMap data) throws Exception { ); } - public TemplateGetResponse template(TemplateResponse template) { + public TemplateGetResponse template(@jakarta.annotation.Nonnull TemplateResponse template) { this.template = template; return this; } @@ -87,12 +89,12 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@jakarta.annotation.Nonnull TemplateResponse template) { this.template = template; } - public TemplateGetResponse warnings(List warnings) { + public TemplateGetResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateListResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateListResponse.java index d3949c6aa..4569dbaf2 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateListResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateListResponse.java @@ -42,16 +42,19 @@ TemplateListResponse.JSON_PROPERTY_LIST_INFO, TemplateListResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateListResponse { public static final String JSON_PROPERTY_TEMPLATES = "templates"; + @jakarta.annotation.Nonnull private List templates = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + @jakarta.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public TemplateListResponse() { @@ -72,7 +75,7 @@ static public TemplateListResponse init(HashMap data) throws Exception { ); } - public TemplateListResponse templates(List templates) { + public TemplateListResponse templates(@jakarta.annotation.Nonnull List templates) { this.templates = templates; return this; } @@ -100,12 +103,12 @@ public List getTemplates() { @JsonProperty(JSON_PROPERTY_TEMPLATES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplates(List templates) { + public void setTemplates(@jakarta.annotation.Nonnull List templates) { this.templates = templates; } - public TemplateListResponse listInfo(ListInfoResponse listInfo) { + public TemplateListResponse listInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -125,12 +128,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@jakarta.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TemplateListResponse warnings(List warnings) { + public TemplateListResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -158,7 +161,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java index 0d9c88e63..bce53ad8e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java @@ -36,13 +36,15 @@ TemplateRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, TemplateRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateRemoveUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public TemplateRemoveUserRequest() { @@ -63,7 +65,7 @@ static public TemplateRemoveUserRequest init(HashMap data) throws Exception { ); } - public TemplateRemoveUserRequest accountId(String accountId) { + public TemplateRemoveUserRequest accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -83,12 +85,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateRemoveUserRequest emailAddress(String emailAddress) { + public TemplateRemoveUserRequest emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -108,7 +110,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponse.java index f031a0363..1796c999a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponse.java @@ -61,57 +61,73 @@ TemplateResponse.JSON_PROPERTY_ACCOUNTS, TemplateResponse.JSON_PROPERTY_ATTACHMENTS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @jakarta.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + @jakarta.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_IS_EMBEDDED = "is_embedded"; + @jakarta.annotation.Nullable private Boolean isEmbedded; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; + @jakarta.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CAN_EDIT = "can_edit"; + @jakarta.annotation.Nullable private Boolean canEdit; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; + @jakarta.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; + @jakarta.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; + @jakarta.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_DOCUMENTS = "documents"; + @jakarta.annotation.Nullable private List documents = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; @Deprecated + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_NAMED_FORM_FIELDS = "named_form_fields"; @Deprecated + @jakarta.annotation.Nullable private List namedFormFields = null; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + @jakarta.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public TemplateResponse() { @@ -132,7 +148,7 @@ static public TemplateResponse init(HashMap data) throws Exception { ); } - public TemplateResponse templateId(String templateId) { + public TemplateResponse templateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -152,12 +168,12 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateResponse title(String title) { + public TemplateResponse title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -177,12 +193,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public TemplateResponse message(String message) { + public TemplateResponse message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -202,12 +218,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public TemplateResponse updatedAt(Integer updatedAt) { + public TemplateResponse updatedAt(@jakarta.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -227,12 +243,12 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@jakarta.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public TemplateResponse isEmbedded(Boolean isEmbedded) { + public TemplateResponse isEmbedded(@jakarta.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; return this; } @@ -252,12 +268,12 @@ public Boolean getIsEmbedded() { @JsonProperty(JSON_PROPERTY_IS_EMBEDDED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEmbedded(Boolean isEmbedded) { + public void setIsEmbedded(@jakarta.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; } - public TemplateResponse isCreator(Boolean isCreator) { + public TemplateResponse isCreator(@jakarta.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -277,12 +293,12 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@jakarta.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public TemplateResponse canEdit(Boolean canEdit) { + public TemplateResponse canEdit(@jakarta.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; return this; } @@ -302,12 +318,12 @@ public Boolean getCanEdit() { @JsonProperty(JSON_PROPERTY_CAN_EDIT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanEdit(Boolean canEdit) { + public void setCanEdit(@jakarta.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; } - public TemplateResponse isLocked(Boolean isLocked) { + public TemplateResponse isLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -327,12 +343,12 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponse metadata(Map metadata) { + public TemplateResponse metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -360,12 +376,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateResponse signerRoles(List signerRoles) { + public TemplateResponse signerRoles(@jakarta.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -393,12 +409,12 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@jakarta.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateResponse ccRoles(List ccRoles) { + public TemplateResponse ccRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -426,12 +442,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@jakarta.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateResponse documents(List documents) { + public TemplateResponse documents(@jakarta.annotation.Nullable List documents) { this.documents = documents; return this; } @@ -459,13 +475,13 @@ public List getDocuments() { @JsonProperty(JSON_PROPERTY_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocuments(List documents) { + public void setDocuments(@jakarta.annotation.Nullable List documents) { this.documents = documents; } @Deprecated - public TemplateResponse customFields(List customFields) { + public TemplateResponse customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -496,13 +512,13 @@ public List getCustomFields() { @Deprecated @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } @Deprecated - public TemplateResponse namedFormFields(List namedFormFields) { + public TemplateResponse namedFormFields(@jakarta.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; return this; } @@ -533,12 +549,12 @@ public List getNamedFormFields() { @Deprecated @JsonProperty(JSON_PROPERTY_NAMED_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamedFormFields(List namedFormFields) { + public void setNamedFormFields(@jakarta.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; } - public TemplateResponse accounts(List accounts) { + public TemplateResponse accounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -566,12 +582,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@jakarta.annotation.Nullable List accounts) { this.accounts = accounts; } - public TemplateResponse attachments(List attachments) { + public TemplateResponse attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -599,7 +615,7 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java index 53f50dd8a..0e9d517f0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java @@ -41,25 +41,31 @@ TemplateResponseAccount.JSON_PROPERTY_IS_PAID_HF, TemplateResponseAccount.JSON_PROPERTY_QUOTAS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + @jakarta.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; + @jakarta.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; + @jakarta.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; + @jakarta.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; + @jakarta.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; + @jakarta.annotation.Nullable private TemplateResponseAccountQuota quotas; public TemplateResponseAccount() { @@ -80,7 +86,7 @@ static public TemplateResponseAccount init(HashMap data) throws Exception { ); } - public TemplateResponseAccount accountId(String accountId) { + public TemplateResponseAccount accountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -100,12 +106,12 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@jakarta.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateResponseAccount emailAddress(String emailAddress) { + public TemplateResponseAccount emailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -125,12 +131,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@jakarta.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateResponseAccount isLocked(Boolean isLocked) { + public TemplateResponseAccount isLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -150,12 +156,12 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@jakarta.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponseAccount isPaidHs(Boolean isPaidHs) { + public TemplateResponseAccount isPaidHs(@jakarta.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -175,12 +181,12 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@jakarta.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public TemplateResponseAccount isPaidHf(Boolean isPaidHf) { + public TemplateResponseAccount isPaidHf(@jakarta.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -200,12 +206,12 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@jakarta.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public TemplateResponseAccount quotas(TemplateResponseAccountQuota quotas) { + public TemplateResponseAccount quotas(@jakarta.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; return this; } @@ -225,7 +231,7 @@ public TemplateResponseAccountQuota getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(TemplateResponseAccountQuota quotas) { + public void setQuotas(@jakarta.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java index 78b1f583d..8c0615b74 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java @@ -38,19 +38,23 @@ TemplateResponseAccountQuota.JSON_PROPERTY_DOCUMENTS_LEFT, TemplateResponseAccountQuota.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseAccountQuota { public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; + @jakarta.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; + @jakarta.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; + @jakarta.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; + @jakarta.annotation.Nullable private Integer smsVerificationsLeft; public TemplateResponseAccountQuota() { @@ -71,7 +75,7 @@ static public TemplateResponseAccountQuota init(HashMap data) throws Exception { ); } - public TemplateResponseAccountQuota templatesLeft(Integer templatesLeft) { + public TemplateResponseAccountQuota templatesLeft(@jakarta.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -91,12 +95,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@jakarta.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public TemplateResponseAccountQuota apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public TemplateResponseAccountQuota apiSignatureRequestsLeft(@jakarta.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -116,12 +120,12 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft(@jakarta.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public TemplateResponseAccountQuota documentsLeft(Integer documentsLeft) { + public TemplateResponseAccountQuota documentsLeft(@jakarta.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -141,12 +145,12 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@jakarta.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public TemplateResponseAccountQuota smsVerificationsLeft(Integer smsVerificationsLeft) { + public TemplateResponseAccountQuota smsVerificationsLeft(@jakarta.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -166,7 +170,7 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@jakarta.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java index 4ed3eb946..9c25e5292 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java @@ -35,10 +35,11 @@ @JsonPropertyOrder({ TemplateResponseCCRole.JSON_PROPERTY_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseCCRole { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public TemplateResponseCCRole() { @@ -59,7 +60,7 @@ static public TemplateResponseCCRole init(HashMap data) throws Exception { ); } - public TemplateResponseCCRole name(String name) { + public TemplateResponseCCRole name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -79,7 +80,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java index 040c68ccc..2ea3ac11b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java @@ -46,25 +46,31 @@ TemplateResponseDocument.JSON_PROPERTY_CUSTOM_FIELDS, TemplateResponseDocument.JSON_PROPERTY_STATIC_FIELDS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseDocument { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_INDEX = "index"; + @jakarta.annotation.Nullable private Integer index; public static final String JSON_PROPERTY_FIELD_GROUPS = "field_groups"; + @jakarta.annotation.Nullable private List fieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; + @jakarta.annotation.Nullable private List formFields = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_STATIC_FIELDS = "static_fields"; + @jakarta.annotation.Nullable private List staticFields = null; public TemplateResponseDocument() { @@ -85,7 +91,7 @@ static public TemplateResponseDocument init(HashMap data) throws Exception { ); } - public TemplateResponseDocument name(String name) { + public TemplateResponseDocument name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -105,12 +111,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocument index(Integer index) { + public TemplateResponseDocument index(@jakarta.annotation.Nullable Integer index) { this.index = index; return this; } @@ -130,12 +136,12 @@ public Integer getIndex() { @JsonProperty(JSON_PROPERTY_INDEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndex(Integer index) { + public void setIndex(@jakarta.annotation.Nullable Integer index) { this.index = index; } - public TemplateResponseDocument fieldGroups(List fieldGroups) { + public TemplateResponseDocument fieldGroups(@jakarta.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; return this; } @@ -163,12 +169,12 @@ public List getFieldGroups() { @JsonProperty(JSON_PROPERTY_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldGroups(List fieldGroups) { + public void setFieldGroups(@jakarta.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; } - public TemplateResponseDocument formFields(List formFields) { + public TemplateResponseDocument formFields(@jakarta.annotation.Nullable List formFields) { this.formFields = formFields; return this; } @@ -196,12 +202,12 @@ public List getFormFields() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFields(List formFields) { + public void setFormFields(@jakarta.annotation.Nullable List formFields) { this.formFields = formFields; } - public TemplateResponseDocument customFields(List customFields) { + public TemplateResponseDocument customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -229,12 +235,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public TemplateResponseDocument staticFields(List staticFields) { + public TemplateResponseDocument staticFields(@jakarta.annotation.Nullable List staticFields) { this.staticFields = staticFields; return this; } @@ -262,7 +268,7 @@ public List getStaticFields() { @JsonProperty(JSON_PROPERTY_STATIC_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStaticFields(List staticFields) { + public void setStaticFields(@jakarta.annotation.Nullable List staticFields) { this.staticFields = staticFields; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java index 4797afd91..80e1e9c3f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java @@ -47,7 +47,7 @@ TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_REQUIRED, TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -60,33 +60,43 @@ public class TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; + @jakarta.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; + @jakarta.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; + @jakarta.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; + @jakarta.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; + @jakarta.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentCustomFieldBase() { @@ -107,7 +117,7 @@ static public TemplateResponseDocumentCustomFieldBase init(HashMap data) throws ); } - public TemplateResponseDocumentCustomFieldBase type(String type) { + public TemplateResponseDocumentCustomFieldBase type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -127,12 +137,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentCustomFieldBase apiId(String apiId) { + public TemplateResponseDocumentCustomFieldBase apiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -152,12 +162,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentCustomFieldBase name(String name) { + public TemplateResponseDocumentCustomFieldBase name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -177,12 +187,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentCustomFieldBase signer(String signer) { + public TemplateResponseDocumentCustomFieldBase signer(@jakarta.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -206,7 +216,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@jakarta.annotation.Nullable String signer) { this.signer = signer; } @@ -215,7 +225,7 @@ public void setSigner(Integer signer) { } - public TemplateResponseDocumentCustomFieldBase x(Integer x) { + public TemplateResponseDocumentCustomFieldBase x(@jakarta.annotation.Nullable Integer x) { this.x = x; return this; } @@ -235,12 +245,12 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@jakarta.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentCustomFieldBase y(Integer y) { + public TemplateResponseDocumentCustomFieldBase y(@jakarta.annotation.Nullable Integer y) { this.y = y; return this; } @@ -260,12 +270,12 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@jakarta.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentCustomFieldBase width(Integer width) { + public TemplateResponseDocumentCustomFieldBase width(@jakarta.annotation.Nullable Integer width) { this.width = width; return this; } @@ -285,12 +295,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@jakarta.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentCustomFieldBase height(Integer height) { + public TemplateResponseDocumentCustomFieldBase height(@jakarta.annotation.Nullable Integer height) { this.height = height; return this; } @@ -310,12 +320,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@jakarta.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentCustomFieldBase required(Boolean required) { + public TemplateResponseDocumentCustomFieldBase required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -335,12 +345,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentCustomFieldBase group(String group) { + public TemplateResponseDocumentCustomFieldBase group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -360,7 +370,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java index 353dd6ac0..40a4564a3 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentCustomFieldCheckbox.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentCustomFieldCheckbox() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentCustomFieldCheckbox init(HashMap data) thr ); } - public TemplateResponseDocumentCustomFieldCheckbox type(String type) { + public TemplateResponseDocumentCustomFieldCheckbox type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java index e9c2932d6..e5666932b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java @@ -44,7 +44,7 @@ TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_FONT_FAMILY }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -53,18 +53,23 @@ public class TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; + @jakarta.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; + @jakarta.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; + @jakarta.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; + @jakarta.annotation.Nullable private String fontFamily; public TemplateResponseDocumentCustomFieldText() { @@ -85,7 +90,7 @@ static public TemplateResponseDocumentCustomFieldText init(HashMap data) throws ); } - public TemplateResponseDocumentCustomFieldText type(String type) { + public TemplateResponseDocumentCustomFieldText type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -105,12 +110,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentCustomFieldText avgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public TemplateResponseDocumentCustomFieldText avgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -130,12 +135,12 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentCustomFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentCustomFieldText isMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -155,12 +160,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentCustomFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentCustomFieldText originalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -180,12 +185,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentCustomFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentCustomFieldText fontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -205,7 +210,7 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java index 3e724af45..bffee5bb0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java @@ -37,13 +37,15 @@ TemplateResponseDocumentFieldGroup.JSON_PROPERTY_NAME, TemplateResponseDocumentFieldGroup.JSON_PROPERTY_RULE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseDocumentFieldGroup { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_RULE = "rule"; + @jakarta.annotation.Nullable private TemplateResponseDocumentFieldGroupRule rule; public TemplateResponseDocumentFieldGroup() { @@ -64,7 +66,7 @@ static public TemplateResponseDocumentFieldGroup init(HashMap data) throws Excep ); } - public TemplateResponseDocumentFieldGroup name(String name) { + public TemplateResponseDocumentFieldGroup name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -84,12 +86,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFieldGroup rule(TemplateResponseDocumentFieldGroupRule rule) { + public TemplateResponseDocumentFieldGroup rule(@jakarta.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; return this; } @@ -109,7 +111,7 @@ public TemplateResponseDocumentFieldGroupRule getRule() { @JsonProperty(JSON_PROPERTY_RULE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRule(TemplateResponseDocumentFieldGroupRule rule) { + public void setRule(@jakarta.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java index 65aa63b0f..8842e29df 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java @@ -36,13 +36,15 @@ TemplateResponseDocumentFieldGroupRule.JSON_PROPERTY_REQUIREMENT, TemplateResponseDocumentFieldGroupRule.JSON_PROPERTY_GROUP_LABEL }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseDocumentFieldGroupRule { public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; + @jakarta.annotation.Nullable private String requirement; public static final String JSON_PROPERTY_GROUP_LABEL = "groupLabel"; + @jakarta.annotation.Nullable private String groupLabel; public TemplateResponseDocumentFieldGroupRule() { @@ -63,7 +65,7 @@ static public TemplateResponseDocumentFieldGroupRule init(HashMap data) throws E ); } - public TemplateResponseDocumentFieldGroupRule requirement(String requirement) { + public TemplateResponseDocumentFieldGroupRule requirement(@jakarta.annotation.Nullable String requirement) { this.requirement = requirement; return this; } @@ -83,12 +85,12 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequirement(String requirement) { + public void setRequirement(@jakarta.annotation.Nullable String requirement) { this.requirement = requirement; } - public TemplateResponseDocumentFieldGroupRule groupLabel(String groupLabel) { + public TemplateResponseDocumentFieldGroupRule groupLabel(@jakarta.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -108,7 +110,7 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@jakarta.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java index 25ee2dc73..6256087c4 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java @@ -46,7 +46,7 @@ TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_HEIGHT, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -65,30 +65,39 @@ public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; + @jakarta.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; + @jakarta.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; + @jakarta.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; + @jakarta.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; + @jakarta.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required; public TemplateResponseDocumentFormFieldBase() { @@ -109,7 +118,7 @@ static public TemplateResponseDocumentFormFieldBase init(HashMap data) throws Ex ); } - public TemplateResponseDocumentFormFieldBase type(String type) { + public TemplateResponseDocumentFormFieldBase type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -129,12 +138,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldBase apiId(String apiId) { + public TemplateResponseDocumentFormFieldBase apiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -154,12 +163,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentFormFieldBase name(String name) { + public TemplateResponseDocumentFormFieldBase name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -179,12 +188,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFormFieldBase signer(String signer) { + public TemplateResponseDocumentFormFieldBase signer(@jakarta.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -208,7 +217,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@jakarta.annotation.Nullable String signer) { this.signer = signer; } @@ -217,7 +226,7 @@ public void setSigner(Integer signer) { } - public TemplateResponseDocumentFormFieldBase x(Integer x) { + public TemplateResponseDocumentFormFieldBase x(@jakarta.annotation.Nullable Integer x) { this.x = x; return this; } @@ -237,12 +246,12 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@jakarta.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentFormFieldBase y(Integer y) { + public TemplateResponseDocumentFormFieldBase y(@jakarta.annotation.Nullable Integer y) { this.y = y; return this; } @@ -262,12 +271,12 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@jakarta.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentFormFieldBase width(Integer width) { + public TemplateResponseDocumentFormFieldBase width(@jakarta.annotation.Nullable Integer width) { this.width = width; return this; } @@ -287,12 +296,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@jakarta.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentFormFieldBase height(Integer height) { + public TemplateResponseDocumentFormFieldBase height(@jakarta.annotation.Nullable Integer height) { this.height = height; return this; } @@ -312,12 +321,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@jakarta.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentFormFieldBase required(Boolean required) { + public TemplateResponseDocumentFormFieldBase required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -337,7 +346,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java index 110468a28..81b0ce164 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldCheckbox() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldCheckbox init(HashMap data) throw ); } - public TemplateResponseDocumentFormFieldCheckbox type(String type) { + public TemplateResponseDocumentFormFieldCheckbox type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldCheckbox group(String group) { + public TemplateResponseDocumentFormFieldCheckbox group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java index 67ec89a5c..b59e545df 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "date_signed"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDateSigned() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldDateSigned init(HashMap data) thr ); } - public TemplateResponseDocumentFormFieldDateSigned type(String type) { + public TemplateResponseDocumentFormFieldDateSigned type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDateSigned group(String group) { + public TemplateResponseDocumentFormFieldDateSigned group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 8003f4c05..951081dcf 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDropdown() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldDropdown init(HashMap data) throw ); } - public TemplateResponseDocumentFormFieldDropdown type(String type) { + public TemplateResponseDocumentFormFieldDropdown type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDropdown group(String group) { + public TemplateResponseDocumentFormFieldDropdown group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java index 6ce907e55..5a917fa31 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java @@ -45,7 +45,7 @@ TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -54,21 +54,27 @@ public class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; + @jakarta.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; + @jakarta.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; + @jakarta.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; + @jakarta.annotation.Nullable private String fontFamily; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldHyperlink() { @@ -89,7 +95,7 @@ static public TemplateResponseDocumentFormFieldHyperlink init(HashMap data) thro ); } - public TemplateResponseDocumentFormFieldHyperlink type(String type) { + public TemplateResponseDocumentFormFieldHyperlink type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -109,12 +115,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldHyperlink avgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public TemplateResponseDocumentFormFieldHyperlink avgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -134,12 +140,12 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldHyperlink isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldHyperlink isMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -159,12 +165,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldHyperlink originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldHyperlink originalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -184,12 +190,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldHyperlink fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldHyperlink fontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -209,12 +215,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldHyperlink group(String group) { + public TemplateResponseDocumentFormFieldHyperlink group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -234,7 +240,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java index 7aa96f533..336e01632 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "initials"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldInitials() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldInitials init(HashMap data) throw ); } - public TemplateResponseDocumentFormFieldInitials type(String type) { + public TemplateResponseDocumentFormFieldInitials type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldInitials group(String group) { + public TemplateResponseDocumentFormFieldInitials group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java index 5e9365793..7a41f8e9c 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nonnull private String group; public TemplateResponseDocumentFormFieldRadio() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldRadio init(HashMap data) throws E ); } - public TemplateResponseDocumentFormFieldRadio type(String type) { + public TemplateResponseDocumentFormFieldRadio type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldRadio group(String group) { + public TemplateResponseDocumentFormFieldRadio group(@jakarta.annotation.Nonnull String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nonnull String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java index ac0a0c321..17b167c7b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java @@ -40,7 +40,7 @@ TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE, TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -49,9 +49,11 @@ public class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "signature"; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldSignature() { @@ -72,7 +74,7 @@ static public TemplateResponseDocumentFormFieldSignature init(HashMap data) thro ); } - public TemplateResponseDocumentFormFieldSignature type(String type) { + public TemplateResponseDocumentFormFieldSignature type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,12 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldSignature group(String group) { + public TemplateResponseDocumentFormFieldSignature group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java index db5fce4c8..7bbb7ca05 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java @@ -46,7 +46,7 @@ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -55,43 +55,48 @@ public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; + @jakarta.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; + @jakarta.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; + @jakarta.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; + @jakarta.annotation.Nullable private String fontFamily; /** * 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. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -121,9 +126,11 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; + @jakarta.annotation.Nullable private ValidationTypeEnum validationType; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldText() { @@ -144,7 +151,7 @@ static public TemplateResponseDocumentFormFieldText init(HashMap data) throws Ex ); } - public TemplateResponseDocumentFormFieldText type(String type) { + public TemplateResponseDocumentFormFieldText type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -164,12 +171,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldText avgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public TemplateResponseDocumentFormFieldText avgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -189,12 +196,12 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength(@jakarta.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldText isMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -214,12 +221,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@jakarta.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldText originalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -239,12 +246,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@jakarta.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldText fontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -264,12 +271,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@jakarta.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldText validationType(ValidationTypeEnum validationType) { + public TemplateResponseDocumentFormFieldText validationType(@jakarta.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -289,12 +296,12 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@jakarta.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public TemplateResponseDocumentFormFieldText group(String group) { + public TemplateResponseDocumentFormFieldText group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -314,7 +321,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java index 4e1e98229..06bb9773f 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java @@ -47,7 +47,7 @@ TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_REQUIRED, TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_GROUP }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -66,33 +66,43 @@ public class TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; + @jakarta.annotation.Nullable private String signer = "me_now"; public static final String JSON_PROPERTY_X = "x"; + @jakarta.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; + @jakarta.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; + @jakarta.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; + @jakarta.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; + @jakarta.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; + @jakarta.annotation.Nullable private String group; public TemplateResponseDocumentStaticFieldBase() { @@ -113,7 +123,7 @@ static public TemplateResponseDocumentStaticFieldBase init(HashMap data) throws ); } - public TemplateResponseDocumentStaticFieldBase type(String type) { + public TemplateResponseDocumentStaticFieldBase type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -133,12 +143,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentStaticFieldBase apiId(String apiId) { + public TemplateResponseDocumentStaticFieldBase apiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -158,12 +168,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@jakarta.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentStaticFieldBase name(String name) { + public TemplateResponseDocumentStaticFieldBase name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -183,12 +193,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentStaticFieldBase signer(String signer) { + public TemplateResponseDocumentStaticFieldBase signer(@jakarta.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -208,12 +218,12 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@jakarta.annotation.Nullable String signer) { this.signer = signer; } - public TemplateResponseDocumentStaticFieldBase x(Integer x) { + public TemplateResponseDocumentStaticFieldBase x(@jakarta.annotation.Nullable Integer x) { this.x = x; return this; } @@ -233,12 +243,12 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@jakarta.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentStaticFieldBase y(Integer y) { + public TemplateResponseDocumentStaticFieldBase y(@jakarta.annotation.Nullable Integer y) { this.y = y; return this; } @@ -258,12 +268,12 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@jakarta.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentStaticFieldBase width(Integer width) { + public TemplateResponseDocumentStaticFieldBase width(@jakarta.annotation.Nullable Integer width) { this.width = width; return this; } @@ -283,12 +293,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@jakarta.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentStaticFieldBase height(Integer height) { + public TemplateResponseDocumentStaticFieldBase height(@jakarta.annotation.Nullable Integer height) { this.height = height; return this; } @@ -308,12 +318,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@jakarta.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentStaticFieldBase required(Boolean required) { + public TemplateResponseDocumentStaticFieldBase required(@jakarta.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -333,12 +343,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@jakarta.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentStaticFieldBase group(String group) { + public TemplateResponseDocumentStaticFieldBase group(@jakarta.annotation.Nullable String group) { this.group = group; return this; } @@ -358,7 +368,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@jakarta.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java index d23f85310..81c46c3c0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldCheckbox.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentStaticFieldCheckbox() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldCheckbox init(HashMap data) thr ); } - public TemplateResponseDocumentStaticFieldCheckbox type(String type) { + public TemplateResponseDocumentStaticFieldCheckbox type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java index 8a19f3c5b..7afedcd0a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldDateSigned.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "date_signed"; public TemplateResponseDocumentStaticFieldDateSigned() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldDateSigned init(HashMap data) t ); } - public TemplateResponseDocumentStaticFieldDateSigned type(String type) { + public TemplateResponseDocumentStaticFieldDateSigned type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java index 171417e43..41e424629 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldDropdown.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "dropdown"; public TemplateResponseDocumentStaticFieldDropdown() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldDropdown init(HashMap data) thr ); } - public TemplateResponseDocumentStaticFieldDropdown type(String type) { + public TemplateResponseDocumentStaticFieldDropdown type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java index 925996dee..bea9d8426 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldHyperlink.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "hyperlink"; public TemplateResponseDocumentStaticFieldHyperlink() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldHyperlink init(HashMap data) th ); } - public TemplateResponseDocumentStaticFieldHyperlink type(String type) { + public TemplateResponseDocumentStaticFieldHyperlink type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java index 15e4b07aa..1ec5db416 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldInitials.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "initials"; public TemplateResponseDocumentStaticFieldInitials() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldInitials init(HashMap data) thr ); } - public TemplateResponseDocumentStaticFieldInitials type(String type) { + public TemplateResponseDocumentStaticFieldInitials type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java index 73f1fd8a4..b1401f4ca 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldRadio.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "radio"; public TemplateResponseDocumentStaticFieldRadio() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldRadio init(HashMap data) throws ); } - public TemplateResponseDocumentStaticFieldRadio type(String type) { + public TemplateResponseDocumentStaticFieldRadio type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java index 6e472ecf9..f72de56c5 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldSignature.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "signature"; public TemplateResponseDocumentStaticFieldSignature() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldSignature init(HashMap data) th ); } - public TemplateResponseDocumentStaticFieldSignature type(String type) { + public TemplateResponseDocumentStaticFieldSignature type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java index 877819958..4d313af54 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java @@ -39,7 +39,7 @@ @JsonPropertyOrder({ TemplateResponseDocumentStaticFieldText.JSON_PROPERTY_TYPE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true @@ -48,6 +48,7 @@ public class TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private String type = "text"; public TemplateResponseDocumentStaticFieldText() { @@ -68,7 +69,7 @@ static public TemplateResponseDocumentStaticFieldText init(HashMap data) throws ); } - public TemplateResponseDocumentStaticFieldText type(String type) { + public TemplateResponseDocumentStaticFieldText type(@jakarta.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@jakarta.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java index 38f5acd25..e87ce403d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java @@ -36,13 +36,15 @@ TemplateResponseFieldAvgTextLength.JSON_PROPERTY_NUM_LINES, TemplateResponseFieldAvgTextLength.JSON_PROPERTY_NUM_CHARS_PER_LINE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseFieldAvgTextLength { public static final String JSON_PROPERTY_NUM_LINES = "num_lines"; + @jakarta.annotation.Nullable private Integer numLines; public static final String JSON_PROPERTY_NUM_CHARS_PER_LINE = "num_chars_per_line"; + @jakarta.annotation.Nullable private Integer numCharsPerLine; public TemplateResponseFieldAvgTextLength() { @@ -63,7 +65,7 @@ static public TemplateResponseFieldAvgTextLength init(HashMap data) throws Excep ); } - public TemplateResponseFieldAvgTextLength numLines(Integer numLines) { + public TemplateResponseFieldAvgTextLength numLines(@jakarta.annotation.Nullable Integer numLines) { this.numLines = numLines; return this; } @@ -83,12 +85,12 @@ public Integer getNumLines() { @JsonProperty(JSON_PROPERTY_NUM_LINES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumLines(Integer numLines) { + public void setNumLines(@jakarta.annotation.Nullable Integer numLines) { this.numLines = numLines; } - public TemplateResponseFieldAvgTextLength numCharsPerLine(Integer numCharsPerLine) { + public TemplateResponseFieldAvgTextLength numCharsPerLine(@jakarta.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; return this; } @@ -108,7 +110,7 @@ public Integer getNumCharsPerLine() { @JsonProperty(JSON_PROPERTY_NUM_CHARS_PER_LINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumCharsPerLine(Integer numCharsPerLine) { + public void setNumCharsPerLine(@jakarta.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java index 45d786a89..6e5e2127b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java @@ -36,13 +36,15 @@ TemplateResponseSignerRole.JSON_PROPERTY_NAME, TemplateResponseSignerRole.JSON_PROPERTY_ORDER }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateResponseSignerRole { public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; + @jakarta.annotation.Nullable private Integer order; public TemplateResponseSignerRole() { @@ -63,7 +65,7 @@ static public TemplateResponseSignerRole init(HashMap data) throws Exception { ); } - public TemplateResponseSignerRole name(String name) { + public TemplateResponseSignerRole name(@jakarta.annotation.Nullable String name) { this.name = name; return this; } @@ -83,12 +85,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@jakarta.annotation.Nullable String name) { this.name = name; } - public TemplateResponseSignerRole order(Integer order) { + public TemplateResponseSignerRole order(@jakarta.annotation.Nullable Integer order) { this.order = order; return this; } @@ -108,7 +110,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@jakarta.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java index 432b36800..8e7f33fbf 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java @@ -43,25 +43,31 @@ TemplateUpdateFilesRequest.JSON_PROPERTY_SUBJECT, TemplateUpdateFilesRequest.JSON_PROPERTY_TEST_MODE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateUpdateFilesRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public TemplateUpdateFilesRequest() { @@ -82,7 +88,7 @@ static public TemplateUpdateFilesRequest init(HashMap data) throws Exception { ); } - public TemplateUpdateFilesRequest clientId(String clientId) { + public TemplateUpdateFilesRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -102,12 +108,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateUpdateFilesRequest files(List files) { + public TemplateUpdateFilesRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -135,12 +141,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public TemplateUpdateFilesRequest fileUrls(List fileUrls) { + public TemplateUpdateFilesRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -168,12 +174,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateUpdateFilesRequest message(String message) { + public TemplateUpdateFilesRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -193,12 +199,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public TemplateUpdateFilesRequest subject(String subject) { + public TemplateUpdateFilesRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -218,12 +224,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public TemplateUpdateFilesRequest testMode(Boolean testMode) { + public TemplateUpdateFilesRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -243,7 +249,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java index 862c43122..2cddd3e0b 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java @@ -36,10 +36,11 @@ @JsonPropertyOrder({ TemplateUpdateFilesResponse.JSON_PROPERTY_TEMPLATE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateUpdateFilesResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; + @jakarta.annotation.Nonnull private TemplateUpdateFilesResponseTemplate template; public TemplateUpdateFilesResponse() { @@ -60,7 +61,7 @@ static public TemplateUpdateFilesResponse init(HashMap data) throws Exception { ); } - public TemplateUpdateFilesResponse template(TemplateUpdateFilesResponseTemplate template) { + public TemplateUpdateFilesResponse template(@jakarta.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; return this; } @@ -80,7 +81,7 @@ public TemplateUpdateFilesResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateUpdateFilesResponseTemplate template) { + public void setTemplate(@jakarta.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java index 19dea91bd..3dc17d816 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java @@ -39,14 +39,16 @@ TemplateUpdateFilesResponseTemplate.JSON_PROPERTY_TEMPLATE_ID, TemplateUpdateFilesResponseTemplate.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class TemplateUpdateFilesResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; + @jakarta.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_WARNINGS = "warnings"; @Deprecated + @jakarta.annotation.Nullable private List warnings = null; public TemplateUpdateFilesResponseTemplate() { @@ -67,7 +69,7 @@ static public TemplateUpdateFilesResponseTemplate init(HashMap data) throws Exce ); } - public TemplateUpdateFilesResponseTemplate templateId(String templateId) { + public TemplateUpdateFilesResponseTemplate templateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -87,13 +89,13 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@jakarta.annotation.Nullable String templateId) { this.templateId = templateId; } @Deprecated - public TemplateUpdateFilesResponseTemplate warnings(List warnings) { + public TemplateUpdateFilesResponseTemplate warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -124,7 +126,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java index 5dd37a36f..0c762b684 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java @@ -84,109 +84,140 @@ UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; + @jakarta.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; + @jakarta.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; + @jakarta.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_PAGE = "force_signer_page"; + @jakarta.annotation.Nullable private Boolean forceSignerPage = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; + @jakarta.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; + @jakarta.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; + @jakarta.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; + @jakarta.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; + @jakarta.annotation.Nullable private Boolean showPreview; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; + @jakarta.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; /** * The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -216,18 +247,23 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; + @jakarta.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateEmbeddedRequest() { @@ -248,7 +284,7 @@ static public UnclaimedDraftCreateEmbeddedRequest init(HashMap data) throws Exce ); } - public UnclaimedDraftCreateEmbeddedRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -268,12 +304,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress(@jakarta.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -293,12 +329,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@jakarta.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedRequest files(List files) { + public UnclaimedDraftCreateEmbeddedRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -326,12 +362,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -359,12 +395,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateEmbeddedRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedRequest allowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -384,12 +420,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public UnclaimedDraftCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -409,12 +445,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -434,12 +470,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedRequest attachments(List attachments) { + public UnclaimedDraftCreateEmbeddedRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -467,12 +503,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -500,12 +536,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateEmbeddedRequest customFields(List customFields) { + public UnclaimedDraftCreateEmbeddedRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -533,12 +569,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateEmbeddedRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftCreateEmbeddedRequest editorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -558,12 +594,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateEmbeddedRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -583,12 +619,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedRequest forceSignerPage(Boolean forceSignerPage) { + public UnclaimedDraftCreateEmbeddedRequest forceSignerPage(@jakarta.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; return this; } @@ -608,12 +644,12 @@ public Boolean getForceSignerPage() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerPage(Boolean forceSignerPage) { + public void setForceSignerPage(@jakarta.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; } - public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -633,12 +669,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public UnclaimedDraftCreateEmbeddedRequest formFieldGroups(List formFieldGroups) { + public UnclaimedDraftCreateEmbeddedRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -666,12 +702,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public UnclaimedDraftCreateEmbeddedRequest formFieldRules(List formFieldRules) { + public UnclaimedDraftCreateEmbeddedRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -699,12 +735,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public UnclaimedDraftCreateEmbeddedRequest formFieldsPerDocument(List formFieldsPerDocument) { + public UnclaimedDraftCreateEmbeddedRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -732,12 +768,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateEmbeddedRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -757,12 +793,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateEmbeddedRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedRequest holdRequest(@jakarta.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -782,12 +818,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@jakarta.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } - public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -807,12 +843,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedRequest message(String message) { + public UnclaimedDraftCreateEmbeddedRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -832,12 +868,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -865,12 +901,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -890,12 +926,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedRequest showPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -915,12 +951,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public UnclaimedDraftCreateEmbeddedRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateEmbeddedRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -940,12 +976,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateEmbeddedRequest signers(List signers) { + public UnclaimedDraftCreateEmbeddedRequest signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -973,12 +1009,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateEmbeddedRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -998,12 +1034,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -1023,12 +1059,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedRequest skipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -1048,12 +1084,12 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -1073,12 +1109,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -1098,12 +1134,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedRequest type(TypeEnum type) { + public UnclaimedDraftCreateEmbeddedRequest type(@jakarta.annotation.Nullable TypeEnum type) { this.type = type; return this; } @@ -1123,12 +1159,12 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { + public void setType(@jakarta.annotation.Nullable TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -1148,12 +1184,12 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateEmbeddedRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -1173,12 +1209,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public UnclaimedDraftCreateEmbeddedRequest populateAutoFillFields(Boolean populateAutoFillFields) { + public UnclaimedDraftCreateEmbeddedRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -1198,12 +1234,12 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateEmbeddedRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -1223,7 +1259,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java index 7af776e67..3e598be92 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java @@ -75,97 +75,127 @@ UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_CCS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; + @jakarta.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; + @jakarta.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; + @jakarta.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_CCS = "ccs"; + @jakarta.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; + @jakarta.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; + @jakarta.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; + @jakarta.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; + @jakarta.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; + @jakarta.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; + @jakarta.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; + @jakarta.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; + @jakarta.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; + @jakarta.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; + @jakarta.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; + @jakarta.annotation.Nullable private Boolean allowCcs = false; public UnclaimedDraftCreateEmbeddedWithTemplateRequest() { @@ -186,7 +216,7 @@ static public UnclaimedDraftCreateEmbeddedWithTemplateRequest init(HashMap data) ); } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -206,12 +236,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest requesterEmailAddress(@jakarta.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -231,12 +261,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@jakarta.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -264,12 +294,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@jakarta.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -289,12 +319,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -314,12 +344,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@jakarta.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -347,12 +377,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@jakarta.annotation.Nullable List ccs) { this.ccs = ccs; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest customFields(List customFields) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -380,12 +410,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest editorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -405,12 +435,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -430,12 +460,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest files(List files) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -463,12 +493,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -496,12 +526,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSignerRoles(Boolean forceSignerRoles) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -521,12 +551,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@jakarta.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -546,12 +576,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@jakarta.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest(@jakarta.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -571,12 +601,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@jakarta.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest isForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -596,12 +626,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest message(String message) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -621,12 +651,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -654,12 +684,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly(Boolean previewOnly) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly(@jakarta.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -679,12 +709,12 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@jakarta.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest requestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -704,12 +734,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -729,12 +759,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@jakarta.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -754,12 +784,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signers(List signers) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -787,12 +817,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -812,12 +842,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -837,12 +867,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -862,12 +892,12 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@jakarta.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -887,12 +917,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -912,12 +942,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest title(String title) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest title(@jakarta.annotation.Nullable String title) { this.title = title; return this; } @@ -937,12 +967,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@jakarta.annotation.Nullable String title) { this.title = title; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest populateAutoFillFields(Boolean populateAutoFillFields) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest populateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -962,12 +992,12 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields(@jakarta.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -987,7 +1017,7 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@jakarta.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java index 9df838f68..58a73751a 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java @@ -71,16 +71,16 @@ UnclaimedDraftCreateRequest.JSON_PROPERTY_USE_TEXT_TAGS, UnclaimedDraftCreateRequest.JSON_PROPERTY_EXPIRES_AT }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftCreateRequest { /** * The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -110,75 +110,99 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FILES = "files"; + @jakarta.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + @jakarta.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; + @jakarta.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + @jakarta.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; + @jakarta.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; + @jakarta.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; + @jakarta.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; + @jakarta.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; + @jakarta.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + @jakarta.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; + @jakarta.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; + @jakarta.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; + @jakarta.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; + @jakarta.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; + @jakarta.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; + @jakarta.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; + @jakarta.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateRequest() { @@ -199,7 +223,7 @@ static public UnclaimedDraftCreateRequest init(HashMap data) throws Exception { ); } - public UnclaimedDraftCreateRequest type(TypeEnum type) { + public UnclaimedDraftCreateRequest type(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -219,12 +243,12 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateRequest files(List files) { + public UnclaimedDraftCreateRequest files(@jakarta.annotation.Nullable List files) { this.files = files; return this; } @@ -252,12 +276,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@jakarta.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateRequest fileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -285,12 +309,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@jakarta.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateRequest allowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -310,12 +334,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@jakarta.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateRequest attachments(List attachments) { + public UnclaimedDraftCreateRequest attachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -343,12 +367,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@jakarta.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateRequest ccEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -376,12 +400,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@jakarta.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateRequest clientId(String clientId) { + public UnclaimedDraftCreateRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -401,12 +425,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateRequest customFields(List customFields) { + public UnclaimedDraftCreateRequest customFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -434,12 +458,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateRequest fieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -459,12 +483,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@jakarta.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateRequest formFieldGroups(List formFieldGroups) { + public UnclaimedDraftCreateRequest formFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -492,12 +516,12 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups(@jakarta.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public UnclaimedDraftCreateRequest formFieldRules(List formFieldRules) { + public UnclaimedDraftCreateRequest formFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -525,12 +549,12 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules(@jakarta.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public UnclaimedDraftCreateRequest formFieldsPerDocument(List formFieldsPerDocument) { + public UnclaimedDraftCreateRequest formFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -558,12 +582,12 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument(@jakarta.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateRequest hideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -583,12 +607,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@jakarta.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateRequest message(String message) { + public UnclaimedDraftCreateRequest message(@jakarta.annotation.Nullable String message) { this.message = message; return this; } @@ -608,12 +632,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@jakarta.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateRequest metadata(Map metadata) { + public UnclaimedDraftCreateRequest metadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -641,12 +665,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@jakarta.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -666,12 +690,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateRequest signers(List signers) { + public UnclaimedDraftCreateRequest signers(@jakarta.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -699,12 +723,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@jakarta.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateRequest signingOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -724,12 +748,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@jakarta.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -749,12 +773,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateRequest subject(String subject) { + public UnclaimedDraftCreateRequest subject(@jakarta.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -774,12 +798,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@jakarta.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -799,12 +823,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateRequest usePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -824,12 +848,12 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@jakarta.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateRequest useTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -849,12 +873,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@jakarta.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public UnclaimedDraftCreateRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateRequest expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -874,7 +898,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java index b0477d0bc..48eabe481 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java @@ -40,13 +40,15 @@ UnclaimedDraftCreateResponse.JSON_PROPERTY_UNCLAIMED_DRAFT, UnclaimedDraftCreateResponse.JSON_PROPERTY_WARNINGS }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftCreateResponse { public static final String JSON_PROPERTY_UNCLAIMED_DRAFT = "unclaimed_draft"; + @jakarta.annotation.Nonnull private UnclaimedDraftResponse unclaimedDraft; public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @jakarta.annotation.Nullable private List warnings = null; public UnclaimedDraftCreateResponse() { @@ -67,7 +69,7 @@ static public UnclaimedDraftCreateResponse init(HashMap data) throws Exception { ); } - public UnclaimedDraftCreateResponse unclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public UnclaimedDraftCreateResponse unclaimedDraft(@jakarta.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; return this; } @@ -87,12 +89,12 @@ public UnclaimedDraftResponse getUnclaimedDraft() { @JsonProperty(JSON_PROPERTY_UNCLAIMED_DRAFT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUnclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public void setUnclaimedDraft(@jakarta.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; } - public UnclaimedDraftCreateResponse warnings(List warnings) { + public UnclaimedDraftCreateResponse warnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -120,7 +122,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@jakarta.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java index 5e4c63956..62459fde0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java @@ -43,31 +43,39 @@ UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_TEST_MODE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftEditAndResendRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + @jakarta.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; + @jakarta.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; + @jakarta.annotation.Nullable private Boolean isForEmbeddedSigning; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; + @jakarta.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; + @jakarta.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; + @jakarta.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode = false; public UnclaimedDraftEditAndResendRequest() { @@ -88,7 +96,7 @@ static public UnclaimedDraftEditAndResendRequest init(HashMap data) throws Excep ); } - public UnclaimedDraftEditAndResendRequest clientId(String clientId) { + public UnclaimedDraftEditAndResendRequest clientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -108,12 +116,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@jakarta.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftEditAndResendRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftEditAndResendRequest editorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -133,12 +141,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@jakarta.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -158,12 +166,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@jakarta.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftEditAndResendRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftEditAndResendRequest requesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -183,12 +191,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@jakarta.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftEditAndResendRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest requestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -208,12 +216,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftEditAndResendRequest showProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -233,12 +241,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@jakarta.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftEditAndResendRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -258,12 +266,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest testMode(Boolean testMode) { + public UnclaimedDraftEditAndResendRequest testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -283,7 +291,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java index a7212a2f2..b5152809e 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java @@ -40,25 +40,31 @@ UnclaimedDraftResponse.JSON_PROPERTY_EXPIRES_AT, UnclaimedDraftResponse.JSON_PROPERTY_TEST_MODE }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class UnclaimedDraftResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; + @jakarta.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_CLAIM_URL = "claim_url"; + @jakarta.annotation.Nullable private String claimUrl; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; + @jakarta.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; + @jakarta.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + @jakarta.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + @jakarta.annotation.Nullable private Boolean testMode; public UnclaimedDraftResponse() { @@ -79,7 +85,7 @@ static public UnclaimedDraftResponse init(HashMap data) throws Exception { ); } - public UnclaimedDraftResponse signatureRequestId(String signatureRequestId) { + public UnclaimedDraftResponse signatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -99,12 +105,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@jakarta.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public UnclaimedDraftResponse claimUrl(String claimUrl) { + public UnclaimedDraftResponse claimUrl(@jakarta.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; return this; } @@ -124,12 +130,12 @@ public String getClaimUrl() { @JsonProperty(JSON_PROPERTY_CLAIM_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClaimUrl(String claimUrl) { + public void setClaimUrl(@jakarta.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; } - public UnclaimedDraftResponse signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftResponse signingRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -149,12 +155,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@jakarta.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftResponse requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftResponse requestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -174,12 +180,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@jakarta.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftResponse expiresAt(Integer expiresAt) { + public UnclaimedDraftResponse expiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -199,12 +205,12 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@jakarta.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public UnclaimedDraftResponse testMode(Boolean testMode) { + public UnclaimedDraftResponse testMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -224,7 +230,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@jakarta.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/WarningResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/WarningResponse.java index 8be1d986d..d8e314cb0 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/WarningResponse.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/WarningResponse.java @@ -36,13 +36,15 @@ WarningResponse.JSON_PROPERTY_WARNING_MSG, WarningResponse.JSON_PROPERTY_WARNING_NAME }) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) public class WarningResponse { public static final String JSON_PROPERTY_WARNING_MSG = "warning_msg"; + @jakarta.annotation.Nonnull private String warningMsg; public static final String JSON_PROPERTY_WARNING_NAME = "warning_name"; + @jakarta.annotation.Nonnull private String warningName; public WarningResponse() { @@ -63,7 +65,7 @@ static public WarningResponse init(HashMap data) throws Exception { ); } - public WarningResponse warningMsg(String warningMsg) { + public WarningResponse warningMsg(@jakarta.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; return this; } @@ -83,12 +85,12 @@ public String getWarningMsg() { @JsonProperty(JSON_PROPERTY_WARNING_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningMsg(String warningMsg) { + public void setWarningMsg(@jakarta.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; } - public WarningResponse warningName(String warningName) { + public WarningResponse warningName(@jakarta.annotation.Nonnull String warningName) { this.warningName = warningName; return this; } @@ -108,7 +110,7 @@ public String getWarningName() { @JsonProperty(JSON_PROPERTY_WARNING_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningName(String warningName) { + public void setWarningName(@jakarta.annotation.Nonnull String warningName) { this.warningName = warningName; } diff --git a/sdks/java-v2/templates/BeanValidationException.mustache b/sdks/java-v2/templates/BeanValidationException.mustache index d8b0fa695..d551902f8 100644 --- a/sdks/java-v2/templates/BeanValidationException.mustache +++ b/sdks/java-v2/templates/BeanValidationException.mustache @@ -4,8 +4,8 @@ package {{invokerPackage}}; import java.util.Set; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ValidationException; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.ValidationException; public class BeanValidationException extends ValidationException { /** diff --git a/sdks/java-v2/templates/Configuration.mustache b/sdks/java-v2/templates/Configuration.mustache index 8e9720e36..61b08ab67 100644 --- a/sdks/java-v2/templates/Configuration.mustache +++ b/sdks/java-v2/templates/Configuration.mustache @@ -6,7 +6,7 @@ package {{invokerPackage}}; public class Configuration { public static final String VERSION = "{{{artifactVersion}}}"; - private static ApiClient defaultApiClient = new ApiClient(); + private static volatile ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API diff --git a/sdks/java-v2/templates/JSON.mustache b/sdks/java-v2/templates/JSON.mustache index 1d0a81387..5ef02660d 100644 --- a/sdks/java-v2/templates/JSON.mustache +++ b/sdks/java-v2/templates/JSON.mustache @@ -31,9 +31,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v2/templates/build.gradle.mustache b/sdks/java-v2/templates/build.gradle.mustache index 06f9bd5e9..6557a7c70 100644 --- a/sdks/java-v2/templates/build.gradle.mustache +++ b/sdks/java-v2/templates/build.gradle.mustache @@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') { task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + archiveClassifier = 'sources' } artifacts { @@ -97,12 +97,12 @@ if(hasProperty('target') && target == 'android') { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -126,6 +126,9 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -148,6 +151,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "junit:junit:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v2/templates/javaBuilder.mustache b/sdks/java-v2/templates/javaBuilder.mustache index c02730081..4a0e102b8 100644 --- a/sdks/java-v2/templates/javaBuilder.mustache +++ b/sdks/java-v2/templates/javaBuilder.mustache @@ -14,9 +14,9 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par } {{#vars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.instance.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} this.instance.{{name}} = {{name}}; @@ -24,7 +24,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } @@ -32,12 +32,12 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par {{/vars}} {{#parentVars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { // inherited: {{isInherited}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}} super.{{name}}({{name}}); return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } diff --git a/sdks/java-v2/templates/libraries/apache-httpclient/ApiClient.mustache b/sdks/java-v2/templates/libraries/apache-httpclient/ApiClient.mustache index a00c6dc45..854d8a6cd 100644 --- a/sdks/java-v2/templates/libraries/apache-httpclient/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/apache-httpclient/ApiClient.mustache @@ -137,7 +137,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient(CloseableHttpClient httpClient) { objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); @@ -444,7 +444,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } @@ -622,7 +622,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions diff --git a/sdks/java-v2/templates/libraries/apache-httpclient/api.mustache b/sdks/java-v2/templates/libraries/apache-httpclient/api.mustache index 27b456417..cfcd9f04c 100644 --- a/sdks/java-v2/templates/libraries/apache-httpclient/api.mustache +++ b/sdks/java-v2/templates/libraries/apache-httpclient/api.mustache @@ -24,8 +24,8 @@ import java.util.Map; import java.util.StringJoiner; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} @@ -99,7 +99,7 @@ public class {{classname}} extends BaseApi { {{/required}}{{/allParams}} // create path and map variables String localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString(apiClient.parameterToString({{{paramName}}}))){{/pathParams}}; StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; diff --git a/sdks/java-v2/templates/libraries/apache-httpclient/api_test.mustache b/sdks/java-v2/templates/libraries/apache-httpclient/api_test.mustache index b4393ea82..05b2bf9fd 100644 --- a/sdks/java-v2/templates/libraries/apache-httpclient/api_test.mustache +++ b/sdks/java-v2/templates/libraries/apache-httpclient/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/apache-httpclient/pom.mustache b/sdks/java-v2/templates/libraries/apache-httpclient/pom.mustache index 74a70a3ea..3a506ca3f 100644 --- a/sdks/java-v2/templates/libraries/apache-httpclient/pom.mustache +++ b/sdks/java-v2/templates/libraries/apache-httpclient/pom.mustache @@ -358,13 +358,12 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.2 diff --git a/sdks/java-v2/templates/libraries/feign/ApiClient.mustache b/sdks/java-v2/templates/libraries/feign/ApiClient.mustache index 9a5b9bcd0..f744eec13 100644 --- a/sdks/java-v2/templates/libraries/feign/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/feign/ApiClient.mustache @@ -173,7 +173,12 @@ public class ApiClient { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#failOnUnknownProperties}} + objectMapper.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.setDateFormat(new RFC3339DateFormat()); diff --git a/sdks/java-v2/templates/libraries/feign/README.mustache b/sdks/java-v2/templates/libraries/feign/README.mustache index fed3cbebd..c3d948749 100644 --- a/sdks/java-v2/templates/libraries/feign/README.mustache +++ b/sdks/java-v2/templates/libraries/feign/README.mustache @@ -32,7 +32,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -And to use the api you can follow the examples bellow: +And to use the api you can follow the examples below: ```java diff --git a/sdks/java-v2/templates/libraries/feign/api.mustache b/sdks/java-v2/templates/libraries/feign/api.mustache index af05d6595..d67de9a28 100644 --- a/sdks/java-v2/templates/libraries/feign/api.mustache +++ b/sdks/java-v2/templates/libraries/feign/api.mustache @@ -15,8 +15,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import feign.*; @@ -47,8 +47,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -77,8 +77,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -122,8 +122,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -162,8 +162,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ - {{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", - {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + {{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", + {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) diff --git a/sdks/java-v2/templates/libraries/feign/api_test.mustache b/sdks/java-v2/templates/libraries/feign/api_test.mustache index 1db841158..62521123f 100644 --- a/sdks/java-v2/templates/libraries/feign/api_test.mustache +++ b/sdks/java-v2/templates/libraries/feign/api_test.mustache @@ -14,8 +14,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/feign/build.gradle.mustache b/sdks/java-v2/templates/libraries/feign/build.gradle.mustache index 8af1cb136..2b4e0340e 100644 --- a/sdks/java-v2/templates/libraries/feign/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/feign/build.gradle.mustache @@ -114,6 +114,9 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -127,9 +130,9 @@ dependencies { implementation "io.github.openfeign:feign-okhttp:$feign_version" implementation "io.github.openfeign.form:feign-form:$feign_form_version" {{#jackson}} - {{#joda}} + {{#joda}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" - {{/joda}} + {{/joda}} implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" @@ -142,11 +145,14 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1" testImplementation "org.hamcrest:hamcrest:2.2" - testImplementation "commons-io:commons-io:2.8.0" + testImplementation "commons-io:commons-io:2.16.1" testImplementation "ch.qos.logback:logback-classic:1.2.3" } diff --git a/sdks/java-v2/templates/libraries/feign/build.sbt.mustache b/sdks/java-v2/templates/libraries/feign/build.sbt.mustache index 9af32c270..1a24b99f5 100644 --- a/sdks/java-v2/templates/libraries/feign/build.sbt.mustache +++ b/sdks/java-v2/templates/libraries/feign/build.sbt.mustache @@ -28,11 +28,14 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", "org.hamcrest" % "hamcrest" % "2.2" % "test", - "commons-io" % "commons-io" % "2.8.0" % "test", + "commons-io" % "commons-io" % "2.16.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/sdks/java-v2/templates/libraries/feign/model.mustache b/sdks/java-v2/templates/libraries/feign/model.mustache index 5fa9bca80..108748f60 100644 --- a/sdks/java-v2/templates/libraries/feign/model.mustache +++ b/sdks/java-v2/templates/libraries/feign/model.mustache @@ -59,8 +59,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v2/templates/libraries/feign/pojo.mustache b/sdks/java-v2/templates/libraries/feign/pojo.mustache index fe97e3b1b..76f119eb4 100644 --- a/sdks/java-v2/templates/libraries/feign/pojo.mustache +++ b/sdks/java-v2/templates/libraries/feign/pojo.mustache @@ -72,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -189,17 +190,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -246,7 +237,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -272,7 +263,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} @@ -288,7 +280,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -309,6 +301,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} sb.append("}"); return sb.toString(); } diff --git a/sdks/java-v2/templates/libraries/feign/pom.mustache b/sdks/java-v2/templates/libraries/feign/pom.mustache index 9be4a094f..c915ea0ec 100644 --- a/sdks/java-v2/templates/libraries/feign/pom.mustache +++ b/sdks/java-v2/templates/libraries/feign/pom.mustache @@ -345,6 +345,14 @@ provided {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -403,13 +411,15 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.0 1.0.0 8.3.3 diff --git a/sdks/java-v2/templates/libraries/google-api-client/ApiClient.mustache b/sdks/java-v2/templates/libraries/google-api-client/ApiClient.mustache index 03c44a8ed..7d3e50fe1 100644 --- a/sdks/java-v2/templates/libraries/google-api-client/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/google-api-client/ApiClient.mustache @@ -34,7 +34,12 @@ public class ApiClient { // A reasonable default object mapper. Client can pass in a chosen ObjectMapper anyway, this is just for reasonable defaults. private static ObjectMapper createDefaultObjectMapper() { ObjectMapper objectMapper = new ObjectMapper() + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .setDateFormat(new RFC3339DateFormat()); {{#joda}} diff --git a/sdks/java-v2/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v2/templates/libraries/jersey2/ApiClient.mustache index 09563afa7..218f5452c 100644 --- a/sdks/java-v2/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/ApiClient.mustache @@ -988,24 +988,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1034,6 +1020,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1340,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v2/templates/libraries/jersey2/JSON.mustache b/sdks/java-v2/templates/libraries/jersey2/JSON.mustache index 97cee6394..615367bb3 100644 --- a/sdks/java-v2/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,7 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v2/templates/libraries/jersey2/anyof_model.mustache b/sdks/java-v2/templates/libraries/jersey2/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v2/templates/libraries/jersey2/anyof_model.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v2/templates/libraries/jersey2/api.mustache b/sdks/java-v2/templates/libraries/jersey2/api.mustache index 8d3e62f27..62edfeb8e 100644 --- a/sdks/java-v2/templates/libraries/jersey2/api.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/api.mustache @@ -12,8 +12,8 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; @@ -67,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ {{#responses}} @@ -101,7 +102,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -195,7 +197,7 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); } @@ -232,7 +234,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -252,7 +255,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v2/templates/libraries/jersey2/api_test.mustache b/sdks/java-v2/templates/libraries/jersey2/api_test.mustache index 7b8214bd4..926ba0a82 100644 --- a/sdks/java-v2/templates/libraries/jersey2/api_test.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/jersey2/build.gradle.mustache b/sdks/java-v2/templates/libraries/jersey2/build.gradle.mustache index a9ab96231..ca6ae2abe 100644 --- a/sdks/java-v2/templates/libraries/jersey2/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" } diff --git a/sdks/java-v2/templates/libraries/jersey2/build.sbt.mustache b/sdks/java-v2/templates/libraries/jersey2/build.sbt.mustache index d055cf378..fa3ead60a 100644 --- a/sdks/java-v2/templates/libraries/jersey2/build.sbt.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v2/templates/libraries/jersey2/model.mustache b/sdks/java-v2/templates/libraries/jersey2/model.mustache index 1904ee40e..2758278ac 100644 --- a/sdks/java-v2/templates/libraries/jersey2/model.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/model.mustache @@ -42,8 +42,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v2/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v2/templates/libraries/jersey2/oneof_model.mustache index 09906d7b0..5b60d0743 100644 --- a/sdks/java-v2/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} - {{#isArray}} - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v2/templates/libraries/jersey2/pojo.mustache b/sdks/java-v2/templates/libraries/jersey2/pojo.mustache index 06be4ddf2..0d8bc23c6 100644 --- a/sdks/java-v2/templates/libraries/jersey2/pojo.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/pojo.mustache @@ -81,6 +81,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -197,17 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -257,7 +248,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v2/templates/libraries/jersey2/pom.mustache b/sdks/java-v2/templates/libraries/jersey2/pom.mustache index 214d3ce2b..1373579ca 100644 --- a/sdks/java-v2/templates/libraries/jersey2/pom.mustache +++ b/sdks/java-v2/templates/libraries/jersey2/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -401,13 +410,12 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -415,6 +423,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/sdks/java-v2/templates/libraries/jersey3/ApiClient.mustache b/sdks/java-v2/templates/libraries/jersey3/ApiClient.mustache index 344a2ec55..026a49416 100644 --- a/sdks/java-v2/templates/libraries/jersey3/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/ApiClient.mustache @@ -1002,24 +1002,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1048,6 +1034,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1377,7 +1393,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v2/templates/libraries/jersey3/JSON.mustache b/sdks/java-v2/templates/libraries/jersey3/JSON.mustache index e1f17c972..613a4a276 100644 --- a/sdks/java-v2/templates/libraries/jersey3/JSON.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,12 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) -{{^useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) -{{/useCustomTemplateCode}} + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v2/templates/libraries/jersey3/anyof_model.mustache b/sdks/java-v2/templates/libraries/jersey3/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v2/templates/libraries/jersey3/anyof_model.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v2/templates/libraries/jersey3/api.mustache b/sdks/java-v2/templates/libraries/jersey3/api.mustache index 3ce92f7f0..0c0e2c8da 100644 --- a/sdks/java-v2/templates/libraries/jersey3/api.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/api.mustache @@ -56,12 +56,7 @@ public class {{classname}} { {{#operation}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -72,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -101,12 +97,7 @@ public class {{classname}} { {{/useCustomTemplateCode}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -115,7 +106,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -226,7 +218,7 @@ public class {{classname}} { GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} {{^useCustomTemplateCode}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); {{/useCustomTemplateCode}} @@ -281,7 +273,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -301,7 +294,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -320,12 +314,7 @@ public class {{classname}} { } /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}}{{#pathParams}} * @param {{paramName}} {{description}} (required){{/pathParams}} * @return {{operationId}}Request diff --git a/sdks/java-v2/templates/libraries/jersey3/build.gradle.mustache b/sdks/java-v2/templates/libraries/jersey3/build.gradle.mustache index 6d9a171b9..e29892ff2 100644 --- a/sdks/java-v2/templates/libraries/jersey3/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/build.gradle.mustache @@ -229,6 +229,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} {{#useCustomTemplateCode}} mockito_version = "3.12.4" {{/useCustomTemplateCode}} @@ -262,6 +265,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v2/templates/libraries/jersey3/build.sbt.mustache b/sdks/java-v2/templates/libraries/jersey3/build.sbt.mustache index e4c37f99f..50d3b16d6 100644 --- a/sdks/java-v2/templates/libraries/jersey3/build.sbt.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/build.sbt.mustache @@ -36,6 +36,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v2/templates/libraries/jersey3/oneof_model.mustache b/sdks/java-v2/templates/libraries/jersey3/oneof_model.mustache index 09906d7b0..5b60d0743 100644 --- a/sdks/java-v2/templates/libraries/jersey3/oneof_model.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} - {{#isArray}} - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v2/templates/libraries/jersey3/pojo.mustache b/sdks/java-v2/templates/libraries/jersey3/pojo.mustache index 0ba5ad05a..a73f86943 100644 --- a/sdks/java-v2/templates/libraries/jersey3/pojo.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/pojo.mustache @@ -91,6 +91,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} + {{>nullable_var_annotations}} {{^useCustomTemplateCode}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} @@ -150,7 +151,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -242,17 +243,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -302,7 +293,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v2/templates/libraries/jersey3/pom.mustache b/sdks/java-v2/templates/libraries/jersey3/pom.mustache index e2bb17240..23e2b05b7 100644 --- a/sdks/java-v2/templates/libraries/jersey3/pom.mustache +++ b/sdks/java-v2/templates/libraries/jersey3/pom.mustache @@ -404,6 +404,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -433,9 +442,7 @@ 2.17.1 0.2.6 2.1.1 - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -443,6 +450,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 {{#useCustomTemplateCode}} 3.12.4 diff --git a/sdks/java-v2/templates/libraries/microprofile/api.mustache b/sdks/java-v2/templates/libraries/microprofile/api.mustache index 6e25c1f10..0b0a7c4ba 100644 --- a/sdks/java-v2/templates/libraries/microprofile/api.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/api.mustache @@ -71,10 +71,10 @@ public interface {{classname}} { {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} -{{^useSingleRequestParameter}} - {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; -{{/useSingleRequestParameter}} -{{#useSingleRequestParameter}} +{{^singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; +{{/singleRequestParameter}} +{{#singleRequestParameter}} {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException; {{#hasNonBodyParams}} public class {{operationIdCamelCase}}Request { @@ -91,6 +91,9 @@ public interface {{classname}} { {{#formParams}} private {{>formParams}}; {{/formParams}} + {{#cookieParams}} + private {{>cookieParams}}; + {{/cookieParams}} private {{operationIdCamelCase}}Request() { } @@ -106,7 +109,7 @@ public interface {{classname}} { * @param {{paramName}}{{>formParamsNameSuffix}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) * @return {{operationIdCamelCase}}Request */ - public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}) { + public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}{{>cookieParamsImpl}}) { this.{{paramName}}{{>formParamsNameSuffix}} = {{paramName}}{{>formParamsNameSuffix}}; return this; } @@ -114,7 +117,7 @@ public interface {{classname}} { {{/allParams}} } {{/hasNonBodyParams}} -{{/useSingleRequestParameter}} +{{/singleRequestParameter}} {{/operation}} } {{/operations}} diff --git a/sdks/java-v2/templates/libraries/microprofile/beanValidationCookieParams.mustache b/sdks/java-v2/templates/libraries/microprofile/beanValidationCookieParams.mustache new file mode 100644 index 000000000..c4ff01d7e --- /dev/null +++ b/sdks/java-v2/templates/libraries/microprofile/beanValidationCookieParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/sdks/java-v2/templates/libraries/microprofile/cookieParams.mustache b/sdks/java-v2/templates/libraries/microprofile/cookieParams.mustache new file mode 100644 index 000000000..4cca907c6 --- /dev/null +++ b/sdks/java-v2/templates/libraries/microprofile/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationCookieParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v2/templates/libraries/microprofile/cookieParamsImpl.mustache b/sdks/java-v2/templates/libraries/microprofile/cookieParamsImpl.mustache new file mode 100644 index 000000000..70871f0f8 --- /dev/null +++ b/sdks/java-v2/templates/libraries/microprofile/cookieParamsImpl.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v2/templates/libraries/microprofile/enumClass.mustache b/sdks/java-v2/templates/libraries/microprofile/enumClass.mustache index cb8539bd1..7cead92c5 100644 --- a/sdks/java-v2/templates/libraries/microprofile/enumClass.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/enumClass.mustache @@ -77,7 +77,7 @@ return b; } } - {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } {{/jackson}} {{/withXml}} diff --git a/sdks/java-v2/templates/libraries/microprofile/enumOuterClass.mustache b/sdks/java-v2/templates/libraries/microprofile/enumOuterClass.mustache index 2539064d1..588e52c7e 100644 --- a/sdks/java-v2/templates/libraries/microprofile/enumOuterClass.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/enumOuterClass.mustache @@ -65,6 +65,6 @@ import java.net.URI; return b; } } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/enumUnknownDefaultCase}}{{/useNullForUnknownEnumValue}} } } diff --git a/sdks/java-v2/templates/libraries/microprofile/model.mustache b/sdks/java-v2/templates/libraries/microprofile/model.mustache index e10e68d83..8ac93be1b 100644 --- a/sdks/java-v2/templates/libraries/microprofile/model.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/model.mustache @@ -1,6 +1,12 @@ {{>licenseInfo}} package {{package}}; +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; {{#imports}}import {{import}}; {{/imports}} {{#serializableModel}} @@ -31,9 +37,12 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; import {{rootJavaEEPackage}}.json.stream.JsonGenerator; import {{rootJavaEEPackage}}.json.stream.JsonParser; import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; -{{#vendorExtensions.x-has-readonly-properties}} +{{#jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo; +{{/jsonbPolymorphism}} import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; -{{/vendorExtensions.x-has-readonly-properties}} {{/jsonb}} {{#useBeanValidation}} import {{rootJavaEEPackage}}.validation.constraints.*; diff --git a/sdks/java-v2/templates/libraries/microprofile/pojo.mustache b/sdks/java-v2/templates/libraries/microprofile/pojo.mustache index afad09aa3..9fcac409c 100644 --- a/sdks/java-v2/templates/libraries/microprofile/pojo.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/pojo.mustache @@ -22,7 +22,7 @@ * {{{.}}} */ {{/description}} -{{>additionalModelTypeAnnotations}} +{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} {{#vendorExtensions.x-class-extra-annotation}} {{{vendorExtensions.x-class-extra-annotation}}} {{/vendorExtensions.x-class-extra-annotation}} @@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi */ {{/description}} {{^withXml}} - {{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}} + {{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}} {{/withXml}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} @@ -148,28 +148,5 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi {{/isReadOnly}} {{/vars}} - - /** - * Create a string representation of this pojo. - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); - {{/vars}}sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } +{{>pojoOverrides}} } diff --git a/sdks/java-v2/templates/libraries/microprofile/pojoOverrides.mustache b/sdks/java-v2/templates/libraries/microprofile/pojoOverrides.mustache new file mode 100644 index 000000000..f0fbb0b20 --- /dev/null +++ b/sdks/java-v2/templates/libraries/microprofile/pojoOverrides.mustache @@ -0,0 +1,64 @@ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}}sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } \ No newline at end of file diff --git a/sdks/java-v2/templates/libraries/microprofile/pom.mustache b/sdks/java-v2/templates/libraries/microprofile/pom.mustache index f814d4c0d..4fefd6db2 100644 --- a/sdks/java-v2/templates/libraries/microprofile/pom.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/pom.mustache @@ -196,6 +196,14 @@ ${mutiny.version} {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -210,10 +218,12 @@ 1.8 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.2 {{/useBeanValidation}} @@ -238,9 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 {{#microprofileMutiny}} - 1.2.0 + 1.10.0 {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v2/templates/libraries/microprofile/pom_3.0.mustache b/sdks/java-v2/templates/libraries/microprofile/pom_3.0.mustache index 7accc4cb2..9462e0d92 100644 --- a/sdks/java-v2/templates/libraries/microprofile/pom_3.0.mustache +++ b/sdks/java-v2/templates/libraries/microprofile/pom_3.0.mustache @@ -189,6 +189,21 @@ ${jakarta.annotation.version} provided +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -203,10 +218,12 @@ 11 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.1 {{/useBeanValidation}} @@ -217,7 +234,7 @@ {{/jackson}} 2.1.0 2.0.0 - 2.0.0 + 3.0.0 2.0.1 3.0.0 3.0.1 @@ -231,6 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v2/templates/libraries/native/ApiClient.mustache b/sdks/java-v2/templates/libraries/native/ApiClient.mustache index a641525af..a8bede355 100644 --- a/sdks/java-v2/templates/libraries/native/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/native/ApiClient.mustache @@ -183,7 +183,7 @@ public class ApiClient { asyncResponseInterceptor = null; } - protected ObjectMapper createDefaultObjectMapper() { + public static ObjectMapper createDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -199,15 +199,15 @@ public class ApiClient { return mapper; } - protected String getDefaultBaseUri() { + private String getDefaultBaseUri() { return "{{{basePath}}}"; } - protected HttpClient.Builder createDefaultHttpClientBuilder() { + public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/sdks/java-v2/templates/libraries/native/JSON.mustache b/sdks/java-v2/templates/libraries/native/JSON.mustache index 813bb7940..496e5a1a8 100644 --- a/sdks/java-v2/templates/libraries/native/JSON.mustache +++ b/sdks/java-v2/templates/libraries/native/JSON.mustache @@ -30,7 +30,12 @@ public class JSON { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + {{#failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v2/templates/libraries/native/anyof_model.mustache b/sdks/java-v2/templates/libraries/native/anyof_model.mustache index dfb6464d5..7cc5081d8 100644 --- a/sdks/java-v2/templates/libraries/native/anyof_model.mustache +++ b/sdks/java-v2/templates/libraries/native/anyof_model.mustache @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -241,7 +242,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -251,7 +252,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -289,7 +290,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -301,7 +302,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -316,7 +317,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -345,7 +346,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v2/templates/libraries/native/api.mustache b/sdks/java-v2/templates/libraries/native/api.mustache index a80dcbac8..c100f2f81 100644 --- a/sdks/java-v2/templates/libraries/native/api.mustache +++ b/sdks/java-v2/templates/libraries/native/api.mustache @@ -4,6 +4,7 @@ package {{package}}; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; import {{invokerPackage}}.Pair; {{#imports}} @@ -14,8 +15,8 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#hasFormParamsInSpec}} @@ -64,7 +65,7 @@ public class {{classname}} { private final Consumer> memberVarAsyncResponseInterceptor; public {{classname}}() { - this(new ApiClient()); + this(Configuration.getDefaultApiClient()); } public {{classname}}(ApiClient apiClient) { @@ -271,22 +272,46 @@ public class {{classname}} { } {{/vendorExtensions.x-java-text-plain-string}} {{^vendorExtensions.x-java-text-plain-string}} - return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - {{#returnType}} - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream - {{/returnType}} - {{^returnType}} - null - {{/returnType}} + {{#returnType}} + {{! Fix for https://github.com/OpenAPITools/openapi-generator/issues/13968 }} + {{! This part had a bugfix for an empty response in the past, but this part of that PR was reverted because it was not doing anything. }} + {{! Keep this documentation here, because the problem is not obvious. }} + {{! `InputStream.available()` was used, but that only works for inputstreams that are already in memory, it will not give the right result if it is a remote stream. We only work with remote streams here. }} + {{! https://github.com/OpenAPITools/openapi-generator/pull/13993/commits/3e!37411d2acef0311c82e6d941a8e40b3bc0b6da }} + {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} + {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} + {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} + if (localVarResponse.body() == null) { + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); + {{/returnType}} + {{^returnType}} + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + {{/returnType}} {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} // Drain the InputStream while (localVarResponse.body().read() != -1) { - // Ignore + // Ignore } localVarResponse.body().close(); {{/returnType}} diff --git a/sdks/java-v2/templates/libraries/native/api_test.mustache b/sdks/java-v2/templates/libraries/native/api_test.mustache index 497bd5308..8558cc6f4 100644 --- a/sdks/java-v2/templates/libraries/native/api_test.mustache +++ b/sdks/java-v2/templates/libraries/native/api_test.mustache @@ -19,8 +19,8 @@ import java.util.concurrent.CompletableFuture; {{/asyncNative}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/native/build.gradle.mustache b/sdks/java-v2/templates/libraries/native/build.gradle.mustache index 24ea4fef0..a04a9645e 100644 --- a/sdks/java-v2/templates/libraries/native/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/native/build.gradle.mustache @@ -50,12 +50,12 @@ task execute(type:JavaExec) { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -73,11 +73,21 @@ ext { swagger_annotations_version = "2.2.9" {{/swagger2AnnotationLibrary}} jackson_version = "2.17.1" + {{#useJakartaEe}} + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + {{/useJakartaEe}} junit_version = "5.10.2" {{#hasFormParamsInSpec}} httpmime_version = "4.5.13" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -94,9 +104,15 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version" + {{/useBeanValidation}} {{#hasFormParamsInSpec}} implementation "org.apache.httpcomponents:httpmime:$httpmime_version" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/sdks/java-v2/templates/libraries/native/model.mustache b/sdks/java-v2/templates/libraries/native/model.mustache index cd2a85a22..b3beca8d3 100644 --- a/sdks/java-v2/templates/libraries/native/model.mustache +++ b/sdks/java-v2/templates/libraries/native/model.mustache @@ -47,8 +47,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v2/templates/libraries/native/oneof_model.mustache b/sdks/java-v2/templates/libraries/native/oneof_model.mustache index 8aa2ef073..cbb4a6d63 100644 --- a/sdks/java-v2/templates/libraries/native/oneof_model.mustache +++ b/sdks/java-v2/templates/libraries/native/oneof_model.mustache @@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -274,7 +275,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -284,7 +285,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -322,7 +323,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -349,7 +350,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -367,7 +368,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -378,7 +379,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v2/templates/libraries/native/pojo.mustache b/sdks/java-v2/templates/libraries/native/pojo.mustache index 1250a71ec..5413d1cdc 100644 --- a/sdks/java-v2/templates/libraries/native/pojo.mustache +++ b/sdks/java-v2/templates/libraries/native/pojo.mustache @@ -75,6 +75,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -104,7 +105,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens )); {{/vendorExtensions.x-enum-as-string}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -188,17 +189,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -244,7 +235,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -266,7 +257,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#allVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -395,7 +386,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for ({{{items.dataType}}} _item : {{getter}}()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -405,7 +396,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (int i = 0; i < {{getter}}().size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } {{/uniqueItems}} @@ -443,7 +434,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -455,7 +446,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if ({{getter}}().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } } @@ -470,7 +461,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (String _key : {{getter}}().keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - {{getter}}().get(_key), URLEncoder.encode(ApiClient.valueToString({{getter}}().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + {{getter}}().get(_key), ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(_key))))); } } {{/items.isModel}} @@ -488,7 +479,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isMap}} {{#isPrimitiveType}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -499,7 +490,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isModel}} {{^isModel}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v2/templates/libraries/native/pom.mustache b/sdks/java-v2/templates/libraries/native/pom.mustache index 8ed827791..0ccfa8418 100644 --- a/sdks/java-v2/templates/libraries/native/pom.mustache +++ b/sdks/java-v2/templates/libraries/native/pom.mustache @@ -271,6 +271,14 @@ ${httpmime-version} {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -295,16 +303,18 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#hasFormParamsInSpec}} 4.5.14 {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.2 2.27.2 diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/ApiClient.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/ApiClient.mustache index c5e7ae225..519b37ed2 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/ApiClient.mustache @@ -47,9 +47,11 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -987,7 +989,7 @@ public class ApiClient { } {{/dynamicOperations}} - /** + /** * Formats the specified free-form query parameters to a list of {@code Pair} objects. * * @param value The free-form query parameters. @@ -1001,6 +1003,7 @@ public class ApiClient { return params; } + @SuppressWarnings("unchecked") final Map valuesMap = (Map) value; for (Map.Entry entry : valuesMap.entrySet()) { diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/JSON.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/JSON.mustache index 6cf7ec789..eee7773c4 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/JSON.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/JSON.mustache @@ -28,9 +28,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/README.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/README.mustache index 8dbdf2451..de3afa6c1 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/README.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/README.mustache @@ -90,7 +90,7 @@ import {{{invokerPackage}}}.ApiClient; import {{{invokerPackage}}}.ApiException; import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} -import {{{invokerPackage}}}.models.*; +import {{{modelPackage}}}.*; import {{{package}}}.{{{classname}}}; public class Example { diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/anyof_model.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/anyof_model.mustache index 18447fc12..564c1bb36 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/anyof_model.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/anyof_model.mustache @@ -283,7 +283,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -291,13 +291,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{dataType}}} get{{#isArray}}{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/api.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/api.mustache index 96757ed64..2dd79633e 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/api.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/api.mustache @@ -26,14 +26,14 @@ import io.swagger.v3.oas.models.parameters.Parameter; import java.io.IOException; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; -import jakarta.validation.executable.ExecutableValidator; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.Validation; +import {{javaxPackage}}.validation.ValidatorFactory; +import {{javaxPackage}}.validation.executable.ExecutableValidator; import java.util.Set; import java.lang.reflect.Method; import java.lang.reflect.Type; @@ -98,7 +98,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -180,12 +181,6 @@ public class {{classname}} { {{/isQueryParam}} {{/constantParams}} - {{#headerParams}} - if ({{paramName}} != null) { - localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); - } - - {{/headerParams}} {{#constantParams}} {{#isHeaderParam}} // Set client side default value of Header Param "{{baseName}}". @@ -230,6 +225,15 @@ public class {{classname}} { if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } + {{^dynamicOperations}} + {{#headerParams}} + + if ({{paramName}} != null) { + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/headerParams}} + {{/dynamicOperations}} String[] localVarAuthNames = new String[] { {{#withAWSV4Signature}}"AWS4Auth"{{/withAWSV4Signature}}{{#authMethods}}{{#-first}}{{#withAWSV4Signature}}, {{/withAWSV4Signature}}{{/-first}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; return localVarApiClient.buildCall(basePath, localVarPath, {{^dynamicOperations}}"{{httpMethod}}"{{/dynamicOperations}}{{#dynamicOperations}}apiOperation.getMethod(){{/dynamicOperations}}, localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); @@ -287,7 +291,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -327,7 +332,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -395,7 +401,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -455,7 +462,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -479,7 +487,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -511,7 +520,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -543,7 +553,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -569,7 +580,8 @@ public class {{classname}} { * @return API{{operationId}}Request {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/api_test.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/api_test.mustache index 29f682678..b56bdf4db 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/api_test.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/api_test.mustache @@ -17,8 +17,8 @@ import java.io.InputStream; {{/supportStreaming}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/build.gradle.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/build.gradle.mustache index eb67fc112..1b527257a 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/build.gradle.mustache @@ -126,7 +126,7 @@ dependencies { {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/build.sbt.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/build.sbt.mustache index 2045b8474..54bd804c4 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/build.sbt.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/build.sbt.mustache @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.6", diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/model.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/model.mustache index c82b0fbe2..3a1cca8d7 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/model.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/model.mustache @@ -21,8 +21,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/oneof_model.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/oneof_model.mustache index 31c63263e..731b36d57 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/oneof_model.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/oneof_model.mustache @@ -361,7 +361,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -372,10 +372,10 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/pojo.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/pojo.mustache index 0a32ef099..3d76d23b0 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/pojo.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/pojo.mustache @@ -70,6 +70,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} + {{>nullable_var_annotations}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} @@ -80,6 +81,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/parcelableModel}} {{/parent}} {{#discriminator}} + {{#discriminator.isEnum}} +{{#readWriteVars}}{{#isDiscriminator}}{{#defaultValue}} + this.{{name}} = {{defaultValue}}; +{{/defaultValue}}{{/isDiscriminator}}{{/readWriteVars}} + {{/discriminator.isEnum}} {{^discriminator.isEnum}} this.{{{discriminatorName}}} = this.getClass().getSimpleName(); {{/discriminator.isEnum}} @@ -106,7 +112,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; return this; } @@ -153,17 +159,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -183,7 +179,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} {{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated -{{/deprecated}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/deprecated}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; } {{/isReadOnly}} diff --git a/sdks/java-v2/templates/libraries/okhttp-gson/pom.mustache b/sdks/java-v2/templates/libraries/okhttp-gson/pom.mustache index def53f2fc..5e7bd9b86 100644 --- a/sdks/java-v2/templates/libraries/okhttp-gson/pom.mustache +++ b/sdks/java-v2/templates/libraries/okhttp-gson/pom.mustache @@ -414,7 +414,7 @@ {{/swagger2AnnotationLibrary}} 4.12.02.10.1 - 3.14.0 + 3.17.0 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} @@ -423,16 +423,15 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#performBeanValidation}} 3.0.3 {{/performBeanValidation}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.31.10.02.1.6 diff --git a/sdks/java-v2/templates/libraries/rest-assured/JacksonObjectMapper.mustache b/sdks/java-v2/templates/libraries/rest-assured/JacksonObjectMapper.mustache index 8919eda30..3d875d66b 100644 --- a/sdks/java-v2/templates/libraries/rest-assured/JacksonObjectMapper.mustache +++ b/sdks/java-v2/templates/libraries/rest-assured/JacksonObjectMapper.mustache @@ -27,7 +27,7 @@ public class JacksonObjectMapper extends Jackson2Mapper { ObjectMapper mapper = new ObjectMapper(); mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v2/templates/libraries/rest-assured/api.mustache b/sdks/java-v2/templates/libraries/rest-assured/api.mustache index 5ae6e5057..1eae54272 100644 --- a/sdks/java-v2/templates/libraries/rest-assured/api.mustache +++ b/sdks/java-v2/templates/libraries/rest-assured/api.mustache @@ -33,8 +33,8 @@ import io.swagger.v3.oas.annotations.security.*; {{/swagger2AnnotationLibrary}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.lang.reflect.Type; @@ -146,7 +146,7 @@ public class {{classname}} { public static class {{operationIdCamelCase}}Oper implements Oper { public static final Method REQ_METHOD = {{httpMethod}}; - public static final String REQ_URI = "{{path}}"; + public static final String REQ_URI = "{{{path}}}"; private RequestSpecBuilder reqSpec; private ResponseSpecBuilder respSpec; @@ -155,15 +155,15 @@ public class {{classname}} { this.reqSpec = reqSpec; {{#vendorExtensions}} {{#x-content-type}} - reqSpec.setContentType("{{x-content-type}}"); + reqSpec.setContentType("{{{x-content-type}}}"); {{/x-content-type}} - reqSpec.setAccept("{{#x-accepts}}{{.}}{{^-last}},{{/-last}}{{/x-accepts}}"); + reqSpec.setAccept("{{#x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/x-accepts}}"); {{/vendorExtensions}} this.respSpec = new ResponseSpecBuilder(); } /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @param type * @return type @@ -175,7 +175,7 @@ public class {{classname}} { {{#returnType}} /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @return {{returnType}} */ diff --git a/sdks/java-v2/templates/libraries/rest-assured/api_test.mustache b/sdks/java-v2/templates/libraries/rest-assured/api_test.mustache index d7d9dae2b..adcbd8085 100644 --- a/sdks/java-v2/templates/libraries/rest-assured/api_test.mustache +++ b/sdks/java-v2/templates/libraries/rest-assured/api_test.mustache @@ -20,8 +20,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; diff --git a/sdks/java-v2/templates/libraries/rest-assured/pom.mustache b/sdks/java-v2/templates/libraries/rest-assured/pom.mustache index 396dd69c2..1655d52c2 100644 --- a/sdks/java-v2/templates/libraries/rest-assured/pom.mustache +++ b/sdks/java-v2/templates/libraries/rest-assured/pom.mustache @@ -358,13 +358,12 @@ {{/jackson}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 3.6.0 5.10.3 diff --git a/sdks/java-v2/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v2/templates/libraries/restclient/ApiClient.mustache index 14b1af4af..e5a4bd8fc 100644 --- a/sdks/java-v2/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/restclient/ApiClient.mustache @@ -44,6 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.TimeZone; +import java.util.function.Supplier; import {{javaxPackage}}.annotation.Nullable; @@ -87,29 +88,26 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient() { - this.dateFormat = createDefaultDateFormat(); - this.objectMapper = createDefaultObjectMapper(this.dateFormat); - this.restClient = buildRestClient(this.objectMapper); - this.init(); + this(null); } public ApiClient(RestClient restClient) { - this(Optional.ofNullable(restClient).orElseGet(ApiClient::buildRestClient), createDefaultDateFormat()); + this(restClient, createDefaultDateFormat()); } public ApiClient(ObjectMapper mapper, DateFormat format) { - this(buildRestClient(mapper.copy()), format); + this(null, mapper, format); } public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) { - this(Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(mapper.copy())), format); + this.objectMapper = mapper.copy(); + this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); + this.dateFormat = format; + this.init(); } private ApiClient(RestClient restClient, DateFormat format) { - this.restClient = restClient; - this.dateFormat = format; - this.objectMapper = createDefaultObjectMapper(format); - this.init(); + this(restClient, createDefaultObjectMapper(format), format); } public static DateFormat createDefaultDateFormat() { @@ -125,7 +123,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); @@ -159,9 +157,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{/withXml}} Consumer>> messageConverters = converters -> { - converters.add(new MappingJackson2HttpMessageConverter(mapper)); + converters.add(0, new MappingJackson2HttpMessageConverter(mapper)); {{#withXml}} - converters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper)); {{/withXml}} }; @@ -243,6 +241,21 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { throw new RuntimeException("No Bearer authentication configured!"); } + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. * @param username the username @@ -753,4 +766,4 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return collectionFormat.collectionToString(values); } -} \ No newline at end of file +} diff --git a/sdks/java-v2/templates/libraries/restclient/api.mustache b/sdks/java-v2/templates/libraries/restclient/api.mustache index 1475fc0f4..0fff00ec8 100644 --- a/sdks/java-v2/templates/libraries/restclient/api.mustache +++ b/sdks/java-v2/templates/libraries/restclient/api.mustache @@ -11,6 +11,11 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -47,6 +52,91 @@ public class {{classname}} { } {{#operation}} +{{#singleRequestParameter}} +{{#hasParams}} +{{^hasSingleParam}} + + {{^staticRequest}} + public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){} + {{/staticRequest}} + {{#staticRequest}} + public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + {{/staticRequest}} + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + +{{/hasSingleParam}} +{{/hasParams}} +{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v2/templates/libraries/restclient/api_test.mustache b/sdks/java-v2/templates/libraries/restclient/api_test.mustache index dc3408341..e54a4ccc2 100644 --- a/sdks/java-v2/templates/libraries/restclient/api_test.mustache +++ b/sdks/java-v2/templates/libraries/restclient/api_test.mustache @@ -4,8 +4,8 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -13,10 +13,15 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} /** * API tests for {{classname}} */ -@Ignore +@Disabled public class {{classname}}Test { private final {{classname}} api = new {{classname}}(); diff --git a/sdks/java-v2/templates/libraries/restclient/auth/OAuth.mustache b/sdks/java-v2/templates/libraries/restclient/auth/OAuth.mustache index 1e1e6247c..1b7ad33a3 100644 --- a/sdks/java-v2/templates/libraries/restclient/auth/OAuth.mustache +++ b/sdks/java-v2/templates/libraries/restclient/auth/OAuth.mustache @@ -2,25 +2,49 @@ package {{invokerPackage}}.auth; +import java.util.Optional; +import java.util.function.Supplier; import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ {{>generatedAnnotation}} public class OAuth implements Authentication { - private String accessToken; + private Supplier tokenSupplier; + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ public String getAccessToken() { - return accessToken; + return tokenSupplier.get(); } + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ public void setAccessToken(String accessToken) { - this.accessToken = accessToken; + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { - if (accessToken != null) { - headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); - } + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); } } diff --git a/sdks/java-v2/templates/libraries/restclient/pom.mustache b/sdks/java-v2/templates/libraries/restclient/pom.mustache index d3f6ab650..f926d47b4 100644 --- a/sdks/java-v2/templates/libraries/restclient/pom.mustache +++ b/sdks/java-v2/templates/libraries/restclient/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -337,12 +337,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -362,13 +356,10 @@ {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v2/templates/libraries/resteasy/JSON.mustache b/sdks/java-v2/templates/libraries/resteasy/JSON.mustache index b57283048..e4097fc85 100644 --- a/sdks/java-v2/templates/libraries/resteasy/JSON.mustache +++ b/sdks/java-v2/templates/libraries/resteasy/JSON.mustache @@ -20,7 +20,7 @@ public class JSON implements ContextResolver { public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v2/templates/libraries/resttemplate/additional_properties.mustache b/sdks/java-v2/templates/libraries/resttemplate/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v2/templates/libraries/resttemplate/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v2/templates/libraries/resttemplate/api.mustache b/sdks/java-v2/templates/libraries/resttemplate/api.mustache index aa1a98fd3..6cf513730 100644 --- a/sdks/java-v2/templates/libraries/resttemplate/api.mustache +++ b/sdks/java-v2/templates/libraries/resttemplate/api.mustache @@ -14,8 +14,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; diff --git a/sdks/java-v2/templates/libraries/resttemplate/api_test.mustache b/sdks/java-v2/templates/libraries/resttemplate/api_test.mustache index 04a19f1f1..e1a213c02 100644 --- a/sdks/java-v2/templates/libraries/resttemplate/api_test.mustache +++ b/sdks/java-v2/templates/libraries/resttemplate/api_test.mustache @@ -16,8 +16,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/resttemplate/auth/OAuth.mustache b/sdks/java-v2/templates/libraries/resttemplate/auth/OAuth.mustache index 1e8204285..1b7ad33a3 100644 --- a/sdks/java-v2/templates/libraries/resttemplate/auth/OAuth.mustache +++ b/sdks/java-v2/templates/libraries/resttemplate/auth/OAuth.mustache @@ -26,7 +26,7 @@ public class OAuth implements Authentication { /** * Sets the bearer access token used for Authorization. * - * @param bearerToken The bearer token to send in the Authorization header + * @param accessToken The bearer token to send in the Authorization header */ public void setAccessToken(String accessToken) { setAccessToken(() -> accessToken); diff --git a/sdks/java-v2/templates/libraries/resttemplate/build.gradle.mustache b/sdks/java-v2/templates/libraries/resttemplate/build.gradle.mustache index a900fc806..edd170cd3 100644 --- a/sdks/java-v2/templates/libraries/resttemplate/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/resttemplate/build.gradle.mustache @@ -123,10 +123,12 @@ ext { {{#useJakartaEe}} spring_web_version = "6.1.5" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" {{/useJakartaEe}} {{^useJakartaEe}} - spring_web_version = "5.3.33" + spring_web_version = "6.1.13" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" {{/useJakartaEe}} jodatime_version = "2.9.9" junit_version = "5.10.2" @@ -145,7 +147,12 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{^useJakartaEe}} implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#useJakartaEe}} + implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version" + {{/useJakartaEe}} {{#openApiNullable}} implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} diff --git a/sdks/java-v2/templates/libraries/resttemplate/model.mustache b/sdks/java-v2/templates/libraries/resttemplate/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v2/templates/libraries/resttemplate/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v2/templates/libraries/resttemplate/pojo.mustache b/sdks/java-v2/templates/libraries/resttemplate/pojo.mustache new file mode 100644 index 000000000..192b7014c --- /dev/null +++ b/sdks/java-v2/templates/libraries/resttemplate/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/resttemplate/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v2/templates/libraries/resttemplate/pom.mustache b/sdks/java-v2/templates/libraries/resttemplate/pom.mustache index 250417d78..90de86cba 100644 --- a/sdks/java-v2/templates/libraries/resttemplate/pom.mustache +++ b/sdks/java-v2/templates/libraries/resttemplate/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -352,12 +352,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -367,33 +361,27 @@ {{#swagger2AnnotationLibrary}} 2.2.15 {{/swagger2AnnotationLibrary}} - {{#useJakartaEe}} - 6.1.5 - {{/useJakartaEe}} - {{^useJakartaEe}} - 5.3.33 - {{/useJakartaEe}} 2.17.1 2.17.1 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} {{#useJakartaEe}} + 6.1.14 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} + 5.3.33 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v2/templates/libraries/retrofit2/ApiClient.mustache b/sdks/java-v2/templates/libraries/retrofit2/ApiClient.mustache index 077e8d692..c05159d4e 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/ApiClient.mustache @@ -46,7 +46,9 @@ import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.text.DateFormat; +{{#jsr310}} import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.LinkedHashMap; import java.util.Map; import java.util.HashMap; diff --git a/sdks/java-v2/templates/libraries/retrofit2/JSON.mustache b/sdks/java-v2/templates/libraries/retrofit2/JSON.mustache index 2ff8b1cb7..2e986485f 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/JSON.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/JSON.mustache @@ -30,9 +30,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v2/templates/libraries/retrofit2/JSON_jackson.mustache b/sdks/java-v2/templates/libraries/retrofit2/JSON_jackson.mustache index 525fe5d13..697e398e4 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/JSON_jackson.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/JSON_jackson.mustache @@ -32,7 +32,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v2/templates/libraries/retrofit2/api.mustache b/sdks/java-v2/templates/libraries/retrofit2/api.mustache index dd521a5fc..0b0105515 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/api.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/api.mustache @@ -35,8 +35,8 @@ import java.util.Map; import java.util.Set; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#operations}} diff --git a/sdks/java-v2/templates/libraries/retrofit2/api_test.mustache b/sdks/java-v2/templates/libraries/retrofit2/api_test.mustache index dab62f328..b84e6b173 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/api_test.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/api_test.mustache @@ -15,8 +15,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/retrofit2/play26/api.mustache b/sdks/java-v2/templates/libraries/retrofit2/play26/api.mustache index e78bd985a..7f7b9e2b0 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/play26/api.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/play26/api.mustache @@ -18,8 +18,8 @@ import okhttp3.MultipartBody; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; diff --git a/sdks/java-v2/templates/libraries/retrofit2/pom.mustache b/sdks/java-v2/templates/libraries/retrofit2/pom.mustache index b02a5fb2e..7f5d6b892 100644 --- a/sdks/java-v2/templates/libraries/retrofit2/pom.mustache +++ b/sdks/java-v2/templates/libraries/retrofit2/pom.mustache @@ -405,13 +405,12 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 1.0.1 5.10.3 diff --git a/sdks/java-v2/templates/libraries/vertx/ApiClient.mustache b/sdks/java-v2/templates/libraries/vertx/ApiClient.mustache index 6607107ab..1a90c571b 100644 --- a/sdks/java-v2/templates/libraries/vertx/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/vertx/ApiClient.mustache @@ -81,7 +81,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { // Build object mapper this.objectMapper = new ObjectMapper(); this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v2/templates/libraries/webclient/ApiClient.mustache b/sdks/java-v2/templates/libraries/webclient/ApiClient.mustache index 9072a8859..ce696128e 100644 --- a/sdks/java-v2/templates/libraries/webclient/ApiClient.mustache +++ b/sdks/java-v2/templates/libraries/webclient/ApiClient.mustache @@ -143,7 +143,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/sdks/java-v2/templates/libraries/webclient/additional_properties.mustache b/sdks/java-v2/templates/libraries/webclient/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v2/templates/libraries/webclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v2/templates/libraries/webclient/api.mustache b/sdks/java-v2/templates/libraries/webclient/api.mustache index 65600dbfc..0a412fb37 100644 --- a/sdks/java-v2/templates/libraries/webclient/api.mustache +++ b/sdks/java-v2/templates/libraries/webclient/api.mustache @@ -12,8 +12,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +53,81 @@ public class {{classname}} { this.apiClient = apiClient; } - {{#operation}} + {{#operation}}{{#singleRequestParameter}}{{#hasParams}}{{^hasSingleParam}} + public {{#staticRequest}}static {{/staticRequest}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + {{/hasSingleParam}}{{/hasParams}}{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v2/templates/libraries/webclient/api_test.mustache b/sdks/java-v2/templates/libraries/webclient/api_test.mustache index c5d568617..e0a960d12 100644 --- a/sdks/java-v2/templates/libraries/webclient/api_test.mustache +++ b/sdks/java-v2/templates/libraries/webclient/api_test.mustache @@ -15,8 +15,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v2/templates/libraries/webclient/build.gradle.mustache b/sdks/java-v2/templates/libraries/webclient/build.gradle.mustache index 597411638..be194ab23 100644 --- a/sdks/java-v2/templates/libraries/webclient/build.gradle.mustache +++ b/sdks/java-v2/templates/libraries/webclient/build.gradle.mustache @@ -133,12 +133,14 @@ ext { {{#useJakartaEe}} spring_boot_version = "3.0.12" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" reactor_version = "3.5.12" reactor_netty_version = "1.1.13" {{/useJakartaEe}} {{^useJakartaEe}} spring_boot_version = "2.7.17" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" reactor_version = "3.4.34" reactor_netty_version = "1.0.39" {{/useJakartaEe}} diff --git a/sdks/java-v2/templates/libraries/webclient/model.mustache b/sdks/java-v2/templates/libraries/webclient/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v2/templates/libraries/webclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v2/templates/libraries/webclient/pojo.mustache b/sdks/java-v2/templates/libraries/webclient/pojo.mustache new file mode 100644 index 000000000..2b9423b77 --- /dev/null +++ b/sdks/java-v2/templates/libraries/webclient/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/webclient/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v2/templates/model.mustache b/sdks/java-v2/templates/model.mustache index b50416793..55e6678d2 100644 --- a/sdks/java-v2/templates/model.mustache +++ b/sdks/java-v2/templates/model.mustache @@ -49,8 +49,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v2/templates/modelInnerEnum.mustache b/sdks/java-v2/templates/modelInnerEnum.mustache index 0096d8407..f87524099 100644 --- a/sdks/java-v2/templates/modelInnerEnum.mustache +++ b/sdks/java-v2/templates/modelInnerEnum.mustache @@ -23,7 +23,7 @@ {{#withXml}} @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{/withXml}} - {{{name}}}({{{value}}}){{^-last}}, + {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/sdks/java-v2/templates/nullable_var_annotations.mustache b/sdks/java-v2/templates/nullable_var_annotations.mustache new file mode 100644 index 000000000..7dbaf4029 --- /dev/null +++ b/sdks/java-v2/templates/nullable_var_annotations.mustache @@ -0,0 +1 @@ +{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}} \ No newline at end of file diff --git a/sdks/java-v2/templates/pojo.mustache b/sdks/java-v2/templates/pojo.mustache index 05be7e5c5..09482dd66 100644 --- a/sdks/java-v2/templates/pojo.mustache +++ b/sdks/java-v2/templates/pojo.mustache @@ -65,6 +65,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{>nullable_var_annotations}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} @@ -134,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -210,17 +211,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -270,7 +261,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -285,7 +276,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#readWriteVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -404,7 +395,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#uniqueItems}} if ({{getter}}() != null) { int i = 0; - for ({{{items.dataType}}} _item : {{getter}}()) { + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { try { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), diff --git a/sdks/java-v2/templates/pom.mustache b/sdks/java-v2/templates/pom.mustache index b733ab9bb..c46bc598e 100644 --- a/sdks/java-v2/templates/pom.mustache +++ b/sdks/java-v2/templates/pom.mustache @@ -289,12 +289,12 @@ {{/useJakartaEe}} {{#withXml}} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + {{/withXml}} {{#joda}} @@ -341,6 +341,15 @@ ${jakarta-annotation-version} provided + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -368,13 +377,15 @@ 2.17.1 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} -{{#useBeanValidation}} - 3.0.2 -{{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 1.0.0 5.10.2 1.10.0 diff --git a/sdks/java-v2/templates/typeInfoAnnotation.mustache b/sdks/java-v2/templates/typeInfoAnnotation.mustache index c21efb490..07f77c75c 100644 --- a/sdks/java-v2/templates/typeInfoAnnotation.mustache +++ b/sdks/java-v2/templates/typeInfoAnnotation.mustache @@ -26,3 +26,9 @@ {{/-last}} {{/discriminator.mappedModels}} {{/jackson}} +{{#jsonbPolymorphism}} +@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = { +{{/-first}} + @JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class), +{{#-last}} +}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}} \ No newline at end of file diff --git a/sdks/node/README.md b/sdks/node/README.md index bfee7884f..93d2bfdfd 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -47,58 +47,30 @@ Please follow the [installation procedure](#installation--usage) and then run th ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { +const accountCreateRequest: models.AccountCreateRequest = { emailAddress: "newuser@dropboxsign.com", }; -const result = accountApi.accountCreate(data); -result.then(response => { +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountCreate:"); console.log(error.body); }); ``` -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - ## API Endpoints @@ -121,7 +93,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *EmbeddedApi* | [**embeddedEditUrl**](./docs/api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](./docs/api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | | *FaxApi* | [**faxDelete**](./docs/api/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| *FaxApi* | [**faxFiles**](./docs/api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| *FaxApi* | [**faxFiles**](./docs/api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | *FaxApi* | [**faxGet**](./docs/api/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | | *FaxApi* | [**faxList**](./docs/api/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | | *FaxApi* | [**faxSend**](./docs/api/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | @@ -140,6 +112,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | *SignatureRequestApi* | [**signatureRequestCancel**](./docs/api/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](./docs/api/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEdit**](./docs/api/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbedded**](./docs/api/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEditWithTemplate**](./docs/api/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | *SignatureRequestApi* | [**signatureRequestFiles**](./docs/api/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](./docs/api/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](./docs/api/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -242,6 +218,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestBulkSendWithTemplateRequest](./docs/model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](./docs/model/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](./docs/model/SignatureRequestCreateEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditEmbeddedRequest](./docs/model/SignatureRequestEditEmbeddedRequest.md) +- [SignatureRequestEditEmbeddedWithTemplateRequest](./docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditRequest](./docs/model/SignatureRequestEditRequest.md) +- [SignatureRequestEditWithTemplateRequest](./docs/model/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](./docs/model/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](./docs/model/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](./docs/model/SignatureRequestRemindRequest.md) diff --git a/sdks/node/VERSION b/sdks/node/VERSION index d82db9132..00f91b858 100644 --- a/sdks/node/VERSION +++ b/sdks/node/VERSION @@ -1 +1 @@ -1.8-dev +1.8.1-dev diff --git a/sdks/node/api/apis.ts b/sdks/node/api/apis.ts index 771aa5c8e..f9d7d41f6 100644 --- a/sdks/node/api/apis.ts +++ b/sdks/node/api/apis.ts @@ -38,7 +38,7 @@ export const queryParamsSerializer = (params) => { return Qs.stringify(params, { arrayFormat: "brackets" }); }; -export const USER_AGENT = "OpenAPI-Generator/1.8-dev/node"; +export const USER_AGENT = "OpenAPI-Generator/1.8.1-dev/node"; /** * Generates an object containing form data. diff --git a/sdks/node/api/faxApi.ts b/sdks/node/api/faxApi.ts index dd9c6df2a..26e224280 100644 --- a/sdks/node/api/faxApi.ts +++ b/sdks/node/api/faxApi.ts @@ -119,7 +119,7 @@ export class FaxApi { } /** - * Deletes the specified Fax from the system. + * Deletes the specified Fax from the system * @summary Delete Fax * @param faxId Fax ID * @param options @@ -220,8 +220,8 @@ export class FaxApi { }); } /** - * Returns list of fax files - * @summary List Fax Files + * Downloads files associated with a Fax + * @summary Download Fax Files * @param faxId Fax ID * @param options */ @@ -337,7 +337,7 @@ export class FaxApi { }); } /** - * Returns information about fax + * Returns information about a Fax * @summary Get Fax * @param faxId Fax ID * @param options @@ -454,10 +454,10 @@ export class FaxApi { }); } /** - * Returns properties of multiple faxes + * Returns properties of multiple Faxes * @summary Lists Faxes - * @param page Page - * @param pageSize Page size + * @param page Which page number of the Fax List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. * @param options */ public async faxList( @@ -575,7 +575,7 @@ export class FaxApi { }); } /** - * Action to prepare and send a fax + * Creates and sends a new Fax with the submitted file(s) * @summary Send Fax * @param faxSendRequest * @param options diff --git a/sdks/node/api/faxLineApi.ts b/sdks/node/api/faxLineApi.ts index 634f6149a..24510ee88 100644 --- a/sdks/node/api/faxLineApi.ts +++ b/sdks/node/api/faxLineApi.ts @@ -261,12 +261,12 @@ export class FaxLineApi { }); } /** - * Returns a response with the area codes available for a given state/provice and city. + * Returns a list of available area codes for a given state/province and city * @summary Get Available Fax Line Area Codes - * @param country Filter area codes by country. - * @param state Filter area codes by state. - * @param province Filter area codes by province. - * @param city Filter area codes by city. + * @param country Filter area codes by country + * @param state Filter area codes by state + * @param province Filter area codes by province + * @param city Filter area codes by city * @param options */ public async faxLineAreaCodeGet( @@ -473,7 +473,7 @@ export class FaxLineApi { }); } /** - * Purchases a new Fax Line. + * Purchases a new Fax Line * @summary Purchase Fax Line * @param faxLineCreateRequest * @param options @@ -735,7 +735,7 @@ export class FaxLineApi { /** * Returns the properties and settings of a Fax Line. * @summary Get Fax Line - * @param number The Fax Line number. + * @param number The Fax Line number * @param options */ public async faxLineGet( @@ -855,9 +855,9 @@ export class FaxLineApi { * Returns the properties and settings of multiple Fax Lines. * @summary List Fax Lines * @param accountId Account ID - * @param page Page - * @param pageSize Page size - * @param showTeamLines Show team lines + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param showTeamLines Include Fax Lines belonging to team members in the list * @param options */ public async faxLineList( @@ -993,7 +993,7 @@ export class FaxLineApi { }); } /** - * Removes a user\'s access to the specified Fax Line. + * Removes a user\'s access to the specified Fax Line * @summary Remove Fax Line Access * @param faxLineRemoveUserRequest * @param options diff --git a/sdks/node/api/signatureRequestApi.ts b/sdks/node/api/signatureRequestApi.ts index 3fd0d611e..845c9f787 100644 --- a/sdks/node/api/signatureRequestApi.ts +++ b/sdks/node/api/signatureRequestApi.ts @@ -37,6 +37,10 @@ import { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -824,6 +828,654 @@ export class SignatureRequestApi { ); }); } + /** + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditRequest + * @param options + */ + public async signatureRequestEdit( + signatureRequestId: string, + signatureRequestEditRequest: SignatureRequestEditRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditRequest = deserializeIfNeeded( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." + ); + } + + // verify required parameter 'signatureRequestEditRequest' is not null or undefined + if ( + signatureRequestEditRequest === null || + signatureRequestEditRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditRequest, + SignatureRequestEditRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedRequest + * @param options + */ + public async signatureRequestEditEmbedded( + signatureRequestId: string, + signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditEmbeddedRequest = deserializeIfNeeded( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_embedded/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." + ); + } + + // verify required parameter 'signatureRequestEditEmbeddedRequest' is not null or undefined + if ( + signatureRequestEditEmbeddedRequest === null || + signatureRequestEditEmbeddedRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request with Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedWithTemplateRequest + * @param options + */ + public async signatureRequestEditEmbeddedWithTemplate( + signatureRequestId: string, + signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + + // verify required parameter 'signatureRequestEditEmbeddedWithTemplateRequest' is not null or undefined + if ( + signatureRequestEditEmbeddedWithTemplateRequest === null || + signatureRequestEditEmbeddedWithTemplateRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } + /** + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request With Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditWithTemplateRequest + * @param options + */ + public async signatureRequestEditWithTemplate( + signatureRequestId: string, + signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest, + options: optionsI = { headers: {} } + ): Promise> { + signatureRequestEditWithTemplateRequest = deserializeIfNeeded( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + const localVarPath = + this.basePath + + "/signature_request/edit_with_template/{signature_request_id}".replace( + "{" + "signature_request_id" + "}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + // give precedence to 'application/json' + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams: any = {}; + let localVarBodyParams: any = undefined; + + // verify required parameter 'signatureRequestId' is not null or undefined + if (signatureRequestId === null || signatureRequestId === undefined) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + + // verify required parameter 'signatureRequestEditWithTemplateRequest' is not null or undefined + if ( + signatureRequestEditWithTemplateRequest === null || + signatureRequestEditWithTemplateRequest === undefined + ) { + throw new Error( + "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + const result = generateFormData( + signatureRequestEditWithTemplateRequest, + SignatureRequestEditWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + + let data = {}; + if (localVarUseFormData) { + const formData = toFormData(result.data); + data = formData; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData.getHeaders(), + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + } + + let localVarRequestOptions: AxiosRequestConfig = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring + ? queryParamsSerializer + : undefined, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then(() => + this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then(() => + this.authentications.default.applyToRequest(localVarRequestOptions) + ); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => + interceptor(localVarRequestOptions) + ); + } + + return interceptorPromise.then(() => { + return new Promise>( + (resolve, reject) => { + axios.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error: AxiosError) => { + if (error.response == null) { + reject(error); + return; + } + + if ( + handleErrorCodeResponse( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + ) + ) { + return; + } + + if ( + handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + ) + ) { + return; + } + + reject(error); + } + ); + } + ); + }); + } /** * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. * @summary Download Files diff --git a/sdks/node/bin/copy-constants.php b/sdks/node/bin/copy-constants.php new file mode 100755 index 000000000..c9634b6cd --- /dev/null +++ b/sdks/node/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); diff --git a/sdks/node/bin/generate-examples.php b/sdks/node/bin/generate-examples.php index acd47f375..5288b8342 100755 --- a/sdks/node/bin/generate-examples.php +++ b/sdks/node/bin/generate-examples.php @@ -260,7 +260,7 @@ protected function getReplaceCodeString( $generate = new GenerateExamples( Yaml::parse(file_get_contents(__DIR__ . '/../openapi-sdk.yaml')), - ['JavaScript', 'TypeScript'], + ['TypeScript'], [__DIR__ . '/../docs/api', __DIR__ . '/../docs/model'], [__DIR__ . '/../README.md'], [ diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 3b8851064..8767d4104 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -1,27 +1,10 @@ "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; -var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; @@ -38,36 +21,20 @@ var __copyProps = (to, from, except, desc) => { return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; // node_modules/delayed-stream/lib/delayed_stream.js var require_delayed_stream = __commonJS({ - "node_modules/delayed-stream/lib/delayed_stream.js"(exports, module2) { + "node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { var Stream = require("stream").Stream; - var util2 = require("util"); + var util3 = require("util"); module2.exports = DelayedStream; function DelayedStream() { this.source = null; @@ -78,7 +45,7 @@ var require_delayed_stream = __commonJS({ this._released = false; this._bufferedEvents = []; } - util2.inherits(DelayedStream, Stream); + util3.inherits(DelayedStream, Stream); DelayedStream.create = function(source, options) { var delayedStream = new this(); options = options || {}; @@ -156,8 +123,8 @@ var require_delayed_stream = __commonJS({ // node_modules/combined-stream/lib/combined_stream.js var require_combined_stream = __commonJS({ - "node_modules/combined-stream/lib/combined_stream.js"(exports, module2) { - var util2 = require("util"); + "node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { + var util3 = require("util"); var Stream = require("stream").Stream; var DelayedStream = require_delayed_stream(); module2.exports = CombinedStream; @@ -173,7 +140,7 @@ var require_combined_stream = __commonJS({ this._insideLoop = false; this._pendingNext = false; } - util2.inherits(CombinedStream, Stream); + util3.inherits(CombinedStream, Stream); CombinedStream.create = function(options) { var combinedStream = new this(); options = options || {}; @@ -270,8 +237,7 @@ var require_combined_stream = __commonJS({ if (!this.pauseStreams) { return; } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") - this._currentStream.pause(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause(); this.emit("pause"); }; CombinedStream.prototype.resume = function() { @@ -280,8 +246,7 @@ var require_combined_stream = __commonJS({ this.writable = true; this._getNext(); } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") - this._currentStream.resume(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume(); this.emit("resume"); }; CombinedStream.prototype.end = function() { @@ -327,7 +292,7 @@ var require_combined_stream = __commonJS({ // node_modules/mime-db/db.json var require_db = __commonJS({ - "node_modules/mime-db/db.json"(exports, module2) { + "node_modules/mime-db/db.json"(exports2, module2) { module2.exports = { "application/1d-interleaved-parityfec": { source: "iana" @@ -8852,27 +8817,27 @@ var require_db = __commonJS({ // node_modules/mime-db/index.js var require_mime_db = __commonJS({ - "node_modules/mime-db/index.js"(exports, module2) { + "node_modules/mime-db/index.js"(exports2, module2) { module2.exports = require_db(); } }); // node_modules/mime-types/index.js var require_mime_types = __commonJS({ - "node_modules/mime-types/index.js"(exports) { + "node_modules/mime-types/index.js"(exports2) { "use strict"; var db = require_mime_db(); var extname = require("path").extname; var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; var TEXT_TYPE_REGEXP = /^text\//i; - exports.charset = charset; - exports.charsets = { lookup: charset }; - exports.contentType = contentType; - exports.extension = extension; - exports.extensions = /* @__PURE__ */ Object.create(null); - exports.lookup = lookup; - exports.types = /* @__PURE__ */ Object.create(null); - populateMaps(exports.extensions, exports.types); + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); function charset(type) { if (!type || typeof type !== "string") { return false; @@ -8891,14 +8856,13 @@ var require_mime_types = __commonJS({ if (!str || typeof str !== "string") { return false; } - var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } if (mime.indexOf("charset") === -1) { - var charset2 = exports.charset(mime); - if (charset2) - mime += "; charset=" + charset2.toLowerCase(); + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); } return mime; } @@ -8907,7 +8871,7 @@ var require_mime_types = __commonJS({ return false; } var match = EXTRACT_TYPE_REGEXP.exec(type); - var exts = match && exports.extensions[match[1].toLowerCase()]; + var exts = match && exports2.extensions[match[1].toLowerCase()]; if (!exts || !exts.length) { return false; } @@ -8921,7 +8885,7 @@ var require_mime_types = __commonJS({ if (!extension2) { return false; } - return exports.types[extension2] || false; + return exports2.types[extension2] || false; } function populateMaps(extensions, types) { var preference = ["nginx", "apache", void 0, "iana"]; @@ -8950,7 +8914,7 @@ var require_mime_types = __commonJS({ // node_modules/asynckit/lib/defer.js var require_defer = __commonJS({ - "node_modules/asynckit/lib/defer.js"(exports, module2) { + "node_modules/asynckit/lib/defer.js"(exports2, module2) { module2.exports = defer; function defer(fn) { var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null; @@ -8965,7 +8929,7 @@ var require_defer = __commonJS({ // node_modules/asynckit/lib/async.js var require_async = __commonJS({ - "node_modules/asynckit/lib/async.js"(exports, module2) { + "node_modules/asynckit/lib/async.js"(exports2, module2) { var defer = require_defer(); module2.exports = async; function async(callback) { @@ -8988,7 +8952,7 @@ var require_async = __commonJS({ // node_modules/asynckit/lib/abort.js var require_abort = __commonJS({ - "node_modules/asynckit/lib/abort.js"(exports, module2) { + "node_modules/asynckit/lib/abort.js"(exports2, module2) { module2.exports = abort; function abort(state) { Object.keys(state.jobs).forEach(clean.bind(state)); @@ -9004,7 +8968,7 @@ var require_abort = __commonJS({ // node_modules/asynckit/lib/iterate.js var require_iterate = __commonJS({ - "node_modules/asynckit/lib/iterate.js"(exports, module2) { + "node_modules/asynckit/lib/iterate.js"(exports2, module2) { var async = require_async(); var abort = require_abort(); module2.exports = iterate; @@ -9037,7 +9001,7 @@ var require_iterate = __commonJS({ // node_modules/asynckit/lib/state.js var require_state = __commonJS({ - "node_modules/asynckit/lib/state.js"(exports, module2) { + "node_modules/asynckit/lib/state.js"(exports2, module2) { module2.exports = state; function state(list, sortMethod) { var isNamedList = !Array.isArray(list), initState = { @@ -9059,7 +9023,7 @@ var require_state = __commonJS({ // node_modules/asynckit/lib/terminator.js var require_terminator = __commonJS({ - "node_modules/asynckit/lib/terminator.js"(exports, module2) { + "node_modules/asynckit/lib/terminator.js"(exports2, module2) { var abort = require_abort(); var async = require_async(); module2.exports = terminator; @@ -9076,7 +9040,7 @@ var require_terminator = __commonJS({ // node_modules/asynckit/parallel.js var require_parallel = __commonJS({ - "node_modules/asynckit/parallel.js"(exports, module2) { + "node_modules/asynckit/parallel.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9103,7 +9067,7 @@ var require_parallel = __commonJS({ // node_modules/asynckit/serialOrdered.js var require_serialOrdered = __commonJS({ - "node_modules/asynckit/serialOrdered.js"(exports, module2) { + "node_modules/asynckit/serialOrdered.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9137,7 +9101,7 @@ var require_serialOrdered = __commonJS({ // node_modules/asynckit/serial.js var require_serial = __commonJS({ - "node_modules/asynckit/serial.js"(exports, module2) { + "node_modules/asynckit/serial.js"(exports2, module2) { var serialOrdered = require_serialOrdered(); module2.exports = serial; function serial(list, iterator, callback) { @@ -9148,7 +9112,7 @@ var require_serial = __commonJS({ // node_modules/asynckit/index.js var require_asynckit = __commonJS({ - "node_modules/asynckit/index.js"(exports, module2) { + "node_modules/asynckit/index.js"(exports2, module2) { module2.exports = { parallel: require_parallel(), serial: require_serial(), @@ -9159,7 +9123,7 @@ var require_asynckit = __commonJS({ // node_modules/form-data/lib/populate.js var require_populate = __commonJS({ - "node_modules/form-data/lib/populate.js"(exports, module2) { + "node_modules/form-data/lib/populate.js"(exports2, module2) { module2.exports = function(dst, src) { Object.keys(src).forEach(function(prop) { dst[prop] = dst[prop] || src[prop]; @@ -9171,9 +9135,9 @@ var require_populate = __commonJS({ // node_modules/form-data/lib/form_data.js var require_form_data = __commonJS({ - "node_modules/form-data/lib/form_data.js"(exports, module2) { + "node_modules/form-data/lib/form_data.js"(exports2, module2) { var CombinedStream = require_combined_stream(); - var util2 = require("util"); + var util3 = require("util"); var path = require("path"); var http2 = require("http"); var https2 = require("https"); @@ -9184,7 +9148,7 @@ var require_form_data = __commonJS({ var asynckit = require_asynckit(); var populate = require_populate(); module2.exports = FormData3; - util2.inherits(FormData3, CombinedStream); + util3.inherits(FormData3, CombinedStream); function FormData3(options) { if (!(this instanceof FormData3)) { return new FormData3(options); @@ -9209,7 +9173,7 @@ var require_form_data = __commonJS({ if (typeof value == "number") { value = "" + value; } - if (util2.isArray(value)) { + if (util3.isArray(value)) { this._error(new Error("Arrays are not supported.")); return; } @@ -9273,7 +9237,9 @@ var require_form_data = __commonJS({ var contentType = this._getContentType(value, options); var contents = ""; var headers = { + // add custom disposition as third element or keep it two elements if not "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array "Content-Type": [].concat(contentType || []) }; if (typeof options.header == "object") { @@ -9281,8 +9247,7 @@ var require_form_data = __commonJS({ } var header; for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) - continue; + if (!headers.hasOwnProperty(prop)) continue; header = headers[prop]; if (header == null) { continue; @@ -9484,7 +9449,7 @@ var require_form_data = __commonJS({ // node_modules/proxy-from-env/index.js var require_proxy_from_env = __commonJS({ - "node_modules/proxy-from-env/index.js"(exports) { + "node_modules/proxy-from-env/index.js"(exports2) { "use strict"; var parseUrl = require("url").parse; var DEFAULT_PORTS = { @@ -9498,7 +9463,7 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl2(url2) { + function getProxyForUrl(url2) { var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; var proto = parsedUrl.protocol; var hostname = parsedUrl.host; @@ -9548,13 +9513,13 @@ var require_proxy_from_env = __commonJS({ function getEnv(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; } - exports.getProxyForUrl = getProxyForUrl2; + exports2.getProxyForUrl = getProxyForUrl; } }); // node_modules/ms/index.js var require_ms = __commonJS({ - "node_modules/ms/index.js"(exports, module2) { + "node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; @@ -9670,7 +9635,7 @@ var require_ms = __commonJS({ // node_modules/debug/src/common.js var require_common = __commonJS({ - "node_modules/debug/src/common.js"(exports, module2) { + "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; @@ -9705,7 +9670,7 @@ var require_common = __commonJS({ return; } const self2 = debug; - const curr = Number(new Date()); + const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; @@ -9833,13 +9798,13 @@ var require_common = __commonJS({ // node_modules/debug/src/browser.js var require_browser = __commonJS({ - "node_modules/debug/src/browser.js"(exports, module2) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { + "node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { let warned = false; return () => { if (!warned) { @@ -9848,7 +9813,7 @@ var require_browser = __commonJS({ } }; })(); - exports.colors = [ + exports2.colors = [ "#0000CC", "#0000FF", "#0033CC", @@ -9934,7 +9899,11 @@ var require_browser = __commonJS({ return false; } let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); @@ -9956,14 +9925,14 @@ var require_browser = __commonJS({ }); args.splice(lastC, 0, c); } - exports.log = console.debug || console.log || (() => { + exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { - exports.storage.setItem("debug", namespaces); + exports2.storage.setItem("debug", namespaces); } else { - exports.storage.removeItem("debug"); + exports2.storage.removeItem("debug"); } } catch (error) { } @@ -9971,7 +9940,7 @@ var require_browser = __commonJS({ function load() { let r; try { - r = exports.storage.getItem("debug"); + r = exports2.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { @@ -9985,7 +9954,7 @@ var require_browser = __commonJS({ } catch (error) { } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -9999,7 +9968,7 @@ var require_browser = __commonJS({ // node_modules/has-flag/index.js var require_has_flag = __commonJS({ - "node_modules/has-flag/index.js"(exports, module2) { + "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; @@ -10012,7 +9981,7 @@ var require_has_flag = __commonJS({ // node_modules/supports-color/index.js var require_supports_color = __commonJS({ - "node_modules/supports-color/index.js"(exports, module2) { + "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; var os = require("os"); var tty = require("tty"); @@ -10114,25 +10083,25 @@ var require_supports_color = __commonJS({ // node_modules/debug/src/node.js var require_node = __commonJS({ - "node_modules/debug/src/node.js"(exports, module2) { + "node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); - var util2 = require("util"); - exports.init = init; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util2.deprecate( + var util3 = require("util"); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util3.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); - exports.colors = [6, 2, 3, 4, 5, 1]; + exports2.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ + exports2.colors = [ 20, 21, 26, @@ -10213,7 +10182,7 @@ var require_node = __commonJS({ } } catch (error) { } - exports.inspectOpts = Object.keys(process.env).filter((key) => { + exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { @@ -10233,7 +10202,7 @@ var require_node = __commonJS({ return obj; }, {}); function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); } function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; @@ -10248,13 +10217,13 @@ var require_node = __commonJS({ } } function getDate() { - if (exports.inspectOpts.hideDate) { + if (exports2.inspectOpts.hideDate) { return ""; } - return new Date().toISOString() + " "; + return (/* @__PURE__ */ new Date()).toISOString() + " "; } function log(...args) { - return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { @@ -10268,27 +10237,27 @@ var require_node = __commonJS({ } function init(debug) { debug.inspectOpts = {}; - const keys = Object.keys(exports.inspectOpts); + const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts); + return util3.inspect(v, this.inspectOpts); }; } }); // node_modules/debug/src/index.js var require_src = __commonJS({ - "node_modules/debug/src/index.js"(exports, module2) { + "node_modules/debug/src/index.js"(exports2, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { @@ -10299,7 +10268,7 @@ var require_src = __commonJS({ // node_modules/follow-redirects/debug.js var require_debug = __commonJS({ - "node_modules/follow-redirects/debug.js"(exports, module2) { + "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug; module2.exports = function() { if (!debug) { @@ -10319,7 +10288,7 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ - "node_modules/follow-redirects/index.js"(exports, module2) { + "node_modules/follow-redirects/index.js"(exports2, module2) { var url2 = require("url"); var URL2 = url2.URL; var http2 = require("http"); @@ -10565,7 +10534,11 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path; + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path + ); if (this._isRedirect) { var i = 0; var self2 = this; @@ -10612,11 +10585,16 @@ var require_follow_redirects = __commonJS({ var beforeRedirect = this._options.beforeRedirect; if (beforeRedirect) { requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request Host: response.req.getHeader("host") }, this._options.headers); } var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { this._options.method = "GET"; this._requestBodyBuffers = []; removeMatchingHeaders(/^content-/i, this._options.headers); @@ -10648,7 +10626,7 @@ var require_follow_redirects = __commonJS({ this._performRequest(); }; function wrap(protocols) { - var exports2 = { + var exports3 = { maxRedirects: 21, maxBodyLength: 10 * 1024 * 1024 }; @@ -10656,7 +10634,7 @@ var require_follow_redirects = __commonJS({ Object.keys(protocols).forEach(function(scheme) { var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol); + var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol); function request(input, options, callback) { if (isURL(input)) { input = spreadUrlObject(input); @@ -10672,8 +10650,8 @@ var require_follow_redirects = __commonJS({ options = null; } options = Object.assign({ - maxRedirects: exports2.maxRedirects, - maxBodyLength: exports2.maxBodyLength + maxRedirects: exports3.maxRedirects, + maxBodyLength: exports3.maxBodyLength }, input, options); options.nativeProtocols = nativeProtocols; if (!isString2(options.host) && !isString2(options.hostname)) { @@ -10693,7 +10671,7 @@ var require_follow_redirects = __commonJS({ get: { value: get, configurable: true, enumerable: true, writable: true } }); }); - return exports2; + return exports3; } function noop2() { } @@ -10794,9 +10772,17 @@ var require_follow_redirects = __commonJS({ } }); +// node_modules/es-object-atoms/index.js +var require_es_object_atoms = __commonJS({ + "node_modules/es-object-atoms/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object; + } +}); + // node_modules/es-errors/index.js var require_es_errors = __commonJS({ - "node_modules/es-errors/index.js"(exports, module2) { + "node_modules/es-errors/index.js"(exports2, module2) { "use strict"; module2.exports = Error; } @@ -10804,7 +10790,7 @@ var require_es_errors = __commonJS({ // node_modules/es-errors/eval.js var require_eval = __commonJS({ - "node_modules/es-errors/eval.js"(exports, module2) { + "node_modules/es-errors/eval.js"(exports2, module2) { "use strict"; module2.exports = EvalError; } @@ -10812,7 +10798,7 @@ var require_eval = __commonJS({ // node_modules/es-errors/range.js var require_range = __commonJS({ - "node_modules/es-errors/range.js"(exports, module2) { + "node_modules/es-errors/range.js"(exports2, module2) { "use strict"; module2.exports = RangeError; } @@ -10820,7 +10806,7 @@ var require_range = __commonJS({ // node_modules/es-errors/ref.js var require_ref = __commonJS({ - "node_modules/es-errors/ref.js"(exports, module2) { + "node_modules/es-errors/ref.js"(exports2, module2) { "use strict"; module2.exports = ReferenceError; } @@ -10828,7 +10814,7 @@ var require_ref = __commonJS({ // node_modules/es-errors/syntax.js var require_syntax = __commonJS({ - "node_modules/es-errors/syntax.js"(exports, module2) { + "node_modules/es-errors/syntax.js"(exports2, module2) { "use strict"; module2.exports = SyntaxError; } @@ -10836,7 +10822,7 @@ var require_syntax = __commonJS({ // node_modules/es-errors/type.js var require_type = __commonJS({ - "node_modules/es-errors/type.js"(exports, module2) { + "node_modules/es-errors/type.js"(exports2, module2) { "use strict"; module2.exports = TypeError; } @@ -10844,15 +10830,127 @@ var require_type = __commonJS({ // node_modules/es-errors/uri.js var require_uri = __commonJS({ - "node_modules/es-errors/uri.js"(exports, module2) { + "node_modules/es-errors/uri.js"(exports2, module2) { "use strict"; module2.exports = URIError; } }); +// node_modules/math-intrinsics/abs.js +var require_abs = __commonJS({ + "node_modules/math-intrinsics/abs.js"(exports2, module2) { + "use strict"; + module2.exports = Math.abs; + } +}); + +// node_modules/math-intrinsics/floor.js +var require_floor = __commonJS({ + "node_modules/math-intrinsics/floor.js"(exports2, module2) { + "use strict"; + module2.exports = Math.floor; + } +}); + +// node_modules/math-intrinsics/max.js +var require_max = __commonJS({ + "node_modules/math-intrinsics/max.js"(exports2, module2) { + "use strict"; + module2.exports = Math.max; + } +}); + +// node_modules/math-intrinsics/min.js +var require_min = __commonJS({ + "node_modules/math-intrinsics/min.js"(exports2, module2) { + "use strict"; + module2.exports = Math.min; + } +}); + +// node_modules/math-intrinsics/pow.js +var require_pow = __commonJS({ + "node_modules/math-intrinsics/pow.js"(exports2, module2) { + "use strict"; + module2.exports = Math.pow; + } +}); + +// node_modules/math-intrinsics/round.js +var require_round = __commonJS({ + "node_modules/math-intrinsics/round.js"(exports2, module2) { + "use strict"; + module2.exports = Math.round; + } +}); + +// node_modules/math-intrinsics/isNaN.js +var require_isNaN = __commonJS({ + "node_modules/math-intrinsics/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// node_modules/math-intrinsics/sign.js +var require_sign = __commonJS({ + "node_modules/math-intrinsics/sign.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : 1; + }; + } +}); + +// node_modules/gopd/gOPD.js +var require_gOPD = __commonJS({ + "node_modules/gopd/gOPD.js"(exports2, module2) { + "use strict"; + module2.exports = Object.getOwnPropertyDescriptor; + } +}); + +// node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + var $gOPD = require_gOPD(); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// node_modules/es-define-property/index.js +var require_es_define_property = __commonJS({ + "node_modules/es-define-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = Object.defineProperty || false; + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } + } + module2.exports = $defineProperty; + } +}); + // node_modules/has-symbols/shams.js var require_shams = __commonJS({ - "node_modules/has-symbols/shams.js"(exports, module2) { + "node_modules/has-symbols/shams.js"(exports2, module2) { "use strict"; module2.exports = function hasSymbols() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { @@ -10875,7 +10973,7 @@ var require_shams = __commonJS({ } var symVal = 42; obj[sym] = symVal; - for (sym in obj) { + for (var _ in obj) { return false; } if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { @@ -10892,7 +10990,10 @@ var require_shams = __commonJS({ return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj, sym) + ); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } @@ -10904,7 +11005,7 @@ var require_shams = __commonJS({ // node_modules/has-symbols/index.js var require_has_symbols = __commonJS({ - "node_modules/has-symbols/index.js"(exports, module2) { + "node_modules/has-symbols/index.js"(exports2, module2) { "use strict"; var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = require_shams(); @@ -10926,24 +11027,26 @@ var require_has_symbols = __commonJS({ } }); -// node_modules/has-proto/index.js -var require_has_proto = __commonJS({ - "node_modules/has-proto/index.js"(exports, module2) { +// node_modules/get-proto/Reflect.getPrototypeOf.js +var require_Reflect_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { "use strict"; - var test2 = { - __proto__: null, - foo: {} - }; - var $Object = Object; - module2.exports = function hasProto() { - return { __proto__: test2 }.foo === test2.foo && !(test2 instanceof $Object); - }; + module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; + } +}); + +// node_modules/get-proto/Object.getPrototypeOf.js +var require_Object_getPrototypeOf = __commonJS({ + "node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { + "use strict"; + var $Object = require_es_object_atoms(); + module2.exports = $Object.getPrototypeOf || null; } }); // node_modules/function-bind/implementation.js var require_implementation = __commonJS({ - "node_modules/function-bind/implementation.js"(exports, module2) { + "node_modules/function-bind/implementation.js"(exports2, module2) { "use strict"; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; @@ -11019,16 +11122,120 @@ var require_implementation = __commonJS({ // node_modules/function-bind/index.js var require_function_bind = __commonJS({ - "node_modules/function-bind/index.js"(exports, module2) { + "node_modules/function-bind/index.js"(exports2, module2) { "use strict"; var implementation = require_implementation(); module2.exports = Function.prototype.bind || implementation; } }); +// node_modules/call-bind-apply-helpers/functionCall.js +var require_functionCall = __commonJS({ + "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.call; + } +}); + +// node_modules/call-bind-apply-helpers/functionApply.js +var require_functionApply = __commonJS({ + "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.apply; + } +}); + +// node_modules/call-bind-apply-helpers/reflectApply.js +var require_reflectApply = __commonJS({ + "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; + } +}); + +// node_modules/call-bind-apply-helpers/actualApply.js +var require_actualApply = __commonJS({ + "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var $reflectApply = require_reflectApply(); + module2.exports = $reflectApply || bind2.call($call, $apply); + } +}); + +// node_modules/call-bind-apply-helpers/index.js +var require_call_bind_apply_helpers = __commonJS({ + "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { + "use strict"; + var bind2 = require_function_bind(); + var $TypeError = require_type(); + var $call = require_functionCall(); + var $actualApply = require_actualApply(); + module2.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== "function") { + throw new $TypeError("a function is required"); + } + return $actualApply(bind2, $call, args); + }; + } +}); + +// node_modules/dunder-proto/get.js +var require_get = __commonJS({ + "node_modules/dunder-proto/get.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind_apply_helpers(); + var gOPD = require_gopd(); + var hasProtoAccessor; + try { + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; + } catch (e) { + if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { + throw e; + } + } + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ); + var $Object = Object; + var $getPrototypeOf = $Object.getPrototypeOf; + module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( + /** @type {import('./get')} */ + function getDunder(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); + } + ) : false; + } +}); + +// node_modules/get-proto/index.js +var require_get_proto = __commonJS({ + "node_modules/get-proto/index.js"(exports2, module2) { + "use strict"; + var reflectGetProto = require_Reflect_getPrototypeOf(); + var originalGetProto = require_Object_getPrototypeOf(); + var getDunderProto = require_get(); + module2.exports = reflectGetProto ? function getProto(O) { + return reflectGetProto(O); + } : originalGetProto ? function getProto(O) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new TypeError("getProto: not an object"); + } + return originalGetProto(O); + } : getDunderProto ? function getProto(O) { + return getDunderProto(O); + } : null; + } +}); + // node_modules/hasown/index.js var require_hasown = __commonJS({ - "node_modules/hasown/index.js"(exports, module2) { + "node_modules/hasown/index.js"(exports2, module2) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; @@ -11039,9 +11246,10 @@ var require_hasown = __commonJS({ // node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ - "node_modules/get-intrinsic/index.js"(exports, module2) { + "node_modules/get-intrinsic/index.js"(exports2, module2) { "use strict"; var undefined2; + var $Object = require_es_object_atoms(); var $Error = require_es_errors(); var $EvalError = require_eval(); var $RangeError = require_range(); @@ -11049,6 +11257,13 @@ var require_get_intrinsic = __commonJS({ var $SyntaxError = require_syntax(); var $TypeError = require_type(); var $URIError = require_uri(); + var abs = require_abs(); + var floor = require_floor(); + var max = require_max(); + var min = require_min(); + var pow = require_pow(); + var round = require_round(); + var sign = require_sign(); var $Function = Function; var getEvalledConstructor = function(expressionSyntax) { try { @@ -11056,14 +11271,8 @@ var require_get_intrinsic = __commonJS({ } catch (e) { } }; - var $gOPD = Object.getOwnPropertyDescriptor; - if ($gOPD) { - try { - $gOPD({}, ""); - } catch (e) { - $gOPD = null; - } - } + var $gOPD = require_gopd(); + var $defineProperty = require_es_define_property(); var throwTypeError = function() { throw new $TypeError(); }; @@ -11080,10 +11289,11 @@ var require_get_intrinsic = __commonJS({ } }() : throwTypeError; var hasSymbols = require_has_symbols()(); - var hasProto = require_has_proto()(); - var getProto = Object.getPrototypeOf || (hasProto ? function(x) { - return x.__proto__; - } : null); + var getProto = require_get_proto(); + var $ObjectGPO = require_Object_getPrototypeOf(); + var $ReflectGPO = require_Reflect_getPrototypeOf(); + var $apply = require_functionApply(); + var $call = require_functionCall(); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); var INTRINSICS = { @@ -11110,7 +11320,9 @@ var require_get_intrinsic = __commonJS({ "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, + // eslint-disable-line no-eval "%EvalError%": $EvalError, + "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, @@ -11127,7 +11339,8 @@ var require_get_intrinsic = __commonJS({ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, - "%Object%": Object, + "%Object%": $Object, + "%Object.getOwnPropertyDescriptor%": $gOPD, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, @@ -11153,7 +11366,19 @@ var require_get_intrinsic = __commonJS({ "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, - "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, + "%Function.prototype.call%": $call, + "%Function.prototype.apply%": $apply, + "%Object.defineProperty%": $defineProperty, + "%Object.getPrototypeOf%": $ObjectGPO, + "%Math.abs%": abs, + "%Math.floor%": floor, + "%Math.max%": max, + "%Math.min%": min, + "%Math.pow%": pow, + "%Math.round%": round, + "%Math.sign%": sign, + "%Reflect.getPrototypeOf%": $ReflectGPO }; if (getProto) { try { @@ -11242,11 +11467,11 @@ var require_get_intrinsic = __commonJS({ }; var bind2 = require_function_bind(); var hasOwn = require_hasown(); - var $concat = bind2.call(Function.call, Array.prototype.concat); - var $spliceApply = bind2.call(Function.apply, Array.prototype.splice); - var $replace = bind2.call(Function.call, String.prototype.replace); - var $strSlice = bind2.call(Function.call, String.prototype.slice); - var $exec = bind2.call(Function.call, RegExp.prototype.exec); + var $concat = bind2.call($call, Array.prototype.concat); + var $spliceApply = bind2.call($apply, Array.prototype.splice); + var $replace = bind2.call($call, String.prototype.replace); + var $strSlice = bind2.call($call, String.prototype.slice); + var $exec = bind2.call($call, RegExp.prototype.exec); var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; var stringToPath = function stringToPath2(string) { @@ -11326,7 +11551,7 @@ var require_get_intrinsic = __commonJS({ if (!allowMissing) { throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); } - return void 0; + return void undefined2; } if ($gOPD && i + 1 >= parts.length) { var desc = $gOPD(value, part); @@ -11350,43 +11575,9 @@ var require_get_intrinsic = __commonJS({ } }); -// node_modules/es-define-property/index.js -var require_es_define_property = __commonJS({ - "node_modules/es-define-property/index.js"(exports, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false; - if ($defineProperty) { - try { - $defineProperty({}, "a", { value: 1 }); - } catch (e) { - $defineProperty = false; - } - } - module2.exports = $defineProperty; - } -}); - -// node_modules/gopd/index.js -var require_gopd = __commonJS({ - "node_modules/gopd/index.js"(exports, module2) { - "use strict"; - var GetIntrinsic = require_get_intrinsic(); - var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); - if ($gOPD) { - try { - $gOPD([], "length"); - } catch (e) { - $gOPD = null; - } - } - module2.exports = $gOPD; - } -}); - // node_modules/define-data-property/index.js var require_define_data_property = __commonJS({ - "node_modules/define-data-property/index.js"(exports, module2) { + "node_modules/define-data-property/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var $SyntaxError = require_syntax(); @@ -11434,7 +11625,7 @@ var require_define_data_property = __commonJS({ // node_modules/has-property-descriptors/index.js var require_has_property_descriptors = __commonJS({ - "node_modules/has-property-descriptors/index.js"(exports, module2) { + "node_modules/has-property-descriptors/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var hasPropertyDescriptors = function hasPropertyDescriptors2() { @@ -11456,7 +11647,7 @@ var require_has_property_descriptors = __commonJS({ // node_modules/set-function-length/index.js var require_set_function_length = __commonJS({ - "node_modules/set-function-length/index.js"(exports, module2) { + "node_modules/set-function-length/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var define = require_define_data_property(); @@ -11485,9 +11676,21 @@ var require_set_function_length = __commonJS({ } if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { - define(fn, "length", length, true, true); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); } else { - define(fn, "length", length); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); } } return fn; @@ -11497,7 +11700,7 @@ var require_set_function_length = __commonJS({ // node_modules/call-bind/index.js var require_call_bind = __commonJS({ - "node_modules/call-bind/index.js"(exports, module2) { + "node_modules/call-bind/index.js"(exports2, module2) { "use strict"; var bind2 = require_function_bind(); var GetIntrinsic = require_get_intrinsic(); @@ -11532,7 +11735,7 @@ var require_call_bind = __commonJS({ // node_modules/call-bind/callBound.js var require_callBound = __commonJS({ - "node_modules/call-bind/callBound.js"(exports, module2) { + "node_modules/call-bind/callBound.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBind = require_call_bind(); @@ -11549,14 +11752,14 @@ var require_callBound = __commonJS({ // node_modules/object-inspect/util.inspect.js var require_util_inspect = __commonJS({ - "node_modules/object-inspect/util.inspect.js"(exports, module2) { + "node_modules/object-inspect/util.inspect.js"(exports2, module2) { module2.exports = require("util").inspect; } }); // node_modules/object-inspect/index.js var require_object_inspect = __commonJS({ - "node_modules/object-inspect/index.js"(exports, module2) { + "node_modules/object-inspect/index.js"(exports2, module2) { var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; @@ -12071,7 +12274,7 @@ var require_object_inspect = __commonJS({ // node_modules/side-channel/index.js var require_side_channel = __commonJS({ - "node_modules/side-channel/index.js"(exports, module2) { + "node_modules/side-channel/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBound = require_callBound(); @@ -12091,7 +12294,8 @@ var require_side_channel = __commonJS({ for (; (curr = prev.next) !== null; prev = curr) { if (curr.key === key) { prev.next = curr.next; - curr.next = list.next; + curr.next = /** @type {NonNullable} */ + list.next; list.next = curr; return curr; } @@ -12106,7 +12310,9 @@ var require_side_channel = __commonJS({ if (node) { node.value = value; } else { - objects.next = { + objects.next = /** @type {import('.').ListNode} */ + { + // eslint-disable-line no-param-reassign, no-extra-parens key, next: objects.next, value @@ -12183,7 +12389,7 @@ var require_side_channel = __commonJS({ // node_modules/qs/lib/formats.js var require_formats = __commonJS({ - "node_modules/qs/lib/formats.js"(exports, module2) { + "node_modules/qs/lib/formats.js"(exports2, module2) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; @@ -12209,7 +12415,7 @@ var require_formats = __commonJS({ // node_modules/qs/lib/utils.js var require_utils = __commonJS({ - "node_modules/qs/lib/utils.js"(exports, module2) { + "node_modules/qs/lib/utils.js"(exports2, module2) { "use strict"; var formats = require_formats(); var has = Object.prototype.hasOwnProperty; @@ -12414,7 +12620,7 @@ var require_utils = __commonJS({ // node_modules/qs/lib/stringify.js var require_stringify = __commonJS({ - "node_modules/qs/lib/stringify.js"(exports, module2) { + "node_modules/qs/lib/stringify.js"(exports2, module2) { "use strict"; var getSideChannel = require_side_channel(); var utils = require_utils(); @@ -12453,6 +12659,7 @@ var require_stringify = __commonJS({ encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], + // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); @@ -12693,7 +12900,7 @@ var require_stringify = __commonJS({ // node_modules/qs/lib/parse.js var require_parse = __commonJS({ - "node_modules/qs/lib/parse.js"(exports, module2) { + "node_modules/qs/lib/parse.js"(exports2, module2) { "use strict"; var utils = require_utils(); var has = Object.prototype.hasOwnProperty; @@ -12885,6 +13092,7 @@ var require_parse = __commonJS({ decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults2.decodeDotInKeys, decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder, delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth, duplicates, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, @@ -12919,7 +13127,7 @@ var require_parse = __commonJS({ // node_modules/qs/lib/index.js var require_lib = __commonJS({ - "node_modules/qs/lib/index.js"(exports, module2) { + "node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; var stringify = require_stringify(); var parse = require_parse(); @@ -13015,6 +13223,10 @@ __export(api_exports, { SignatureRequestBulkSendWithTemplateRequest: () => SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest: () => SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest: () => SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest: () => SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest: () => SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest: () => SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest: () => SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse: () => SignatureRequestGetResponse, SignatureRequestListResponse: () => SignatureRequestListResponse, SignatureRequestRemindRequest: () => SignatureRequestRemindRequest, @@ -13163,7 +13375,7 @@ function bind(fn, thisArg) { // node_modules/axios/lib/utils.js var { toString } = Object.prototype; var { getPrototypeOf } = Object; -var kindOf = ((cache) => (thing) => { +var kindOf = /* @__PURE__ */ ((cache) => (thing) => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); @@ -13206,7 +13418,8 @@ var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); + return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); @@ -13248,8 +13461,7 @@ function findKey(obj, key) { return null; } var _global = (() => { - if (typeof globalThis !== "undefined") - return globalThis; + if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; })(); var isContextDefined = (context) => !isUndefined(context) && context !== _global; @@ -13303,8 +13515,7 @@ var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { let prop; const merged = {}; destObj = destObj || {}; - if (sourceObj == null) - return destObj; + if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; @@ -13329,20 +13540,17 @@ var endsWith = (str, searchString, position) => { return lastIndex !== -1 && lastIndex === position; }; var toArray = (thing) => { - if (!thing) - return null; - if (isArray(thing)) - return thing; + if (!thing) return null; + if (isArray(thing)) return thing; let i = thing.length; - if (!isNumber(i)) - return null; + if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; }; -var isTypedArray = ((TypedArray) => { +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { return (thing) => { return TypedArray && thing instanceof TypedArray; }; @@ -13392,8 +13600,7 @@ var freezeMethods = (obj) => { return false; } const value = obj[name]; - if (!isFunction(value)) - return; + if (!isFunction(value)) return; descriptor.enumerable = false; if ("writable" in descriptor) { descriptor.writable = false; @@ -13421,21 +13628,6 @@ var noop = () => { var toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; -var ALPHA = "abcdefghijklmnopqrstuvwxyz"; -var DIGIT = "0123456789"; -var ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ""; - const { length } = alphabet; - while (size--) { - str += alphabet[Math.random() * length | 0]; - } - return str; -}; function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); } @@ -13524,6 +13716,7 @@ var utils_default = { isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors, freezeMethods, toObjectSet, @@ -13533,8 +13726,6 @@ var utils_default = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, @@ -13564,14 +13755,18 @@ function AxiosError(message, code, config, request, response) { utils_default.inherits(AxiosError, Error, { toJSON: function toJSON() { return { + // Standard message: this.message, name: this.name, + // Microsoft description: this.description, number: this.number, + // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, + // Axios config: utils_default.toJSONObject(this.config), code: this.code, status: this.status @@ -13593,6 +13788,7 @@ var descriptors = {}; "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" + // eslint-disable-next-line func-names ].forEach((code) => { descriptors[code] = { value: code }; }); @@ -13625,8 +13821,7 @@ function removeBrackets(key) { return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } function renderKey(path, key, dots) { - if (!path) - return key; + if (!path) return key; return path.concat(key).map(function each(token, i) { token = removeBrackets(token); return !dots && i ? "[" + token + "]" : token; @@ -13660,8 +13855,7 @@ function toFormData(obj, formData2, options) { throw new TypeError("visitor must be a function"); } function convertValue(value) { - if (value === null) - return ""; + if (value === null) return ""; if (utils_default.isDate(value)) { return value.toISOString(); } @@ -13683,6 +13877,7 @@ function toFormData(obj, formData2, options) { key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils_default.isUndefined(el) || el === null) && formData2.append( + // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el) ); @@ -13703,8 +13898,7 @@ function toFormData(obj, formData2, options) { isVisitable }); function build(value, path) { - if (utils_default.isUndefined(value)) - return; + if (utils_default.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error("Circular reference detected in " + path.join(".")); } @@ -13773,6 +13967,11 @@ function buildURL(url2, params, options) { return url2; } const _encode = options && options.encode || encode2; + if (utils_default.isFunction(options)) { + options = { + serialize: options + }; + } const serializeFn = options && options.serialize; let serializedParams; if (serializeFn) { @@ -13795,6 +13994,14 @@ var InterceptorManager = class { constructor() { this.handlers = []; } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ use(fulfilled, rejected, options) { this.handlers.push({ fulfilled, @@ -13804,16 +14011,38 @@ var InterceptorManager = class { }); return this.handlers.length - 1; } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ clear() { if (this.handlers) { this.handlers = []; } } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ forEach(fn) { utils_default.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { @@ -13831,11 +14060,31 @@ var transitional_default = { clarifyTimeoutError: false }; +// node_modules/axios/lib/platform/node/index.js +var import_crypto = __toESM(require("crypto"), 1); + // node_modules/axios/lib/platform/node/classes/URLSearchParams.js var import_url = __toESM(require("url"), 1); var URLSearchParams_default = import_url.default.URLSearchParams; // node_modules/axios/lib/platform/node/index.js +var ALPHA = "abcdefghijklmnopqrstuvwxyz"; +var DIGIT = "0123456789"; +var ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; +var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ""; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + import_crypto.default.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + return str; +}; var node_default = { isNode: true, classes: { @@ -13843,6 +14092,8 @@ var node_default = { FormData: FormData_default, Blob: typeof Blob !== "undefined" && Blob || null }, + ALPHABET, + generateString, protocols: ["http", "https", "file", "data"] }; @@ -13859,7 +14110,8 @@ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefi var _navigator = typeof navigator === "object" && navigator || void 0; var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); var hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; })(); var origin = hasBrowserEnv && window.location.href || "http://localhost"; @@ -13903,8 +14155,7 @@ function arrayToObject(arr) { function formDataToJSON(formData2) { function buildPath(path, value, target, index) { let name = path[index++]; - if (name === "__proto__") - return true; + if (name === "__proto__") return true; const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils_default.isArray(target) ? target.length : name; @@ -14017,6 +14268,10 @@ var defaults = { } return data; }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", @@ -14114,8 +14369,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { if (isHeaderNameFilter) { value = header; } - if (!utils_default.isString(value)) - return; + if (!utils_default.isString(value)) return; if (utils_default.isString(filter2)) { return value.indexOf(filter2) !== -1; } @@ -14363,8 +14617,9 @@ function combineURLs(baseURL, relativeURL) { } // node_modules/axios/lib/core/buildFullPath.js -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; @@ -14379,7 +14634,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.7.5"; +var VERSION = "1.8.4"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url2) { @@ -14538,7 +14793,7 @@ var AxiosTransformStream_default = AxiosTransformStream; var import_events = require("events"); // node_modules/axios/lib/helpers/formDataToStream.js -var import_util = require("util"); +var import_util = __toESM(require("util"), 1); var import_stream2 = require("stream"); // node_modules/axios/lib/helpers/readBlob.js @@ -14557,8 +14812,8 @@ var readBlob = async function* (blob) { var readBlob_default = readBlob; // node_modules/axios/lib/helpers/formDataToStream.js -var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_"; -var textEncoder = new import_util.TextEncoder(); +var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_"; +var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new import_util.default.TextEncoder(); var CRLF = "\r\n"; var CRLF_BYTES = textEncoder.encode(CRLF); var CRLF_BYTES_COUNT = 2; @@ -14600,7 +14855,7 @@ var formDataToStream = (form, headersHandler, options) => { const { tag = "form-data-boundary", size = 25, - boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET) + boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {}; if (!utils_default.isFormData(form)) { throw TypeError("FormData instance required"); @@ -14808,7 +15063,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location); + const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } @@ -14844,8 +15099,7 @@ var wrapAsync = (asyncExecutor) => { let onDone; let isDone; const done = (value, isRejected) => { - if (isDone) - return; + if (isDone) return; isDone = true; onDone && onDone(value, isRejected); }; @@ -14917,7 +15171,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort); } } - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); const protocol = parsed.protocol || supportedProtocols[0]; if (protocol === "data:") { @@ -14983,7 +15237,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { } catch (e) { } } - } else if (utils_default.isBlob(data)) { + } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { data.size && headers.setContentType(data.type || "application/octet-stream"); headers.setContentLength(data.size || 0); data = import_stream4.default.Readable.from(readBlob_default(data)); @@ -15077,7 +15331,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { if (config.socketPath) { options.socketPath = config.socketPath; } else { - options.hostname = parsed.hostname; + options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; options.port = parsed.port; setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path); } @@ -15106,8 +15360,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { options.insecureHTTPParser = config.insecureHTTPParser; } req = transport.request(options, function handleResponse(res) { - if (req.destroyed) - return; + if (req.destroyed) return; const streams = [res]; const responseLength = +res.headers["content-length"]; if (onDownloadProgress || maxDownloadRate) { @@ -15130,6 +15383,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { delete res.headers["content-encoding"]; } switch ((res.headers["content-encoding"] || "").toLowerCase()) { + /*eslint default-case:0*/ case "gzip": case "x-gzip": case "compress": @@ -15186,7 +15440,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } const err = new AxiosError_default( - "maxContentLength size of " + config.maxContentLength + " exceeded", + "stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest @@ -15195,8 +15449,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { reject(err); }); responseStream.on("error", function handleStreamError(err) { - if (req.destroyed) - return; + if (req.destroyed) return; reject(AxiosError_default.from(err, null, config, lastRequest)); }); responseStream.on("end", function handleStreamEnd() { @@ -15244,8 +15497,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) - return; + if (isDone) return; let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded"; const transitional2 = config.transitional || transitional_default; if (config.timeoutErrorMessage) { @@ -15283,72 +15535,53 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { }; // node_modules/axios/lib/helpers/isURLSameOrigin.js -var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() { - const msie = platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent); - const urlParsingNode = document.createElement("a"); - let originURL; - function resolveURL(url2) { - let href = url2; - if (msie) { - urlParsingNode.setAttribute("href", href); - href = urlParsingNode.href; - } - urlParsingNode.setAttribute("href", href); - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "", - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "", - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "", - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname - }; - } - originURL = resolveURL(window.location.href); - return function isURLSameOrigin(requestURL) { - const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL; - return parsed.protocol === originURL.protocol && parsed.host === originURL.host; - }; -}() : function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; -}(); +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); +})( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) +) : () => true; // node_modules/axios/lib/helpers/cookies.js -var cookies_default = platform_default.hasStandardBrowserEnv ? { - write(name, value, expires, path, domain, secure) { - const cookie = [name + "=" + encodeURIComponent(value)]; - utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); - utils_default.isString(path) && cookie.push("path=" + path); - utils_default.isString(domain) && cookie.push("domain=" + domain); - secure === true && cookie.push("secure"); - document.cookie = cookie.join("; "); - }, - read(name) { - const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); - return match ? decodeURIComponent(match[3]) : null; - }, - remove(name) { - this.write(name, "", Date.now() - 864e5); +var cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + "=" + encodeURIComponent(value)]; + utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); + utils_default.isString(path) && cookie.push("path=" + path); + utils_default.isString(domain) && cookie.push("domain=" + domain); + secure === true && cookie.push("secure"); + document.cookie = cookie.join("; "); + }, + read(name) { + const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); + return match ? decodeURIComponent(match[3]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5); + } } -} : { - write() { - }, - read() { - return null; - }, - remove() { +) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } } -}; +); // node_modules/axios/lib/core/mergeConfig.js var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; function mergeConfig(config1, config2) { config2 = config2 || {}; const config = {}; - function getMergedValue(target, source, caseless) { + function getMergedValue(target, source, prop, caseless) { if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { return utils_default.merge.call({ caseless }, target, source); } else if (utils_default.isPlainObject(source)) { @@ -15358,11 +15591,11 @@ function mergeConfig(config1, config2) { } return source; } - function mergeDeepProperties(a, b, caseless) { + function mergeDeepProperties(a, b, prop, caseless) { if (!utils_default.isUndefined(b)) { - return getMergedValue(a, b, caseless); + return getMergedValue(a, b, prop, caseless); } else if (!utils_default.isUndefined(a)) { - return getMergedValue(void 0, a, caseless); + return getMergedValue(void 0, a, prop, caseless); } } function valueFromConfig2(a, b) { @@ -15413,7 +15646,7 @@ function mergeConfig(config1, config2) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) }; utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; @@ -15428,7 +15661,7 @@ var resolveConfig_default = (config) => { const newConfig = mergeConfig({}, config); let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; newConfig.headers = headers = AxiosHeaders_default.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); if (auth) { headers.set( "Authorization", @@ -15585,39 +15818,40 @@ var xhr_default = isXHRAdapterSupported && function(config) { // node_modules/axios/lib/helpers/composeSignals.js var composeSignals = (signals, timeout) => { - let controller = new AbortController(); - let aborted; - const onabort = function(cancel) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = cancel instanceof Error ? cancel : this.reason; - controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); - } - }; - let timer = timeout && setTimeout(() => { - onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted; + const onabort = function(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); + } + }; + let timer = timeout && setTimeout(() => { timer = null; - signals.forEach((signal2) => { - signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort)); - }); - signals = null; - } - }; - signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort)); - const { signal } = controller; - signal.unsubscribe = unsubscribe; - return [signal, () => { - timer && clearTimeout(timer); - timer = null; - }]; -}; -var composeSignals_default = composeSignals; - + onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }; + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } +}; +var composeSignals_default = composeSignals; + // node_modules/axios/lib/helpers/trackStream.js var streamChunk = function* (chunk, chunkSize) { let len = chunk.byteLength; @@ -15633,13 +15867,31 @@ var streamChunk = function* (chunk, chunkSize) { pos = end; } }; -var readBytes = async function* (iterable, chunkSize, encode3) { - for await (const chunk of iterable) { - yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize); +var readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; +var readStream = async function* (stream4) { + if (stream4[Symbol.asyncIterator]) { + yield* stream4; + return; + } + const reader = stream4.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); } }; -var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { - const iterator = readBytes(stream4, chunkSize, encode3); +var trackStream = (stream4, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream4, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { @@ -15680,7 +15932,7 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { // node_modules/axios/lib/adapters/fetch.js var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function"; var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function"; -var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); +var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); var test = (fn, ...args) => { try { return !!fn(...args); @@ -15720,7 +15972,11 @@ var getBodyLength = async (body) => { return body.size; } if (utils_default.isSpecCompliantForm(body)) { - return (await new Request(body).arrayBuffer()).byteLength; + const _request = new Request(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; } if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { return body.byteLength; @@ -15752,14 +16008,11 @@ var fetch_default = isFetchSupported && (async (config) => { fetchOptions } = resolveConfig_default(config); responseType = responseType ? (responseType + "").toLowerCase() : "text"; - let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : []; - let finished, request; - const onFinish = () => { - !finished && setTimeout(() => { - composedSignal && composedSignal.unsubscribe(); - }); - finished = true; - }; + let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + let request; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); let requestContentLength; try { if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { @@ -15777,7 +16030,7 @@ var fetch_default = isFetchSupported && (async (config) => { requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)) ); - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } } if (!utils_default.isString(withCredentials)) { @@ -15795,7 +16048,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); let response = await fetch(request); const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); - if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) { + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { const options = {}; ["status", "statusText", "headers"].forEach((prop) => { options[prop] = response[prop]; @@ -15808,15 +16061,14 @@ var fetch_default = isFetchSupported && (async (config) => { response = new Response( trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { flush && flush(); - isStreamResponse && onFinish(); - }, encodeText), + unsubscribe && unsubscribe(); + }), options ); } responseType = responseType || "text"; let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config); - !isStreamResponse && onFinish(); - stopTimeout && stopTimeout(); + !isStreamResponse && unsubscribe && unsubscribe(); return await new Promise((resolve, reject) => { settle(resolve, reject, { data: responseData, @@ -15828,7 +16080,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); }); } catch (err) { - onFinish(); + unsubscribe && unsubscribe(); if (err && err.name === "TypeError" && /fetch/i.test(err.message)) { throw Object.assign( new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), @@ -15971,6 +16223,12 @@ validators.transitional = function transitional(validator, version, message) { return validator ? validator(value, opt, opts) : true; }; }; +validators.spelling = function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; function assertOptions(options, schema, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); @@ -16008,13 +16266,21 @@ var Axios = class { response: new InterceptorManager_default() }; } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ async request(configOrUrl, config) { try { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy; - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error(); + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; try { if (!err.stack) { @@ -16056,6 +16322,16 @@ var Axios = class { }, true); } } + if (config.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + validator_default.assertOptions(config, { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, true); config.method = (config.method || this.defaults.method || "get").toLowerCase(); let contextHeaders = headers && utils_default.merge( headers.common, @@ -16122,7 +16398,7 @@ var Axios = class { } getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } }; @@ -16154,7 +16430,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m var Axios_default = Axios; // node_modules/axios/lib/cancel/CancelToken.js -var CancelToken = class { +var CancelToken = class _CancelToken { constructor(executor) { if (typeof executor !== "function") { throw new TypeError("executor must be a function."); @@ -16165,8 +16441,7 @@ var CancelToken = class { }); const token = this; this.promise.then((cancel) => { - if (!token._listeners) - return; + if (!token._listeners) return; let i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); @@ -16192,11 +16467,17 @@ var CancelToken = class { resolvePromise(token.reason); }); } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ throwIfRequested() { if (this.reason) { throw this.reason; } } + /** + * Subscribe to the cancel signal + */ subscribe(listener) { if (this.reason) { listener(this.reason); @@ -16208,6 +16489,9 @@ var CancelToken = class { this._listeners = [listener]; } } + /** + * Unsubscribe from the cancel signal + */ unsubscribe(listener) { if (!this._listeners) { return; @@ -16217,9 +16501,22 @@ var CancelToken = class { this._listeners.splice(index, 1); } } + toAbortSignal() { + const controller = new AbortController(); + const abort = (err) => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ static source() { let cancel; - const token = new CancelToken(function executor(c) { + const token = new _CancelToken(function executor(c) { cancel = c; }); return { @@ -16367,563 +16664,709 @@ var { } = axios_default; // model/accountCreateRequest.ts -var _AccountCreateRequest = class { +var AccountCreateRequest = class _AccountCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateRequest"); } }; -var AccountCreateRequest = _AccountCreateRequest; -AccountCreateRequest.discriminator = void 0; -AccountCreateRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountCreateResponse.ts -var _AccountCreateResponse = class { +var AccountCreateResponse = class _AccountCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "oauthData", + baseName: "oauth_data", + type: "OAuthTokenResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateResponse"); } }; -var AccountCreateResponse = _AccountCreateResponse; -AccountCreateResponse.discriminator = void 0; -AccountCreateResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "oauthData", - baseName: "oauth_data", - type: "OAuthTokenResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountGetResponse.ts -var _AccountGetResponse = class { +var AccountGetResponse = class _AccountGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountGetResponse"); } }; -var AccountGetResponse = _AccountGetResponse; -AccountGetResponse.discriminator = void 0; -AccountGetResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountResponse.ts -var _AccountResponse = class { +var AccountResponse = class _AccountResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "AccountResponseQuotas" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "roleCode", + baseName: "role_code", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + }, + { + name: "usage", + baseName: "usage", + type: "AccountResponseUsage" + } + ]; + } static getAttributeTypeMap() { return _AccountResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponse"); } }; -var AccountResponse = _AccountResponse; -AccountResponse.discriminator = void 0; -AccountResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "AccountResponseQuotas" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "roleCode", - baseName: "role_code", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - }, - { - name: "usage", - baseName: "usage", - type: "AccountResponseUsage" - } -]; // model/accountResponseQuotas.ts -var _AccountResponseQuotas = class { +var AccountResponseQuotas = class _AccountResponseQuotas { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "templatesTotal", + baseName: "templates_total", + type: "number" + }, + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + }, + { + name: "numFaxPagesLeft", + baseName: "num_fax_pages_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseQuotas.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseQuotas"); } }; -var AccountResponseQuotas = _AccountResponseQuotas; -AccountResponseQuotas.discriminator = void 0; -AccountResponseQuotas.attributeTypeMap = [ - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "templatesTotal", - baseName: "templates_total", - type: "number" - }, - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - }, - { - name: "numFaxPagesLeft", - baseName: "num_fax_pages_left", - type: "number" - } -]; // model/accountResponseUsage.ts -var _AccountResponseUsage = class { +var AccountResponseUsage = class _AccountResponseUsage { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxPagesSent", + baseName: "fax_pages_sent", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseUsage.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseUsage"); } }; -var AccountResponseUsage = _AccountResponseUsage; -AccountResponseUsage.discriminator = void 0; -AccountResponseUsage.attributeTypeMap = [ - { - name: "faxPagesSent", - baseName: "fax_pages_sent", - type: "number" - } -]; // model/accountUpdateRequest.ts -var _AccountUpdateRequest = class { +var AccountUpdateRequest = class _AccountUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountUpdateRequest"); } }; -var AccountUpdateRequest = _AccountUpdateRequest; -AccountUpdateRequest.discriminator = void 0; -AccountUpdateRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountVerifyRequest.ts -var _AccountVerifyRequest = class { +var AccountVerifyRequest = class _AccountVerifyRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyRequest"); } }; -var AccountVerifyRequest = _AccountVerifyRequest; -AccountVerifyRequest.discriminator = void 0; -AccountVerifyRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/accountVerifyResponse.ts -var _AccountVerifyResponse = class { +var AccountVerifyResponse = class _AccountVerifyResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountVerifyResponseAccount" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponse"); } }; -var AccountVerifyResponse = _AccountVerifyResponse; -AccountVerifyResponse.discriminator = void 0; -AccountVerifyResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountVerifyResponseAccount" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountVerifyResponseAccount.ts -var _AccountVerifyResponseAccount = class { +var AccountVerifyResponseAccount = class _AccountVerifyResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponseAccount"); } }; -var AccountVerifyResponseAccount = _AccountVerifyResponseAccount; -AccountVerifyResponseAccount.discriminator = void 0; -AccountVerifyResponseAccount.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppCreateRequest.ts -var _ApiAppCreateRequest = class { +var ApiAppCreateRequest = class _ApiAppCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppCreateRequest"); } }; -var ApiAppCreateRequest = _ApiAppCreateRequest; -ApiAppCreateRequest.discriminator = void 0; -ApiAppCreateRequest.attributeTypeMap = [ - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/apiAppGetResponse.ts -var _ApiAppGetResponse = class { +var ApiAppGetResponse = class _ApiAppGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApp", + baseName: "api_app", + type: "ApiAppResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppGetResponse"); } }; -var ApiAppGetResponse = _ApiAppGetResponse; -ApiAppGetResponse.discriminator = void 0; -ApiAppGetResponse.attributeTypeMap = [ - { - name: "apiApp", - baseName: "api_app", - type: "ApiAppResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppListResponse.ts -var _ApiAppListResponse = class { +var ApiAppListResponse = class _ApiAppListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApps", + baseName: "api_apps", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppListResponse"); } }; -var ApiAppListResponse = _ApiAppListResponse; -ApiAppListResponse.discriminator = void 0; -ApiAppListResponse.attributeTypeMap = [ - { - name: "apiApps", - baseName: "api_apps", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppResponse.ts -var _ApiAppResponse = class { +var ApiAppResponse = class _ApiAppResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "isApproved", + baseName: "is_approved", + type: "boolean" + }, + { + name: "oauth", + baseName: "oauth", + type: "ApiAppResponseOAuth" + }, + { + name: "options", + baseName: "options", + type: "ApiAppResponseOptions" + }, + { + name: "ownerAccount", + baseName: "owner_account", + type: "ApiAppResponseOwnerAccount" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "ApiAppResponseWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponse"); } }; -var ApiAppResponse = _ApiAppResponse; -ApiAppResponse.discriminator = void 0; -ApiAppResponse.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "isApproved", - baseName: "is_approved", - type: "boolean" - }, - { - name: "oauth", - baseName: "oauth", - type: "ApiAppResponseOAuth" - }, - { - name: "options", - baseName: "options", - type: "ApiAppResponseOptions" - }, - { - name: "ownerAccount", - baseName: "owner_account", - type: "ApiAppResponseOwnerAccount" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "ApiAppResponseWhiteLabelingOptions" - } -]; // model/apiAppResponseOAuth.ts -var _ApiAppResponseOAuth = class { +var ApiAppResponseOAuth = class _ApiAppResponseOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "secret", + baseName: "secret", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + }, + { + name: "chargesUsers", + baseName: "charges_users", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOAuth"); } }; -var ApiAppResponseOAuth = _ApiAppResponseOAuth; -ApiAppResponseOAuth.discriminator = void 0; -ApiAppResponseOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "secret", - baseName: "secret", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - }, - { - name: "chargesUsers", - baseName: "charges_users", - type: "boolean" - } -]; // model/apiAppResponseOptions.ts -var _ApiAppResponseOptions = class { +var ApiAppResponseOptions = class _ApiAppResponseOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOptions"); } }; -var ApiAppResponseOptions = _ApiAppResponseOptions; -ApiAppResponseOptions.discriminator = void 0; -ApiAppResponseOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/apiAppResponseOwnerAccount.ts -var _ApiAppResponseOwnerAccount = class { +var ApiAppResponseOwnerAccount = class _ApiAppResponseOwnerAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOwnerAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOwnerAccount"); } }; -var ApiAppResponseOwnerAccount = _ApiAppResponseOwnerAccount; -ApiAppResponseOwnerAccount.discriminator = void 0; -ApiAppResponseOwnerAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppResponseWhiteLabelingOptions.ts -var _ApiAppResponseWhiteLabelingOptions = class { +var ApiAppResponseWhiteLabelingOptions = class _ApiAppResponseWhiteLabelingOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "string" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -16931,172 +17374,242 @@ var _ApiAppResponseWhiteLabelingOptions = class { ); } }; -var ApiAppResponseWhiteLabelingOptions = _ApiAppResponseWhiteLabelingOptions; -ApiAppResponseWhiteLabelingOptions.discriminator = void 0; -ApiAppResponseWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "string" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - } -]; // model/apiAppUpdateRequest.ts -var _ApiAppUpdateRequest = class { +var ApiAppUpdateRequest = class _ApiAppUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppUpdateRequest"); } }; -var ApiAppUpdateRequest = _ApiAppUpdateRequest; -ApiAppUpdateRequest.discriminator = void 0; -ApiAppUpdateRequest.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/bulkSendJobGetResponse.ts -var _BulkSendJobGetResponse = class { +var BulkSendJobGetResponse = class _BulkSendJobGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobGetResponse"); } }; -var BulkSendJobGetResponse = _BulkSendJobGetResponse; -BulkSendJobGetResponse.discriminator = void 0; -BulkSendJobGetResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobGetResponseSignatureRequests.ts -var _BulkSendJobGetResponseSignatureRequests = class { +var BulkSendJobGetResponseSignatureRequests = class _BulkSendJobGetResponseSignatureRequests { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponseSignatureRequests.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17104,325 +17617,255 @@ var _BulkSendJobGetResponseSignatureRequests = class { ); } }; -var BulkSendJobGetResponseSignatureRequests = _BulkSendJobGetResponseSignatureRequests; -BulkSendJobGetResponseSignatureRequests.discriminator = void 0; -BulkSendJobGetResponseSignatureRequests.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/bulkSendJobListResponse.ts -var _BulkSendJobListResponse = class { +var BulkSendJobListResponse = class _BulkSendJobListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobs", + baseName: "bulk_send_jobs", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobListResponse"); } }; -var BulkSendJobListResponse = _BulkSendJobListResponse; -BulkSendJobListResponse.discriminator = void 0; -BulkSendJobListResponse.attributeTypeMap = [ - { - name: "bulkSendJobs", - baseName: "bulk_send_jobs", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobResponse.ts -var _BulkSendJobResponse = class { +var BulkSendJobResponse = class _BulkSendJobResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + }, + { + name: "total", + baseName: "total", + type: "number" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobResponse"); } }; -var BulkSendJobResponse = _BulkSendJobResponse; -BulkSendJobResponse.discriminator = void 0; -BulkSendJobResponse.attributeTypeMap = [ - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - }, - { - name: "total", - baseName: "total", - type: "number" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - } -]; // model/bulkSendJobSendResponse.ts -var _BulkSendJobSendResponse = class { +var BulkSendJobSendResponse = class _BulkSendJobSendResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobSendResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobSendResponse"); } }; -var BulkSendJobSendResponse = _BulkSendJobSendResponse; -BulkSendJobSendResponse.discriminator = void 0; -BulkSendJobSendResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlRequest.ts -var _EmbeddedEditUrlRequest = class { +var EmbeddedEditUrlRequest = class _EmbeddedEditUrlRequest { constructor() { + /** + * This allows the requester to enable/disable to add or change CC roles when editing the template. + */ this["allowEditCcs"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditCcs", + baseName: "allow_edit_ccs", + type: "boolean" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlRequest"); } }; -var EmbeddedEditUrlRequest = _EmbeddedEditUrlRequest; -EmbeddedEditUrlRequest.discriminator = void 0; -EmbeddedEditUrlRequest.attributeTypeMap = [ - { - name: "allowEditCcs", - baseName: "allow_edit_ccs", - type: "boolean" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/embeddedEditUrlResponse.ts -var _EmbeddedEditUrlResponse = class { +var EmbeddedEditUrlResponse = class _EmbeddedEditUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedEditUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlResponse"); } }; -var EmbeddedEditUrlResponse = _EmbeddedEditUrlResponse; -EmbeddedEditUrlResponse.discriminator = void 0; -EmbeddedEditUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedEditUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlResponseEmbedded.ts -var _EmbeddedEditUrlResponseEmbedded = class { +var EmbeddedEditUrlResponseEmbedded = class _EmbeddedEditUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17430,50 +17873,58 @@ var _EmbeddedEditUrlResponseEmbedded = class { ); } }; -var EmbeddedEditUrlResponseEmbedded = _EmbeddedEditUrlResponseEmbedded; -EmbeddedEditUrlResponseEmbedded.discriminator = void 0; -EmbeddedEditUrlResponseEmbedded.attributeTypeMap = [ - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/embeddedSignUrlResponse.ts -var _EmbeddedSignUrlResponse = class { +var EmbeddedSignUrlResponse = class _EmbeddedSignUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedSignUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedSignUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedSignUrlResponse"); } }; -var EmbeddedSignUrlResponse = _EmbeddedSignUrlResponse; -EmbeddedSignUrlResponse.discriminator = void 0; -EmbeddedSignUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedSignUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedSignUrlResponseEmbedded.ts -var _EmbeddedSignUrlResponseEmbedded = class { +var EmbeddedSignUrlResponseEmbedded = class _EmbeddedSignUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signUrl", + baseName: "sign_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedSignUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17481,157 +17932,173 @@ var _EmbeddedSignUrlResponseEmbedded = class { ); } }; -var EmbeddedSignUrlResponseEmbedded = _EmbeddedSignUrlResponseEmbedded; -EmbeddedSignUrlResponseEmbedded.discriminator = void 0; -EmbeddedSignUrlResponseEmbedded.attributeTypeMap = [ - { - name: "signUrl", - baseName: "sign_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/errorResponse.ts -var _ErrorResponse = class { +var ErrorResponse = class _ErrorResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "error", + baseName: "error", + type: "ErrorResponseError" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponse"); } }; -var ErrorResponse = _ErrorResponse; -ErrorResponse.discriminator = void 0; -ErrorResponse.attributeTypeMap = [ - { - name: "error", - baseName: "error", - type: "ErrorResponseError" - } -]; // model/errorResponseError.ts -var _ErrorResponseError = class { +var ErrorResponseError = class _ErrorResponseError { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "errorMsg", + baseName: "error_msg", + type: "string" + }, + { + name: "errorName", + baseName: "error_name", + type: "string" + }, + { + name: "errorPath", + baseName: "error_path", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponseError.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponseError"); } }; -var ErrorResponseError = _ErrorResponseError; -ErrorResponseError.discriminator = void 0; -ErrorResponseError.attributeTypeMap = [ - { - name: "errorMsg", - baseName: "error_msg", - type: "string" - }, - { - name: "errorName", - baseName: "error_name", - type: "string" - }, - { - name: "errorPath", - baseName: "error_path", - type: "string" - } -]; // model/eventCallbackHelper.ts -var crypto = __toESM(require("crypto")); -var _EventCallbackHelper = class { -}; -var EventCallbackHelper = _EventCallbackHelper; -EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; -EventCallbackHelper.EVENT_TYPE_APP_CALLBACK = "app_callback"; -EventCallbackHelper.isValid = (apiKey, eventCallback) => { - const hmac = crypto.createHmac("sha256", apiKey); - hmac.update( - `${eventCallback.event.eventTime}${eventCallback.event.eventType}` - ); - return eventCallback.event.eventHash === hmac.digest("hex").toString(); -}; -EventCallbackHelper.getCallbackType = (eventCallback) => { - if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { - return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; +var crypto2 = __toESM(require("crypto")); +var EventCallbackHelper = class _EventCallbackHelper { + static { + this.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; + } + static { + this.EVENT_TYPE_APP_CALLBACK = "app_callback"; + } + static { + /** + * Verify that callback came from HelloSign.com + */ + this.isValid = (apiKey, eventCallback) => { + const hmac = crypto2.createHmac("sha256", apiKey); + hmac.update( + `${eventCallback.event.eventTime}${eventCallback.event.eventType}` + ); + return eventCallback.event.eventHash === hmac.digest("hex").toString(); + }; + } + static { + /** + * Identifies the callback type, one of "account_callback" or "app_callback". + * "app_callback" will always include a value for "reported_for_app_id" + */ + this.getCallbackType = (eventCallback) => { + if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { + return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; + } + return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; + }; } - return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; }; // model/eventCallbackRequest.ts -var _EventCallbackRequest = class { +var EventCallbackRequest = class _EventCallbackRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "event", + baseName: "event", + type: "EventCallbackRequestEvent" + }, + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "template", + baseName: "template", + type: "TemplateResponse" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequest"); } }; -var EventCallbackRequest = _EventCallbackRequest; -EventCallbackRequest.discriminator = void 0; -EventCallbackRequest.attributeTypeMap = [ - { - name: "event", - baseName: "event", - type: "EventCallbackRequestEvent" - }, - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "template", - baseName: "template", - type: "TemplateResponse" - } -]; // model/eventCallbackRequestEvent.ts -var _EventCallbackRequestEvent = class { +var EventCallbackRequestEvent = class _EventCallbackRequestEvent { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "eventTime", + baseName: "event_time", + type: "string" + }, + { + name: "eventType", + baseName: "event_type", + type: "EventCallbackRequestEvent.EventTypeEnum" + }, + { + name: "eventHash", + baseName: "event_hash", + type: "string" + }, + { + name: "eventMetadata", + baseName: "event_metadata", + type: "EventCallbackRequestEventMetadata" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEvent.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequestEvent"); } }; -var EventCallbackRequestEvent = _EventCallbackRequestEvent; -EventCallbackRequestEvent.discriminator = void 0; -EventCallbackRequestEvent.attributeTypeMap = [ - { - name: "eventTime", - baseName: "event_time", - type: "string" - }, - { - name: "eventType", - baseName: "event_type", - type: "EventCallbackRequestEvent.EventTypeEnum" - }, - { - name: "eventHash", - baseName: "event_hash", - type: "string" - }, - { - name: "eventMetadata", - baseName: "event_metadata", - type: "EventCallbackRequestEventMetadata" - } -]; ((EventCallbackRequestEvent2) => { let EventTypeEnum; ((EventTypeEnum2) => { @@ -17662,10 +18129,38 @@ EventCallbackRequestEvent.attributeTypeMap = [ })(EventCallbackRequestEvent || (EventCallbackRequestEvent = {})); // model/eventCallbackRequestEventMetadata.ts -var _EventCallbackRequestEventMetadata = class { +var EventCallbackRequestEventMetadata = class _EventCallbackRequestEventMetadata { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "relatedSignatureId", + baseName: "related_signature_id", + type: "string" + }, + { + name: "reportedForAccountId", + baseName: "reported_for_account_id", + type: "string" + }, + { + name: "reportedForAppId", + baseName: "reported_for_app_id", + type: "string" + }, + { + name: "eventMessage", + baseName: "event_message", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEventMetadata.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17673,83 +18168,67 @@ var _EventCallbackRequestEventMetadata = class { ); } }; -var EventCallbackRequestEventMetadata = _EventCallbackRequestEventMetadata; -EventCallbackRequestEventMetadata.discriminator = void 0; -EventCallbackRequestEventMetadata.attributeTypeMap = [ - { - name: "relatedSignatureId", - baseName: "related_signature_id", - type: "string" - }, - { - name: "reportedForAccountId", - baseName: "reported_for_account_id", - type: "string" - }, - { - name: "reportedForAppId", - baseName: "reported_for_app_id", - type: "string" - }, - { - name: "eventMessage", - baseName: "event_message", - type: "string" - } -]; // model/faxGetResponse.ts -var _FaxGetResponse = class { +var FaxGetResponse = class _FaxGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fax", + baseName: "fax", + type: "FaxResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxGetResponse"); } }; -var FaxGetResponse = _FaxGetResponse; -FaxGetResponse.discriminator = void 0; -FaxGetResponse.attributeTypeMap = [ - { - name: "fax", - baseName: "fax", - type: "FaxResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/faxLineAddUserRequest.ts -var _FaxLineAddUserRequest = class { +var FaxLineAddUserRequest = class _FaxLineAddUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAddUserRequest"); } }; -var FaxLineAddUserRequest = _FaxLineAddUserRequest; -FaxLineAddUserRequest.discriminator = void 0; -FaxLineAddUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineAreaCodeGetCountryEnum.ts var FaxLineAreaCodeGetCountryEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetCountryEnum2) => { @@ -17778,23 +18257,27 @@ var FaxLineAreaCodeGetProvinceEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetProvinc })(FaxLineAreaCodeGetProvinceEnum || {}); // model/faxLineAreaCodeGetResponse.ts -var _FaxLineAreaCodeGetResponse = class { +var FaxLineAreaCodeGetResponse = class _FaxLineAreaCodeGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCodes", + baseName: "area_codes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAreaCodeGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAreaCodeGetResponse"); } }; -var FaxLineAreaCodeGetResponse = _FaxLineAreaCodeGetResponse; -FaxLineAreaCodeGetResponse.discriminator = void 0; -FaxLineAreaCodeGetResponse.attributeTypeMap = [ - { - name: "areaCodes", - baseName: "area_codes", - type: "Array" - } -]; // model/faxLineAreaCodeGetStateEnum.ts var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2) => { @@ -17853,38 +18336,42 @@ var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2 })(FaxLineAreaCodeGetStateEnum || {}); // model/faxLineCreateRequest.ts -var _FaxLineCreateRequest = class { +var FaxLineCreateRequest = class _FaxLineCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCode", + baseName: "area_code", + type: "number" + }, + { + name: "country", + baseName: "country", + type: "FaxLineCreateRequest.CountryEnum" + }, + { + name: "city", + baseName: "city", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineCreateRequest"); } }; -var FaxLineCreateRequest = _FaxLineCreateRequest; -FaxLineCreateRequest.discriminator = void 0; -FaxLineCreateRequest.attributeTypeMap = [ - { - name: "areaCode", - baseName: "area_code", - type: "number" - }, - { - name: "country", - baseName: "country", - type: "FaxLineCreateRequest.CountryEnum" - }, - { - name: "city", - baseName: "city", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - } -]; ((FaxLineCreateRequest2) => { let CountryEnum; ((CountryEnum2) => { @@ -17895,261 +18382,293 @@ FaxLineCreateRequest.attributeTypeMap = [ })(FaxLineCreateRequest || (FaxLineCreateRequest = {})); // model/faxLineDeleteRequest.ts -var _FaxLineDeleteRequest = class { +var FaxLineDeleteRequest = class _FaxLineDeleteRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineDeleteRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineDeleteRequest"); } }; -var FaxLineDeleteRequest = _FaxLineDeleteRequest; -FaxLineDeleteRequest.discriminator = void 0; -FaxLineDeleteRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - } -]; // model/faxLineListResponse.ts -var _FaxLineListResponse = class { +var FaxLineListResponse = class _FaxLineListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "faxLines", + baseName: "fax_lines", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineListResponse"); } }; -var FaxLineListResponse = _FaxLineListResponse; -FaxLineListResponse.discriminator = void 0; -FaxLineListResponse.attributeTypeMap = [ - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "faxLines", - baseName: "fax_lines", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineRemoveUserRequest.ts -var _FaxLineRemoveUserRequest = class { +var FaxLineRemoveUserRequest = class _FaxLineRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineRemoveUserRequest"); } }; -var FaxLineRemoveUserRequest = _FaxLineRemoveUserRequest; -FaxLineRemoveUserRequest.discriminator = void 0; -FaxLineRemoveUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineResponse.ts -var _FaxLineResponse = class { +var FaxLineResponse = class _FaxLineResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxLine", + baseName: "fax_line", + type: "FaxLineResponseFaxLine" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponse"); } }; -var FaxLineResponse = _FaxLineResponse; -FaxLineResponse.discriminator = void 0; -FaxLineResponse.attributeTypeMap = [ - { - name: "faxLine", - baseName: "fax_line", - type: "FaxLineResponseFaxLine" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineResponseFaxLine.ts -var _FaxLineResponseFaxLine = class { +var FaxLineResponseFaxLine = class _FaxLineResponseFaxLine { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponseFaxLine.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponseFaxLine"); } }; -var FaxLineResponseFaxLine = _FaxLineResponseFaxLine; -FaxLineResponseFaxLine.discriminator = void 0; -FaxLineResponseFaxLine.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - } -]; // model/faxListResponse.ts -var _FaxListResponse = class { +var FaxListResponse = class _FaxListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxes", + baseName: "faxes", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxListResponse"); } }; -var FaxListResponse = _FaxListResponse; -FaxListResponse.discriminator = void 0; -FaxListResponse.attributeTypeMap = [ - { - name: "faxes", - baseName: "faxes", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - } -]; // model/faxResponse.ts -var _FaxResponse = class { +var FaxResponse = class _FaxResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxId", + baseName: "fax_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "transmissions", + baseName: "transmissions", + type: "Array" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponse"); } }; -var FaxResponse = _FaxResponse; -FaxResponse.discriminator = void 0; -FaxResponse.attributeTypeMap = [ - { - name: "faxId", - baseName: "fax_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "transmissions", - baseName: "transmissions", - type: "Array" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - } -]; // model/faxResponseTransmission.ts -var _FaxResponseTransmission = class { +var FaxResponseTransmission = class _FaxResponseTransmission { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "statusCode", + baseName: "status_code", + type: "FaxResponseTransmission.StatusCodeEnum" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FaxResponseTransmission.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponseTransmission"); } }; -var FaxResponseTransmission = _FaxResponseTransmission; -FaxResponseTransmission.discriminator = void 0; -FaxResponseTransmission.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "statusCode", - baseName: "status_code", - type: "FaxResponseTransmission.StatusCodeEnum" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - } -]; ((FaxResponseTransmission2) => { let StatusCodeEnum; ((StatusCodeEnum2) => { @@ -18165,143 +18684,162 @@ FaxResponseTransmission.attributeTypeMap = [ })(FaxResponseTransmission || (FaxResponseTransmission = {})); // model/faxSendRequest.ts -var _FaxSendRequest = class { +var FaxSendRequest = class _FaxSendRequest { constructor() { + /** + * API Test Mode Setting + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "coverPageTo", + baseName: "cover_page_to", + type: "string" + }, + { + name: "coverPageFrom", + baseName: "cover_page_from", + type: "string" + }, + { + name: "coverPageMessage", + baseName: "cover_page_message", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxSendRequest"); } }; -var FaxSendRequest = _FaxSendRequest; -FaxSendRequest.discriminator = void 0; -FaxSendRequest.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "coverPageTo", - baseName: "cover_page_to", - type: "string" - }, - { - name: "coverPageFrom", - baseName: "cover_page_from", - type: "string" - }, - { - name: "coverPageMessage", - baseName: "cover_page_message", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/fileResponse.ts -var _FileResponse = class { +var FileResponse = class _FileResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fileUrl", + baseName: "file_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FileResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponse"); } }; -var FileResponse = _FileResponse; -FileResponse.discriminator = void 0; -FileResponse.attributeTypeMap = [ - { - name: "fileUrl", - baseName: "file_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/fileResponseDataUri.ts -var _FileResponseDataUri = class { +var FileResponseDataUri = class _FileResponseDataUri { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dataUri", + baseName: "data_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FileResponseDataUri.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponseDataUri"); } }; -var FileResponseDataUri = _FileResponseDataUri; -FileResponseDataUri.discriminator = void 0; -FileResponseDataUri.attributeTypeMap = [ - { - name: "dataUri", - baseName: "data_uri", - type: "string" - } -]; // model/listInfoResponse.ts -var _ListInfoResponse = class { +var ListInfoResponse = class _ListInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numPages", + baseName: "num_pages", + type: "number" + }, + { + name: "numResults", + baseName: "num_results", + type: "number" + }, + { + name: "page", + baseName: "page", + type: "number" + }, + { + name: "pageSize", + baseName: "page_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _ListInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ListInfoResponse"); } }; -var ListInfoResponse = _ListInfoResponse; -ListInfoResponse.discriminator = void 0; -ListInfoResponse.attributeTypeMap = [ - { - name: "numPages", - baseName: "num_pages", - type: "number" - }, - { - name: "numResults", - baseName: "num_results", - type: "number" - }, - { - name: "page", - baseName: "page", - type: "number" - }, - { - name: "pageSize", - baseName: "page_size", - type: "number" - } -]; // model/models.ts var primitives = [ @@ -18314,7 +18852,19 @@ var primitives = [ "number", "any" ]; -var ObjectSerializer = class { +function startsWith(str, match) { + return str.substring(0, match.length) === match; +} +function endsWith2(str, match) { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} +var nullableSuffix = " | null"; +var optionalSuffix = " | undefined"; +var arrayPrefix = "Array<"; +var arraySuffix = ">"; +var mapPrefix = "{ [key: string]: "; +var mapSuffix = "; }"; +var ObjectSerializer = class _ObjectSerializer { static findCorrectType(data, expectedType) { if (data == void 0) { return expectedType; @@ -18358,13 +18908,25 @@ var ObjectSerializer = class { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - let subType = type.replace("Array<", ""); - subType = subType.substring(0, subType.length - 1); + } else if (endsWith2(type, nullableSuffix)) { + let subType = type.slice(0, -nullableSuffix.length); + return _ObjectSerializer.serialize(data, subType); + } else if (endsWith2(type, optionalSuffix)) { + let subType = type.slice(0, -optionalSuffix.length); + return _ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); + transformedData.push(_ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType = type.slice(mapPrefix.length, -mapSuffix.length); + let transformedData = {}; + for (let key in data) { + transformedData[key] = _ObjectSerializer.serialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18381,7 +18943,7 @@ var ObjectSerializer = class { let instance = {}; for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; - let value = ObjectSerializer.serialize( + let value = _ObjectSerializer.serialize( data[attributeType.name], attributeType.type ); @@ -18393,18 +18955,30 @@ var ObjectSerializer = class { } } static deserialize(data, type) { - type = ObjectSerializer.findCorrectType(data, type); + type = _ObjectSerializer.findCorrectType(data, type); if (data == void 0) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - let subType = type.replace("Array<", ""); - subType = subType.substring(0, subType.length - 1); + } else if (endsWith2(type, nullableSuffix)) { + let subType = type.slice(0, -nullableSuffix.length); + return _ObjectSerializer.deserialize(data, subType); + } else if (endsWith2(type, optionalSuffix)) { + let subType = type.slice(0, -optionalSuffix.length); + return _ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, subType)); + transformedData.push(_ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType = type.slice(mapPrefix.length, -mapSuffix.length); + let transformedData = {}; + for (let key in data) { + transformedData[key] = _ObjectSerializer.deserialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18421,7 +18995,7 @@ var ObjectSerializer = class { for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; const propertyKey = data[attributeType.baseName] !== void 0 ? attributeType.baseName : attributeType.name; - instance[attributeType.name] = ObjectSerializer.deserialize( + instance[attributeType.name] = _ObjectSerializer.deserialize( data[propertyKey], attributeType.type ); @@ -18493,151 +19067,173 @@ var VoidAuth = class { }; // model/oAuthTokenGenerateRequest.ts -var _OAuthTokenGenerateRequest = class { +var OAuthTokenGenerateRequest = class _OAuthTokenGenerateRequest { constructor() { + /** + * When generating a new token use `authorization_code`. + */ this["grantType"] = "authorization_code"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "code", + baseName: "code", + type: "string" + }, + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenGenerateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenGenerateRequest"); } }; -var OAuthTokenGenerateRequest = _OAuthTokenGenerateRequest; -OAuthTokenGenerateRequest.discriminator = void 0; -OAuthTokenGenerateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "code", - baseName: "code", - type: "string" - }, - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/oAuthTokenRefreshRequest.ts -var _OAuthTokenRefreshRequest = class { +var OAuthTokenRefreshRequest = class _OAuthTokenRefreshRequest { constructor() { + /** + * When refreshing an existing token use `refresh_token`. + */ this["grantType"] = "refresh_token"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenRefreshRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenRefreshRequest"); } }; -var OAuthTokenRefreshRequest = _OAuthTokenRefreshRequest; -OAuthTokenRefreshRequest.discriminator = void 0; -OAuthTokenRefreshRequest.attributeTypeMap = [ - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - } -]; // model/oAuthTokenResponse.ts -var _OAuthTokenResponse = class { +var OAuthTokenResponse = class _OAuthTokenResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accessToken", + baseName: "access_token", + type: "string" + }, + { + name: "tokenType", + baseName: "token_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "expiresIn", + baseName: "expires_in", + type: "number" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenResponse"); } }; -var OAuthTokenResponse = _OAuthTokenResponse; -OAuthTokenResponse.discriminator = void 0; -OAuthTokenResponse.attributeTypeMap = [ - { - name: "accessToken", - baseName: "access_token", - type: "string" - }, - { - name: "tokenType", - baseName: "token_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "expiresIn", - baseName: "expires_in", - type: "number" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/reportCreateRequest.ts -var _ReportCreateRequest = class { +var ReportCreateRequest = class _ReportCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateRequest"); } }; -var ReportCreateRequest = _ReportCreateRequest; -ReportCreateRequest.discriminator = void 0; -ReportCreateRequest.attributeTypeMap = [ - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - } -]; ((ReportCreateRequest2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18647,62 +19243,70 @@ ReportCreateRequest.attributeTypeMap = [ })(ReportCreateRequest || (ReportCreateRequest = {})); // model/reportCreateResponse.ts -var _ReportCreateResponse = class { +var ReportCreateResponse = class _ReportCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "report", + baseName: "report", + type: "ReportResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateResponse"); } }; -var ReportCreateResponse = _ReportCreateResponse; -ReportCreateResponse.discriminator = void 0; -ReportCreateResponse.attributeTypeMap = [ - { - name: "report", - baseName: "report", - type: "ReportResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/reportResponse.ts -var _ReportResponse = class { +var ReportResponse = class _ReportResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "success", + baseName: "success", + type: "string" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + }, + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportResponse"); } }; -var ReportResponse = _ReportResponse; -ReportResponse.discriminator = void 0; -ReportResponse.attributeTypeMap = [ - { - name: "success", - baseName: "success", - type: "string" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - }, - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - } -]; ((ReportResponse2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18712,14 +19316,93 @@ ReportResponse.attributeTypeMap = [ })(ReportResponse || (ReportResponse = {})); // model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class _SignatureRequestBulkCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18727,85 +19410,95 @@ var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = _SignatureRequestBulkCreateEmbeddedWithTemplateRequest; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestBulkSendWithTemplateRequest.ts -var _SignatureRequestBulkSendWithTemplateRequest = class { +var SignatureRequestBulkSendWithTemplateRequest = class _SignatureRequestBulkSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18813,89 +19506,166 @@ var _SignatureRequestBulkSendWithTemplateRequest = class { ); } }; -var SignatureRequestBulkSendWithTemplateRequest = _SignatureRequestBulkSendWithTemplateRequest; -SignatureRequestBulkSendWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestCreateEmbeddedRequest.ts -var _SignatureRequestCreateEmbeddedRequest = class { +var SignatureRequestCreateEmbeddedRequest = class _SignatureRequestCreateEmbeddedRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18903,141 +19673,109 @@ var _SignatureRequestCreateEmbeddedRequest = class { ); } }; -var SignatureRequestCreateEmbeddedRequest = _SignatureRequestCreateEmbeddedRequest; -SignatureRequestCreateEmbeddedRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestCreateEmbeddedWithTemplateRequest = class _SignatureRequestCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19045,310 +19783,849 @@ var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestCreateEmbeddedWithTemplateRequest = _SignatureRequestCreateEmbeddedWithTemplateRequest; -SignatureRequestCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" + +// model/signatureRequestEditEmbeddedRequest.ts +var SignatureRequestEditEmbeddedRequest = class _SignatureRequestEditEmbeddedRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ + this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + this["populateAutoFillFields"] = false; } -]; + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditEmbeddedRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedRequest" + ); + } +}; + +// model/signatureRequestEditEmbeddedWithTemplateRequest.ts +var SignatureRequestEditEmbeddedWithTemplateRequest = class _SignatureRequestEditEmbeddedWithTemplateRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + this["populateAutoFillFields"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } +}; + +// model/signatureRequestEditRequest.ts +var SignatureRequestEditRequest = class _SignatureRequestEditRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ + this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + this["useTextTags"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "SignatureRequestEditRequest"); + } +}; + +// model/signatureRequestEditWithTemplateRequest.ts +var SignatureRequestEditWithTemplateRequest = class _SignatureRequestEditWithTemplateRequest { + constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + this["testMode"] = false; + } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } + static getAttributeTypeMap() { + return _SignatureRequestEditWithTemplateRequest.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditWithTemplateRequest" + ); + } +}; // model/signatureRequestGetResponse.ts -var _SignatureRequestGetResponse = class { +var SignatureRequestGetResponse = class _SignatureRequestGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestGetResponse"); } }; -var SignatureRequestGetResponse = _SignatureRequestGetResponse; -SignatureRequestGetResponse.discriminator = void 0; -SignatureRequestGetResponse.attributeTypeMap = [ - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestListResponse.ts -var _SignatureRequestListResponse = class { +var SignatureRequestListResponse = class _SignatureRequestListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestListResponse"); } }; -var SignatureRequestListResponse = _SignatureRequestListResponse; -SignatureRequestListResponse.discriminator = void 0; -SignatureRequestListResponse.attributeTypeMap = [ - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestRemindRequest.ts -var _SignatureRequestRemindRequest = class { +var SignatureRequestRemindRequest = class _SignatureRequestRemindRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestRemindRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestRemindRequest"); } }; -var SignatureRequestRemindRequest = _SignatureRequestRemindRequest; -SignatureRequestRemindRequest.discriminator = void 0; -SignatureRequestRemindRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/signatureRequestResponse.ts -var _SignatureRequestResponse = class { +var SignatureRequestResponse = class _SignatureRequestResponse { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestResponse"); } }; -var SignatureRequestResponse = _SignatureRequestResponse; -SignatureRequestResponse.discriminator = void 0; -SignatureRequestResponse.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/signatureRequestResponseAttachment.ts -var _SignatureRequestResponseAttachment = class { +var SignatureRequestResponseAttachment = class _SignatureRequestResponseAttachment { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "uploadedAt", + baseName: "uploaded_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19356,43 +20633,41 @@ var _SignatureRequestResponseAttachment = class { ); } }; -var SignatureRequestResponseAttachment = _SignatureRequestResponseAttachment; -SignatureRequestResponseAttachment.discriminator = void 0; -SignatureRequestResponseAttachment.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "uploadedAt", - baseName: "uploaded_at", - type: "number" - } -]; // model/signatureRequestResponseCustomFieldBase.ts -var _SignatureRequestResponseCustomFieldBase = class { +var SignatureRequestResponseCustomFieldBase = class _SignatureRequestResponseCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseCustomFieldBase.attributeTypeMap; } @@ -19409,45 +20684,37 @@ var _SignatureRequestResponseCustomFieldBase = class { return null; } }; -var SignatureRequestResponseCustomFieldBase = _SignatureRequestResponseCustomFieldBase; -SignatureRequestResponseCustomFieldBase.discriminator = "type"; -SignatureRequestResponseCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldCheckbox.ts -var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldCheckbox = class _SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19455,30 +20722,37 @@ var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureReques ); } }; -var SignatureRequestResponseCustomFieldCheckbox = _SignatureRequestResponseCustomFieldCheckbox; -SignatureRequestResponseCustomFieldCheckbox.discriminator = void 0; -SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseCustomFieldText.ts -var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldText = class _SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19486,20 +20760,6 @@ var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestRes ); } }; -var SignatureRequestResponseCustomFieldText = _SignatureRequestResponseCustomFieldText; -SignatureRequestResponseCustomFieldText.discriminator = void 0; -SignatureRequestResponseCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldTypeEnum.ts var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseCustomFieldTypeEnum2) => { @@ -19509,7 +20769,39 @@ var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureReq })(SignatureRequestResponseCustomFieldTypeEnum || {}); // model/signatureRequestResponseDataBase.ts -var _SignatureRequestResponseDataBase = class { +var SignatureRequestResponseDataBase = class _SignatureRequestResponseDataBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseDataBase.attributeTypeMap; } @@ -19547,35 +20839,6 @@ var _SignatureRequestResponseDataBase = class { return null; } }; -var SignatureRequestResponseDataBase = _SignatureRequestResponseDataBase; -SignatureRequestResponseDataBase.discriminator = "type"; -SignatureRequestResponseDataBase.attributeTypeMap = [ - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/signatureRequestResponseDataTypeEnum.ts var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseDataTypeEnum2) => { @@ -19592,14 +20855,35 @@ var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestRes })(SignatureRequestResponseDataTypeEnum || {}); // model/signatureRequestResponseDataValueCheckbox.ts -var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckbox = class _SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A yes/no checkbox + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19607,30 +20891,37 @@ var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueCheckbox = _SignatureRequestResponseDataValueCheckbox; -SignatureRequestResponseDataValueCheckbox.discriminator = void 0; -SignatureRequestResponseDataValueCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueCheckboxMerge.ts -var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckboxMerge = class _SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set by the api + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19638,30 +20929,37 @@ var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureReq ); } }; -var SignatureRequestResponseDataValueCheckboxMerge = _SignatureRequestResponseDataValueCheckboxMerge; -SignatureRequestResponseDataValueCheckboxMerge.discriminator = void 0; -SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDateSigned.ts -var _SignatureRequestResponseDataValueDateSigned = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDateSigned = class _SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A date + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19669,30 +20967,37 @@ var _SignatureRequestResponseDataValueDateSigned = class extends SignatureReques ); } }; -var SignatureRequestResponseDataValueDateSigned = _SignatureRequestResponseDataValueDateSigned; -SignatureRequestResponseDataValueDateSigned.discriminator = void 0; -SignatureRequestResponseDataValueDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDropdown.ts -var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDropdown = class _SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for dropdowns + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19700,30 +21005,42 @@ var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueDropdown = _SignatureRequestResponseDataValueDropdown; -SignatureRequestResponseDataValueDropdown.discriminator = void 0; -SignatureRequestResponseDataValueDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueInitials.ts -var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueInitials = class _SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for initials + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19731,35 +21048,37 @@ var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueInitials = _SignatureRequestResponseDataValueInitials; -SignatureRequestResponseDataValueInitials.discriminator = void 0; -SignatureRequestResponseDataValueInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueRadio.ts -var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueRadio = class _SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for radios + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19767,30 +21086,42 @@ var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResp ); } }; -var SignatureRequestResponseDataValueRadio = _SignatureRequestResponseDataValueRadio; -SignatureRequestResponseDataValueRadio.discriminator = void 0; -SignatureRequestResponseDataValueRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueSignature.ts -var _SignatureRequestResponseDataValueSignature = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueSignature = class _SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A signature input field + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19798,35 +21129,37 @@ var _SignatureRequestResponseDataValueSignature = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueSignature = _SignatureRequestResponseDataValueSignature; -SignatureRequestResponseDataValueSignature.discriminator = void 0; -SignatureRequestResponseDataValueSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueText.ts -var _SignatureRequestResponseDataValueText = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueText = class _SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text input field + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19834,30 +21167,37 @@ var _SignatureRequestResponseDataValueText = class extends SignatureRequestRespo ); } }; -var SignatureRequestResponseDataValueText = _SignatureRequestResponseDataValueText; -SignatureRequestResponseDataValueText.discriminator = void 0; -SignatureRequestResponseDataValueText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueTextMerge.ts -var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueTextMerge = class _SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text field that has default text set by the api + */ this["type"] = "text-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19865,26 +21205,115 @@ var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueTextMerge = _SignatureRequestResponseDataValueTextMerge; -SignatureRequestResponseDataValueTextMerge.discriminator = void 0; -SignatureRequestResponseDataValueTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseSignatures.ts -var _SignatureRequestResponseSignatures = class { +var SignatureRequestResponseSignatures = class _SignatureRequestResponseSignatures { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "signerGroupGuid", + baseName: "signer_group_guid", + type: "string" + }, + { + name: "signerEmailAddress", + baseName: "signer_email_address", + type: "string" + }, + { + name: "signerName", + baseName: "signer_name", + type: "string" + }, + { + name: "signerRole", + baseName: "signer_role", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "statusCode", + baseName: "status_code", + type: "string" + }, + { + name: "declineReason", + baseName: "decline_reason", + type: "string" + }, + { + name: "signedAt", + baseName: "signed_at", + type: "number" + }, + { + name: "lastViewedAt", + baseName: "last_viewed_at", + type: "number" + }, + { + name: "lastRemindedAt", + baseName: "last_reminded_at", + type: "number" + }, + { + name: "hasPin", + baseName: "has_pin", + type: "boolean" + }, + { + name: "hasSmsAuth", + baseName: "has_sms_auth", + type: "boolean" + }, + { + name: "hasSmsDelivery", + baseName: "has_sms_delivery", + type: "boolean" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "reassignedBy", + baseName: "reassigned_by", + type: "string" + }, + { + name: "reassignmentReason", + baseName: "reassignment_reason", + type: "string" + }, + { + name: "reassignedFrom", + baseName: "reassigned_from", + type: "string" + }, + { + name: "error", + baseName: "error", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseSignatures.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19892,270 +21321,305 @@ var _SignatureRequestResponseSignatures = class { ); } }; -var SignatureRequestResponseSignatures = _SignatureRequestResponseSignatures; -SignatureRequestResponseSignatures.discriminator = void 0; -SignatureRequestResponseSignatures.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "signerGroupGuid", - baseName: "signer_group_guid", - type: "string" - }, - { - name: "signerEmailAddress", - baseName: "signer_email_address", - type: "string" - }, - { - name: "signerName", - baseName: "signer_name", - type: "string" - }, - { - name: "signerRole", - baseName: "signer_role", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "statusCode", - baseName: "status_code", - type: "string" - }, - { - name: "declineReason", - baseName: "decline_reason", - type: "string" - }, - { - name: "signedAt", - baseName: "signed_at", - type: "number" - }, - { - name: "lastViewedAt", - baseName: "last_viewed_at", - type: "number" - }, - { - name: "lastRemindedAt", - baseName: "last_reminded_at", - type: "number" - }, - { - name: "hasPin", - baseName: "has_pin", - type: "boolean" - }, - { - name: "hasSmsAuth", - baseName: "has_sms_auth", - type: "boolean" - }, - { - name: "hasSmsDelivery", - baseName: "has_sms_delivery", - type: "boolean" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "reassignedBy", - baseName: "reassigned_by", - type: "string" - }, - { - name: "reassignmentReason", - baseName: "reassignment_reason", - type: "string" - }, - { - name: "reassignedFrom", - baseName: "reassigned_from", - type: "string" - }, - { - name: "error", - baseName: "error", - type: "string" - } -]; // model/signatureRequestSendRequest.ts -var _SignatureRequestSendRequest = class { +var SignatureRequestSendRequest = class _SignatureRequestSendRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestSendRequest"); } }; -var SignatureRequestSendRequest = _SignatureRequestSendRequest; -SignatureRequestSendRequest.discriminator = void 0; -SignatureRequestSendRequest.attributeTypeMap = [ - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestSendWithTemplateRequest.ts -var _SignatureRequestSendWithTemplateRequest = class { +var SignatureRequestSendWithTemplateRequest = class _SignatureRequestSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20163,322 +21627,277 @@ var _SignatureRequestSendWithTemplateRequest = class { ); } }; -var SignatureRequestSendWithTemplateRequest = _SignatureRequestSendWithTemplateRequest; -SignatureRequestSendWithTemplateRequest.discriminator = void 0; -SignatureRequestSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestUpdateRequest.ts -var _SignatureRequestUpdateRequest = class { +var SignatureRequestUpdateRequest = class _SignatureRequestUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestUpdateRequest"); } }; -var SignatureRequestUpdateRequest = _SignatureRequestUpdateRequest; -SignatureRequestUpdateRequest.discriminator = void 0; -SignatureRequestUpdateRequest.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/subAttachment.ts -var _SubAttachment = class { +var SubAttachment = class _SubAttachment { constructor() { + /** + * Determines if the attachment must be uploaded. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signerIndex", + baseName: "signer_index", + type: "number" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubAttachment"); } }; -var SubAttachment = _SubAttachment; -SubAttachment.discriminator = void 0; -SubAttachment.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signerIndex", - baseName: "signer_index", - type: "number" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/subBulkSignerList.ts -var _SubBulkSignerList = class { +var SubBulkSignerList = class _SubBulkSignerList { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerList.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerList"); } }; -var SubBulkSignerList = _SubBulkSignerList; -SubBulkSignerList.discriminator = void 0; -SubBulkSignerList.attributeTypeMap = [ - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - } -]; // model/subBulkSignerListCustomField.ts -var _SubBulkSignerListCustomField = class { +var SubBulkSignerListCustomField = class _SubBulkSignerListCustomField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerListCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerListCustomField"); } }; -var SubBulkSignerListCustomField = _SubBulkSignerListCustomField; -SubBulkSignerListCustomField.discriminator = void 0; -SubBulkSignerListCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subCC.ts -var _SubCC = class { +var SubCC = class _SubCC { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCC.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCC"); } }; -var SubCC = _SubCC; -SubCC.discriminator = void 0; -SubCC.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subCustomField.ts -var _SubCustomField = class { +var SubCustomField = class _SubCustomField { constructor() { + /** + * Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCustomField"); } }; -var SubCustomField = _SubCustomField; -SubCustomField.discriminator = void 0; -SubCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subEditorOptions.ts -var _SubEditorOptions = class { +var SubEditorOptions = class _SubEditorOptions { constructor() { + /** + * Allows requesters to edit the list of signers + */ this["allowEditSigners"] = false; + /** + * Allows requesters to edit documents, including delete and add + */ this["allowEditDocuments"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditSigners", + baseName: "allow_edit_signers", + type: "boolean" + }, + { + name: "allowEditDocuments", + baseName: "allow_edit_documents", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubEditorOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubEditorOptions"); } }; -var SubEditorOptions = _SubEditorOptions; -SubEditorOptions.discriminator = void 0; -SubEditorOptions.attributeTypeMap = [ - { - name: "allowEditSigners", - baseName: "allow_edit_signers", - type: "boolean" - }, - { - name: "allowEditDocuments", - baseName: "allow_edit_documents", - type: "boolean" - } -]; // model/subFieldOptions.ts -var _SubFieldOptions = class { +var SubFieldOptions = class _SubFieldOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dateFormat", + baseName: "date_format", + type: "SubFieldOptions.DateFormatEnum" + } + ]; + } static getAttributeTypeMap() { return _SubFieldOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFieldOptions"); } }; -var SubFieldOptions = _SubFieldOptions; -SubFieldOptions.discriminator = void 0; -SubFieldOptions.attributeTypeMap = [ - { - name: "dateFormat", - baseName: "date_format", - type: "SubFieldOptions.DateFormatEnum" - } -]; ((SubFieldOptions2) => { let DateFormatEnum; ((DateFormatEnum2) => { @@ -20492,145 +21911,166 @@ SubFieldOptions.attributeTypeMap = [ })(SubFieldOptions || (SubFieldOptions = {})); // model/subFormFieldGroup.ts -var _SubFormFieldGroup = class { +var SubFormFieldGroup = class _SubFormFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "groupId", + baseName: "group_id", + type: "string" + }, + { + name: "groupLabel", + baseName: "group_label", + type: "string" + }, + { + name: "requirement", + baseName: "requirement", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldGroup"); } }; -var SubFormFieldGroup = _SubFormFieldGroup; -SubFormFieldGroup.discriminator = void 0; -SubFormFieldGroup.attributeTypeMap = [ - { - name: "groupId", - baseName: "group_id", - type: "string" - }, - { - name: "groupLabel", - baseName: "group_label", - type: "string" - }, - { - name: "requirement", - baseName: "requirement", - type: "string" - } -]; // model/subFormFieldRule.ts -var _SubFormFieldRule = class { +var SubFormFieldRule = class _SubFormFieldRule { constructor() { + /** + * Currently only `AND` is supported. Support for `OR` is being worked on. + */ this["triggerOperator"] = "AND"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "triggerOperator", + baseName: "trigger_operator", + type: "string" + }, + { + name: "triggers", + baseName: "triggers", + type: "Array" + }, + { + name: "actions", + baseName: "actions", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRule"); } }; -var SubFormFieldRule = _SubFormFieldRule; -SubFormFieldRule.discriminator = void 0; -SubFormFieldRule.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "triggerOperator", - baseName: "trigger_operator", - type: "string" - }, - { - name: "triggers", - baseName: "triggers", - type: "Array" - }, - { - name: "actions", - baseName: "actions", - type: "Array" - } -]; // model/subFormFieldRuleAction.ts -var _SubFormFieldRuleAction = class { +var SubFormFieldRuleAction = class _SubFormFieldRuleAction { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "hidden", + baseName: "hidden", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "SubFormFieldRuleAction.TypeEnum" + }, + { + name: "fieldId", + baseName: "field_id", + type: "string" + }, + { + name: "groupId", + baseName: "group_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleAction.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleAction"); } }; -var SubFormFieldRuleAction = _SubFormFieldRuleAction; -SubFormFieldRuleAction.discriminator = void 0; -SubFormFieldRuleAction.attributeTypeMap = [ - { - name: "hidden", - baseName: "hidden", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "SubFormFieldRuleAction.TypeEnum" - }, - { - name: "fieldId", - baseName: "field_id", - type: "string" - }, - { - name: "groupId", - baseName: "group_id", - type: "string" - } -]; ((SubFormFieldRuleAction2) => { let TypeEnum; ((TypeEnum2) => { + TypeEnum2["ChangeFieldVisibility"] = "change-field-visibility"; TypeEnum2["FieldVisibility"] = "change-field-visibility"; + TypeEnum2["ChangeGroupVisibility"] = "change-group-visibility"; TypeEnum2["GroupVisibility"] = "change-group-visibility"; })(TypeEnum = SubFormFieldRuleAction2.TypeEnum || (SubFormFieldRuleAction2.TypeEnum = {})); })(SubFormFieldRuleAction || (SubFormFieldRuleAction = {})); // model/subFormFieldRuleTrigger.ts -var _SubFormFieldRuleTrigger = class { +var SubFormFieldRuleTrigger = class _SubFormFieldRuleTrigger { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "operator", + baseName: "operator", + type: "SubFormFieldRuleTrigger.OperatorEnum" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "values", + baseName: "values", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleTrigger.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleTrigger"); } }; -var SubFormFieldRuleTrigger = _SubFormFieldRuleTrigger; -SubFormFieldRuleTrigger.discriminator = void 0; -SubFormFieldRuleTrigger.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "operator", - baseName: "operator", - type: "SubFormFieldRuleTrigger.OperatorEnum" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "values", - baseName: "values", - type: "Array" - } -]; ((SubFormFieldRuleTrigger2) => { let OperatorEnum; ((OperatorEnum2) => { @@ -20643,7 +22083,69 @@ SubFormFieldRuleTrigger.attributeTypeMap = [ })(SubFormFieldRuleTrigger || (SubFormFieldRuleTrigger = {})); // model/subFormFieldsPerDocumentBase.ts -var _SubFormFieldsPerDocumentBase = class { +var SubFormFieldsPerDocumentBase = class _SubFormFieldsPerDocumentBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "documentIndex", + baseName: "document_index", + type: "number" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "page", + baseName: "page", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldsPerDocumentBase.attributeTypeMap; } @@ -20684,75 +22186,42 @@ var _SubFormFieldsPerDocumentBase = class { return null; } }; -var SubFormFieldsPerDocumentBase = _SubFormFieldsPerDocumentBase; -SubFormFieldsPerDocumentBase.discriminator = "type"; -SubFormFieldsPerDocumentBase.attributeTypeMap = [ - { - name: "documentIndex", - baseName: "document_index", - type: "number" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "page", - baseName: "page", - type: "number" - } -]; // model/subFormFieldsPerDocumentCheckbox.ts -var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckbox = class _SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20760,35 +22229,32 @@ var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentCheckbox = _SubFormFieldsPerDocumentCheckbox; -SubFormFieldsPerDocumentCheckbox.discriminator = void 0; -SubFormFieldsPerDocumentCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/subFormFieldsPerDocumentCheckboxMerge.ts -var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckboxMerge = class _SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20796,26 +22262,46 @@ var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocum ); } }; -var SubFormFieldsPerDocumentCheckboxMerge = _SubFormFieldsPerDocumentCheckboxMerge; -SubFormFieldsPerDocumentCheckboxMerge.discriminator = void 0; -SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentDateSigned.ts -var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDateSigned = class _SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A date. Use the `SubFormFieldsPerDocumentDateSigned` class. + */ this["type"] = "date_signed"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20823,25 +22309,6 @@ var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocument ); } }; -var SubFormFieldsPerDocumentDateSigned = _SubFormFieldsPerDocumentDateSigned; -SubFormFieldsPerDocumentDateSigned.discriminator = void 0; -SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDateSigned2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -20865,15 +22332,54 @@ SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ })(SubFormFieldsPerDocumentDateSigned || (SubFormFieldsPerDocumentDateSigned = {})); // model/subFormFieldsPerDocumentDropdown.ts -var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDropdown = class _SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. + */ this["type"] = "dropdown"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } - static getAttributeTypeMap() { - return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDropdown.attributeTypeMap); + static { + this.discriminator = void 0; } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "options", + baseName: "options", + type: "Array" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDropdown.attributeTypeMap); + } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20881,35 +22387,6 @@ var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentDropdown = _SubFormFieldsPerDocumentDropdown; -SubFormFieldsPerDocumentDropdown.discriminator = void 0; -SubFormFieldsPerDocumentDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "options", - baseName: "options", - type: "Array" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDropdown2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -20954,15 +22431,54 @@ var SubFormFieldsPerDocumentFontEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentFontEnum || {}); // model/subFormFieldsPerDocumentHyperlink.ts -var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentHyperlink = class _SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. + */ this["type"] = "hyperlink"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "contentUrl", + baseName: "content_url", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20970,35 +22486,6 @@ var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentHyperlink = _SubFormFieldsPerDocumentHyperlink; -SubFormFieldsPerDocumentHyperlink.discriminator = void 0; -SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "contentUrl", - baseName: "content_url", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentHyperlink2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21022,14 +22509,30 @@ SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ })(SubFormFieldsPerDocumentHyperlink || (SubFormFieldsPerDocumentHyperlink = {})); // model/subFormFieldsPerDocumentInitials.ts -var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentInitials = class _SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21037,58 +22540,72 @@ var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentInitials = _SubFormFieldsPerDocumentInitials; -SubFormFieldsPerDocumentInitials.discriminator = void 0; -SubFormFieldsPerDocumentInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentRadio.ts -var _SubFormFieldsPerDocumentRadio = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentRadio = class _SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentRadio"); } }; -var SubFormFieldsPerDocumentRadio = _SubFormFieldsPerDocumentRadio; -SubFormFieldsPerDocumentRadio.discriminator = void 0; -SubFormFieldsPerDocumentRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - } -]; // model/subFormFieldsPerDocumentSignature.ts -var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentSignature = class _SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21096,89 +22613,90 @@ var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentSignature = _SubFormFieldsPerDocumentSignature; -SubFormFieldsPerDocumentSignature.discriminator = void 0; -SubFormFieldsPerDocumentSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentText.ts -var _SubFormFieldsPerDocumentText = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentText = class _SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text input field. Use the `SubFormFieldsPerDocumentText` class. + */ this["type"] = "text"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "placeholder", + baseName: "placeholder", + type: "string" + }, + { + name: "autoFillType", + baseName: "auto_fill_type", + type: "string" + }, + { + name: "linkId", + baseName: "link_id", + type: "string" + }, + { + name: "masked", + baseName: "masked", + type: "boolean" + }, + { + name: "validationType", + baseName: "validation_type", + type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" + }, + { + name: "validationCustomRegex", + baseName: "validation_custom_regex", + type: "string" + }, + { + name: "validationCustomRegexFormatLabel", + baseName: "validation_custom_regex_format_label", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentText.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentText"); } }; -var SubFormFieldsPerDocumentText = _SubFormFieldsPerDocumentText; -SubFormFieldsPerDocumentText.discriminator = void 0; -SubFormFieldsPerDocumentText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "placeholder", - baseName: "placeholder", - type: "string" - }, - { - name: "autoFillType", - baseName: "auto_fill_type", - type: "string" - }, - { - name: "linkId", - baseName: "link_id", - type: "string" - }, - { - name: "masked", - baseName: "masked", - type: "boolean" - }, - { - name: "validationType", - baseName: "validation_type", - type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" - }, - { - name: "validationCustomRegex", - baseName: "validation_custom_regex", - type: "string" - }, - { - name: "validationCustomRegexFormatLabel", - baseName: "validation_custom_regex_format_label", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentText.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -21215,15 +22733,44 @@ SubFormFieldsPerDocumentText.attributeTypeMap = [ })(SubFormFieldsPerDocumentText || (SubFormFieldsPerDocumentText = {})); // model/subFormFieldsPerDocumentTextMerge.ts -var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentTextMerge = class _SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. + */ this["type"] = "text-merge"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21231,25 +22778,6 @@ var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentTextMerge = _SubFormFieldsPerDocumentTextMerge; -SubFormFieldsPerDocumentTextMerge.discriminator = void 0; -SubFormFieldsPerDocumentTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentTextMerge2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21288,28 +22816,32 @@ var SubFormFieldsPerDocumentTypeEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentTypeEnum || {}); // model/subMergeField.ts -var _SubMergeField = class { +var SubMergeField = class _SubMergeField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "SubMergeField.TypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubMergeField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubMergeField"); } }; -var SubMergeField = _SubMergeField; -SubMergeField.discriminator = void 0; -SubMergeField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "SubMergeField.TypeEnum" - } -]; ((SubMergeField2) => { let TypeEnum; ((TypeEnum2) => { @@ -21319,28 +22851,32 @@ SubMergeField.attributeTypeMap = [ })(SubMergeField || (SubMergeField = {})); // model/subOAuth.ts -var _SubOAuth = class { +var SubOAuth = class _SubOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOAuth"); } }; -var SubOAuth = _SubOAuth; -SubOAuth.discriminator = void 0; -SubOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - } -]; ((SubOAuth2) => { let ScopesEnum; ((ScopesEnum2) => { @@ -21356,32 +22892,62 @@ SubOAuth.attributeTypeMap = [ })(SubOAuth || (SubOAuth = {})); // model/subOptions.ts -var _SubOptions = class { +var SubOptions = class _SubOptions { constructor() { + /** + * Determines if signers can use \"Insert Everywhere\" when signing a document. + */ this["canInsertEverywhere"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOptions"); } }; -var SubOptions = _SubOptions; -SubOptions.discriminator = void 0; -SubOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/subSignatureRequestGroupedSigners.ts -var _SubSignatureRequestGroupedSigners = class { +var SubSignatureRequestGroupedSigners = class _SubSignatureRequestGroupedSigners { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestGroupedSigners.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21389,69 +22955,54 @@ var _SubSignatureRequestGroupedSigners = class { ); } }; -var SubSignatureRequestGroupedSigners = _SubSignatureRequestGroupedSigners; -SubSignatureRequestGroupedSigners.discriminator = void 0; -SubSignatureRequestGroupedSigners.attributeTypeMap = [ - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subSignatureRequestSigner.ts -var _SubSignatureRequestSigner = class { +var SubSignatureRequestSigner = class _SubSignatureRequestSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSignatureRequestSigner"); } }; -var SubSignatureRequestSigner = _SubSignatureRequestSigner; -SubSignatureRequestSigner.discriminator = void 0; -SubSignatureRequestSigner.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -21461,10 +23012,48 @@ SubSignatureRequestSigner.attributeTypeMap = [ })(SubSignatureRequestSigner || (SubSignatureRequestSigner = {})); // model/subSignatureRequestTemplateSigner.ts -var _SubSignatureRequestTemplateSigner = class { +var SubSignatureRequestTemplateSigner = class _SubSignatureRequestTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21472,40 +23061,6 @@ var _SubSignatureRequestTemplateSigner = class { ); } }; -var SubSignatureRequestTemplateSigner = _SubSignatureRequestTemplateSigner; -SubSignatureRequestTemplateSigner.discriminator = void 0; -SubSignatureRequestTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestTemplateSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -21515,49 +23070,65 @@ SubSignatureRequestTemplateSigner.attributeTypeMap = [ })(SubSignatureRequestTemplateSigner || (SubSignatureRequestTemplateSigner = {})); // model/subSigningOptions.ts -var _SubSigningOptions = class { +var SubSigningOptions = class _SubSigningOptions { constructor() { + /** + * Allows drawing the signature + */ this["draw"] = false; + /** + * Allows using a smartphone to email the signature + */ this["phone"] = false; + /** + * Allows typing the signature + */ this["type"] = false; + /** + * Allows uploading the signature + */ this["upload"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "defaultType", + baseName: "default_type", + type: "SubSigningOptions.DefaultTypeEnum" + }, + { + name: "draw", + baseName: "draw", + type: "boolean" + }, + { + name: "phone", + baseName: "phone", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "boolean" + }, + { + name: "upload", + baseName: "upload", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubSigningOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSigningOptions"); } }; -var SubSigningOptions = _SubSigningOptions; -SubSigningOptions.discriminator = void 0; -SubSigningOptions.attributeTypeMap = [ - { - name: "defaultType", - baseName: "default_type", - type: "SubSigningOptions.DefaultTypeEnum" - }, - { - name: "draw", - baseName: "draw", - type: "boolean" - }, - { - name: "phone", - baseName: "phone", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "boolean" - }, - { - name: "upload", - baseName: "upload", - type: "boolean" - } -]; ((SubSigningOptions2) => { let DefaultTypeEnum; ((DefaultTypeEnum2) => { @@ -21569,87 +23140,122 @@ SubSigningOptions.attributeTypeMap = [ })(SubSigningOptions || (SubSigningOptions = {})); // model/subTeamResponse.ts -var _SubTeamResponse = class { +var SubTeamResponse = class _SubTeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubTeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTeamResponse"); } }; -var SubTeamResponse = _SubTeamResponse; -SubTeamResponse.discriminator = void 0; -SubTeamResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/subTemplateRole.ts -var _SubTemplateRole = class { +var SubTemplateRole = class _SubTemplateRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubTemplateRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTemplateRole"); } }; -var SubTemplateRole = _SubTemplateRole; -SubTemplateRole.discriminator = void 0; -SubTemplateRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftSigner.ts -var _SubUnclaimedDraftSigner = class { +var SubUnclaimedDraftSigner = class _SubUnclaimedDraftSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubUnclaimedDraftSigner"); } }; -var SubUnclaimedDraftSigner = _SubUnclaimedDraftSigner; -SubUnclaimedDraftSigner.discriminator = void 0; -SubUnclaimedDraftSigner.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftTemplateSigner.ts -var _SubUnclaimedDraftTemplateSigner = class { +var SubUnclaimedDraftTemplateSigner = class _SubUnclaimedDraftTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21657,28 +23263,9 @@ var _SubUnclaimedDraftTemplateSigner = class { ); } }; -var SubUnclaimedDraftTemplateSigner = _SubUnclaimedDraftTemplateSigner; -SubUnclaimedDraftTemplateSigner.discriminator = void 0; -SubUnclaimedDraftTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subWhiteLabelingOptions.ts -var _SubWhiteLabelingOptions = class { +var SubWhiteLabelingOptions = class _SubWhiteLabelingOptions { constructor() { this["headerBackgroundColor"] = "#1a1a1a"; this["legalVersion"] = _SubWhiteLabelingOptions.LegalVersionEnum.Terms1; @@ -21695,92 +23282,96 @@ var _SubWhiteLabelingOptions = class { this["textColor1"] = "#808080"; this["textColor2"] = "#ffffff"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "SubWhiteLabelingOptions.LegalVersionEnum" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + }, + { + name: "resetToDefault", + baseName: "reset_to_default", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubWhiteLabelingOptions"); } }; -var SubWhiteLabelingOptions = _SubWhiteLabelingOptions; -SubWhiteLabelingOptions.discriminator = void 0; -SubWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "SubWhiteLabelingOptions.LegalVersionEnum" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - }, - { - name: "resetToDefault", - baseName: "reset_to_default", - type: "boolean" - } -]; ((SubWhiteLabelingOptions2) => { let LegalVersionEnum; ((LegalVersionEnum2) => { @@ -21790,33 +23381,37 @@ SubWhiteLabelingOptions.attributeTypeMap = [ })(SubWhiteLabelingOptions || (SubWhiteLabelingOptions = {})); // model/teamAddMemberRequest.ts -var _TeamAddMemberRequest = class { +var TeamAddMemberRequest = class _TeamAddMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "TeamAddMemberRequest.RoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamAddMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamAddMemberRequest"); } }; -var TeamAddMemberRequest = _TeamAddMemberRequest; -TeamAddMemberRequest.discriminator = void 0; -TeamAddMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "TeamAddMemberRequest.RoleEnum" - } -]; ((TeamAddMemberRequest2) => { let RoleEnum; ((RoleEnum2) => { @@ -21828,302 +23423,345 @@ TeamAddMemberRequest.attributeTypeMap = [ })(TeamAddMemberRequest || (TeamAddMemberRequest = {})); // model/teamCreateRequest.ts -var _TeamCreateRequest = class { +var TeamCreateRequest = class _TeamCreateRequest { constructor() { + /** + * The name of your Team. + */ this["name"] = "Untitled Team"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamCreateRequest"); } }; -var TeamCreateRequest = _TeamCreateRequest; -TeamCreateRequest.discriminator = void 0; -TeamCreateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamGetInfoResponse.ts -var _TeamGetInfoResponse = class { +var TeamGetInfoResponse = class _TeamGetInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetInfoResponse"); } }; -var TeamGetInfoResponse = _TeamGetInfoResponse; -TeamGetInfoResponse.discriminator = void 0; -TeamGetInfoResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamGetResponse.ts -var _TeamGetResponse = class { +var TeamGetResponse = class _TeamGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetResponse"); } }; -var TeamGetResponse = _TeamGetResponse; -TeamGetResponse.discriminator = void 0; -TeamGetResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamInfoResponse.ts -var _TeamInfoResponse = class { +var TeamInfoResponse = class _TeamInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "teamParent", + baseName: "team_parent", + type: "TeamParentResponse" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "numMembers", + baseName: "num_members", + type: "number" + }, + { + name: "numSubTeams", + baseName: "num_sub_teams", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInfoResponse"); } }; -var TeamInfoResponse = _TeamInfoResponse; -TeamInfoResponse.discriminator = void 0; -TeamInfoResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "teamParent", - baseName: "team_parent", - type: "TeamParentResponse" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "numMembers", - baseName: "num_members", - type: "number" - }, - { - name: "numSubTeams", - baseName: "num_sub_teams", - type: "number" - } -]; // model/teamInviteResponse.ts -var _TeamInviteResponse = class { +var TeamInviteResponse = class _TeamInviteResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + }, + { + name: "redeemedAt", + baseName: "redeemed_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInviteResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInviteResponse"); } }; -var TeamInviteResponse = _TeamInviteResponse; -TeamInviteResponse.discriminator = void 0; -TeamInviteResponse.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - }, - { - name: "redeemedAt", - baseName: "redeemed_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/teamInvitesResponse.ts -var _TeamInvitesResponse = class { +var TeamInvitesResponse = class _TeamInvitesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamInvites", + baseName: "team_invites", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamInvitesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInvitesResponse"); } }; -var TeamInvitesResponse = _TeamInvitesResponse; -TeamInvitesResponse.discriminator = void 0; -TeamInvitesResponse.attributeTypeMap = [ - { - name: "teamInvites", - baseName: "team_invites", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamMemberResponse.ts -var _TeamMemberResponse = class { +var TeamMemberResponse = class _TeamMemberResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamMemberResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMemberResponse"); } }; -var TeamMemberResponse = _TeamMemberResponse; -TeamMemberResponse.discriminator = void 0; -TeamMemberResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - } -]; // model/teamMembersResponse.ts -var _TeamMembersResponse = class { +var TeamMembersResponse = class _TeamMembersResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamMembers", + baseName: "team_members", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamMembersResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMembersResponse"); } }; -var TeamMembersResponse = _TeamMembersResponse; -TeamMembersResponse.discriminator = void 0; -TeamMembersResponse.attributeTypeMap = [ - { - name: "teamMembers", - baseName: "team_members", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamParentResponse.ts -var _TeamParentResponse = class { +var TeamParentResponse = class _TeamParentResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamParentResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamParentResponse"); } }; -var TeamParentResponse = _TeamParentResponse; -TeamParentResponse.discriminator = void 0; -TeamParentResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamRemoveMemberRequest.ts -var _TeamRemoveMemberRequest = class { +var TeamRemoveMemberRequest = class _TeamRemoveMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "newOwnerEmailAddress", + baseName: "new_owner_email_address", + type: "string" + }, + { + name: "newTeamId", + baseName: "new_team_id", + type: "string" + }, + { + name: "newRole", + baseName: "new_role", + type: "TeamRemoveMemberRequest.NewRoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamRemoveMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamRemoveMemberRequest"); } }; -var TeamRemoveMemberRequest = _TeamRemoveMemberRequest; -TeamRemoveMemberRequest.discriminator = void 0; -TeamRemoveMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "newOwnerEmailAddress", - baseName: "new_owner_email_address", - type: "string" - }, - { - name: "newTeamId", - baseName: "new_team_id", - type: "string" - }, - { - name: "newRole", - baseName: "new_role", - type: "TeamRemoveMemberRequest.NewRoleEnum" - } -]; ((TeamRemoveMemberRequest2) => { let NewRoleEnum; ((NewRoleEnum2) => { @@ -22135,135 +23773,314 @@ TeamRemoveMemberRequest.attributeTypeMap = [ })(TeamRemoveMemberRequest || (TeamRemoveMemberRequest = {})); // model/teamResponse.ts -var _TeamResponse = class { +var TeamResponse = class _TeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "invitedAccounts", + baseName: "invited_accounts", + type: "Array" + }, + { + name: "invitedEmails", + baseName: "invited_emails", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamResponse"); } }; -var TeamResponse = _TeamResponse; -TeamResponse.discriminator = void 0; -TeamResponse.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "invitedAccounts", - baseName: "invited_accounts", - type: "Array" - }, - { - name: "invitedEmails", - baseName: "invited_emails", - type: "Array" - } -]; // model/teamSubTeamsResponse.ts -var _TeamSubTeamsResponse = class { +var TeamSubTeamsResponse = class _TeamSubTeamsResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "subTeams", + baseName: "sub_teams", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamSubTeamsResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamSubTeamsResponse"); } }; -var TeamSubTeamsResponse = _TeamSubTeamsResponse; -TeamSubTeamsResponse.discriminator = void 0; -TeamSubTeamsResponse.attributeTypeMap = [ - { - name: "subTeams", - baseName: "sub_teams", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamUpdateRequest.ts -var _TeamUpdateRequest = class { +var TeamUpdateRequest = class _TeamUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamUpdateRequest"); } }; -var TeamUpdateRequest = _TeamUpdateRequest; -TeamUpdateRequest.discriminator = void 0; -TeamUpdateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateAddUserRequest.ts -var _TemplateAddUserRequest = class { +var TemplateAddUserRequest = class _TemplateAddUserRequest { constructor() { + /** + * If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. + */ this["skipNotification"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "skipNotification", + baseName: "skip_notification", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateAddUserRequest"); } }; -var TemplateAddUserRequest = _TemplateAddUserRequest; -TemplateAddUserRequest.discriminator = void 0; -TemplateAddUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "skipNotification", - baseName: "skip_notification", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftRequest.ts -var _TemplateCreateEmbeddedDraftRequest = class { +var TemplateCreateEmbeddedDraftRequest = class _TemplateCreateEmbeddedDraftRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. + */ this["allowCcs"] = true; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22271,141 +24088,30 @@ var _TemplateCreateEmbeddedDraftRequest = class { ); } }; -var TemplateCreateEmbeddedDraftRequest = _TemplateCreateEmbeddedDraftRequest; -TemplateCreateEmbeddedDraftRequest.discriminator = void 0; -TemplateCreateEmbeddedDraftRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftResponse.ts -var _TemplateCreateEmbeddedDraftResponse = class { +var TemplateCreateEmbeddedDraftResponse = class _TemplateCreateEmbeddedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateEmbeddedDraftResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22413,26 +24119,40 @@ var _TemplateCreateEmbeddedDraftResponse = class { ); } }; -var TemplateCreateEmbeddedDraftResponse = _TemplateCreateEmbeddedDraftResponse; -TemplateCreateEmbeddedDraftResponse.discriminator = void 0; -TemplateCreateEmbeddedDraftResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateEmbeddedDraftResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateEmbeddedDraftResponseTemplate.ts -var _TemplateCreateEmbeddedDraftResponseTemplate = class { +var TemplateCreateEmbeddedDraftResponseTemplate = class _TemplateCreateEmbeddedDraftResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22440,516 +24160,606 @@ var _TemplateCreateEmbeddedDraftResponseTemplate = class { ); } }; -var TemplateCreateEmbeddedDraftResponseTemplate = _TemplateCreateEmbeddedDraftResponseTemplate; -TemplateCreateEmbeddedDraftResponseTemplate.discriminator = void 0; -TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateRequest.ts -var _TemplateCreateRequest = class { +var TemplateCreateRequest = class _TemplateCreateRequest { constructor() { + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateRequest"); } }; -var TemplateCreateRequest = _TemplateCreateRequest; -TemplateCreateRequest.discriminator = void 0; -TemplateCreateRequest.attributeTypeMap = [ - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateResponse.ts -var _TemplateCreateResponse = class { +var TemplateCreateResponse = class _TemplateCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponse"); } }; -var TemplateCreateResponse = _TemplateCreateResponse; -TemplateCreateResponse.discriminator = void 0; -TemplateCreateResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateResponseTemplate.ts -var _TemplateCreateResponseTemplate = class { +var TemplateCreateResponseTemplate = class _TemplateCreateResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponseTemplate"); } }; -var TemplateCreateResponseTemplate = _TemplateCreateResponseTemplate; -TemplateCreateResponseTemplate.discriminator = void 0; -TemplateCreateResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateEditResponse.ts -var _TemplateEditResponse = class { +var TemplateEditResponse = class _TemplateEditResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateEditResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateEditResponse"); } }; -var TemplateEditResponse = _TemplateEditResponse; -TemplateEditResponse.discriminator = void 0; -TemplateEditResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateGetResponse.ts -var _TemplateGetResponse = class { +var TemplateGetResponse = class _TemplateGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateGetResponse"); } }; -var TemplateGetResponse = _TemplateGetResponse; -TemplateGetResponse.discriminator = void 0; -TemplateGetResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateListResponse.ts -var _TemplateListResponse = class { +var TemplateListResponse = class _TemplateListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templates", + baseName: "templates", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateListResponse"); } }; -var TemplateListResponse = _TemplateListResponse; -TemplateListResponse.discriminator = void 0; -TemplateListResponse.attributeTypeMap = [ - { - name: "templates", - baseName: "templates", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateRemoveUserRequest.ts -var _TemplateRemoveUserRequest = class { +var TemplateRemoveUserRequest = class _TemplateRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateRemoveUserRequest"); } }; -var TemplateRemoveUserRequest = _TemplateRemoveUserRequest; -TemplateRemoveUserRequest.discriminator = void 0; -TemplateRemoveUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/templateResponse.ts -var _TemplateResponse = class { +var TemplateResponse = class _TemplateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "isEmbedded", + baseName: "is_embedded", + type: "boolean" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "canEdit", + baseName: "can_edit", + type: "boolean" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "documents", + baseName: "documents", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "namedFormFields", + baseName: "named_form_fields", + type: "Array" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponse"); } }; -var TemplateResponse = _TemplateResponse; -TemplateResponse.discriminator = void 0; -TemplateResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "isEmbedded", - baseName: "is_embedded", - type: "boolean" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "canEdit", - baseName: "can_edit", - type: "boolean" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "documents", - baseName: "documents", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "namedFormFields", - baseName: "named_form_fields", - type: "Array" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - } -]; // model/templateResponseAccount.ts -var _TemplateResponseAccount = class { +var TemplateResponseAccount = class _TemplateResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "TemplateResponseAccountQuota" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccount"); } }; -var TemplateResponseAccount = _TemplateResponseAccount; -TemplateResponseAccount.discriminator = void 0; -TemplateResponseAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "TemplateResponseAccountQuota" - } -]; // model/templateResponseAccountQuota.ts -var _TemplateResponseAccountQuota = class { +var TemplateResponseAccountQuota = class _TemplateResponseAccountQuota { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccountQuota.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccountQuota"); } }; -var TemplateResponseAccountQuota = _TemplateResponseAccountQuota; -TemplateResponseAccountQuota.discriminator = void 0; -TemplateResponseAccountQuota.attributeTypeMap = [ - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - } -]; // model/templateResponseCCRole.ts -var _TemplateResponseCCRole = class { +var TemplateResponseCCRole = class _TemplateResponseCCRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseCCRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseCCRole"); } }; -var TemplateResponseCCRole = _TemplateResponseCCRole; -TemplateResponseCCRole.discriminator = void 0; -TemplateResponseCCRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateResponseDocument.ts -var _TemplateResponseDocument = class { +var TemplateResponseDocument = class _TemplateResponseDocument { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "index", + baseName: "index", + type: "number" + }, + { + name: "fieldGroups", + baseName: "field_groups", + type: "Array" + }, + { + name: "formFields", + baseName: "form_fields", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "staticFields", + baseName: "static_fields", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocument.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseDocument"); } }; -var TemplateResponseDocument = _TemplateResponseDocument; -TemplateResponseDocument.discriminator = void 0; -TemplateResponseDocument.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "index", - baseName: "index", - type: "number" - }, - { - name: "fieldGroups", - baseName: "field_groups", - type: "Array" - }, - { - name: "formFields", - baseName: "form_fields", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "staticFields", - baseName: "static_fields", - type: "Array" - } -]; // model/templateResponseDocumentCustomFieldBase.ts -var _TemplateResponseDocumentCustomFieldBase = class { +var TemplateResponseDocumentCustomFieldBase = class _TemplateResponseDocumentCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentCustomFieldBase.attributeTypeMap; } @@ -22966,70 +24776,32 @@ var _TemplateResponseDocumentCustomFieldBase = class { return null; } }; -var TemplateResponseDocumentCustomFieldBase = _TemplateResponseDocumentCustomFieldBase; -TemplateResponseDocumentCustomFieldBase.discriminator = "type"; -TemplateResponseDocumentCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldCheckbox.ts -var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldCheckbox = class _TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23037,25 +24809,52 @@ var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentCustomFieldCheckbox = _TemplateResponseDocumentCustomFieldCheckbox; -TemplateResponseDocumentCustomFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldText.ts -var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldText = class _TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23063,41 +24862,30 @@ var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentCustomFieldText = _TemplateResponseDocumentCustomFieldText; -TemplateResponseDocumentCustomFieldText.discriminator = void 0; -TemplateResponseDocumentCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - } -]; // model/templateResponseDocumentFieldGroup.ts -var _TemplateResponseDocumentFieldGroup = class { +var TemplateResponseDocumentFieldGroup = class _TemplateResponseDocumentFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "rule", + baseName: "rule", + type: "TemplateResponseDocumentFieldGroupRule" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23105,26 +24893,30 @@ var _TemplateResponseDocumentFieldGroup = class { ); } }; -var TemplateResponseDocumentFieldGroup = _TemplateResponseDocumentFieldGroup; -TemplateResponseDocumentFieldGroup.discriminator = void 0; -TemplateResponseDocumentFieldGroup.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "rule", - baseName: "rule", - type: "TemplateResponseDocumentFieldGroupRule" - } -]; // model/templateResponseDocumentFieldGroupRule.ts -var _TemplateResponseDocumentFieldGroupRule = class { +var TemplateResponseDocumentFieldGroupRule = class _TemplateResponseDocumentFieldGroupRule { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "requirement", + baseName: "requirement", + type: "string" + }, + { + name: "groupLabel", + baseName: "groupLabel", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroupRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23132,23 +24924,61 @@ var _TemplateResponseDocumentFieldGroupRule = class { ); } }; -var TemplateResponseDocumentFieldGroupRule = _TemplateResponseDocumentFieldGroupRule; -TemplateResponseDocumentFieldGroupRule.discriminator = void 0; -TemplateResponseDocumentFieldGroupRule.attributeTypeMap = [ - { - name: "requirement", - baseName: "requirement", - type: "string" - }, - { - name: "groupLabel", - baseName: "groupLabel", - type: "string" - } -]; // model/templateResponseDocumentFormFieldBase.ts -var _TemplateResponseDocumentFormFieldBase = class { +var TemplateResponseDocumentFormFieldBase = class _TemplateResponseDocumentFormFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFormFieldBase.attributeTypeMap; } @@ -23183,65 +25013,37 @@ var _TemplateResponseDocumentFormFieldBase = class { return null; } }; -var TemplateResponseDocumentFormFieldBase = _TemplateResponseDocumentFormFieldBase; -TemplateResponseDocumentFormFieldBase.discriminator = "type"; -TemplateResponseDocumentFormFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/templateResponseDocumentFormFieldCheckbox.ts -var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldCheckbox = class _TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23249,30 +25051,37 @@ var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldCheckbox = _TemplateResponseDocumentFormFieldCheckbox; -TemplateResponseDocumentFormFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDateSigned.ts -var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDateSigned = class _TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23280,30 +25089,37 @@ var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateRespons ); } }; -var TemplateResponseDocumentFormFieldDateSigned = _TemplateResponseDocumentFormFieldDateSigned; -TemplateResponseDocumentFormFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDropdown.ts -var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDropdown = class _TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23311,30 +25127,57 @@ var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldDropdown = _TemplateResponseDocumentFormFieldDropdown; -TemplateResponseDocumentFormFieldDropdown.discriminator = void 0; -TemplateResponseDocumentFormFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldHyperlink.ts -var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldHyperlink = class _TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23342,50 +25185,37 @@ var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldHyperlink = _TemplateResponseDocumentFormFieldHyperlink; -TemplateResponseDocumentFormFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldInitials.ts -var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldInitials = class _TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23393,30 +25223,37 @@ var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldInitials = _TemplateResponseDocumentFormFieldInitials; -TemplateResponseDocumentFormFieldInitials.discriminator = void 0; -TemplateResponseDocumentFormFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldRadio.ts -var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldRadio = class _TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23424,30 +25261,37 @@ var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocu ); } }; -var TemplateResponseDocumentFormFieldRadio = _TemplateResponseDocumentFormFieldRadio; -TemplateResponseDocumentFormFieldRadio.discriminator = void 0; -TemplateResponseDocumentFormFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldSignature.ts -var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldSignature = class _TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23455,30 +25299,62 @@ var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldSignature = _TemplateResponseDocumentFormFieldSignature; -TemplateResponseDocumentFormFieldSignature.discriminator = void 0; -TemplateResponseDocumentFormFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldText.ts -var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldText = class _TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * 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` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "validationType", + baseName: "validation_type", + type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23486,45 +25362,6 @@ var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocum ); } }; -var TemplateResponseDocumentFormFieldText = _TemplateResponseDocumentFormFieldText; -TemplateResponseDocumentFormFieldText.discriminator = void 0; -TemplateResponseDocumentFormFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "validationType", - baseName: "validation_type", - type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; ((TemplateResponseDocumentFormFieldText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -23542,10 +25379,70 @@ TemplateResponseDocumentFormFieldText.attributeTypeMap = [ })(TemplateResponseDocumentFormFieldText || (TemplateResponseDocumentFormFieldText = {})); // model/templateResponseDocumentStaticFieldBase.ts -var _TemplateResponseDocumentStaticFieldBase = class { +var TemplateResponseDocumentStaticFieldBase = class _TemplateResponseDocumentStaticFieldBase { constructor() { + /** + * The signer of the Static Field. + */ this["signer"] = "me_now"; } + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentStaticFieldBase.attributeTypeMap; } @@ -23580,70 +25477,32 @@ var _TemplateResponseDocumentStaticFieldBase = class { return null; } }; -var TemplateResponseDocumentStaticFieldBase = _TemplateResponseDocumentStaticFieldBase; -TemplateResponseDocumentStaticFieldBase.discriminator = "type"; -TemplateResponseDocumentStaticFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldCheckbox.ts -var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldCheckbox = class _TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23651,25 +25510,32 @@ var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldCheckbox = _TemplateResponseDocumentStaticFieldCheckbox; -TemplateResponseDocumentStaticFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDateSigned.ts -var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDateSigned = class _TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23677,25 +25543,32 @@ var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateRespo ); } }; -var TemplateResponseDocumentStaticFieldDateSigned = _TemplateResponseDocumentStaticFieldDateSigned; -TemplateResponseDocumentStaticFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDropdown.ts -var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDropdown = class _TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23703,25 +25576,32 @@ var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldDropdown = _TemplateResponseDocumentStaticFieldDropdown; -TemplateResponseDocumentStaticFieldDropdown.discriminator = void 0; -TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldHyperlink.ts -var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldHyperlink = class _TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23729,25 +25609,32 @@ var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldHyperlink = _TemplateResponseDocumentStaticFieldHyperlink; -TemplateResponseDocumentStaticFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldInitials.ts -var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldInitials = class _TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23755,25 +25642,32 @@ var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldInitials = _TemplateResponseDocumentStaticFieldInitials; -TemplateResponseDocumentStaticFieldInitials.discriminator = void 0; -TemplateResponseDocumentStaticFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldRadio.ts -var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldRadio = class _TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23781,25 +25675,32 @@ var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDo ); } }; -var TemplateResponseDocumentStaticFieldRadio = _TemplateResponseDocumentStaticFieldRadio; -TemplateResponseDocumentStaticFieldRadio.discriminator = void 0; -TemplateResponseDocumentStaticFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldSignature.ts -var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldSignature = class _TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23807,25 +25708,32 @@ var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldSignature = _TemplateResponseDocumentStaticFieldSignature; -TemplateResponseDocumentStaticFieldSignature.discriminator = void 0; -TemplateResponseDocumentStaticFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldText.ts -var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldText = class _TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23833,21 +25741,30 @@ var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentStaticFieldText = _TemplateResponseDocumentStaticFieldText; -TemplateResponseDocumentStaticFieldText.discriminator = void 0; -TemplateResponseDocumentStaticFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseFieldAvgTextLength.ts -var _TemplateResponseFieldAvgTextLength = class { +var TemplateResponseFieldAvgTextLength = class _TemplateResponseFieldAvgTextLength { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numLines", + baseName: "num_lines", + type: "number" + }, + { + name: "numCharsPerLine", + baseName: "num_chars_per_line", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseFieldAvgTextLength.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23855,116 +25772,135 @@ var _TemplateResponseFieldAvgTextLength = class { ); } }; -var TemplateResponseFieldAvgTextLength = _TemplateResponseFieldAvgTextLength; -TemplateResponseFieldAvgTextLength.discriminator = void 0; -TemplateResponseFieldAvgTextLength.attributeTypeMap = [ - { - name: "numLines", - baseName: "num_lines", - type: "number" - }, - { - name: "numCharsPerLine", - baseName: "num_chars_per_line", - type: "number" - } -]; // model/templateResponseSignerRole.ts -var _TemplateResponseSignerRole = class { +var TemplateResponseSignerRole = class _TemplateResponseSignerRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseSignerRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseSignerRole"); } }; -var TemplateResponseSignerRole = _TemplateResponseSignerRole; -TemplateResponseSignerRole.discriminator = void 0; -TemplateResponseSignerRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/templateUpdateFilesRequest.ts -var _TemplateUpdateFilesRequest = class { +var TemplateUpdateFilesRequest = class _TemplateUpdateFilesRequest { constructor() { + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesRequest"); } }; -var TemplateUpdateFilesRequest = _TemplateUpdateFilesRequest; -TemplateUpdateFilesRequest.discriminator = void 0; -TemplateUpdateFilesRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/templateUpdateFilesResponse.ts -var _TemplateUpdateFilesResponse = class { +var TemplateUpdateFilesResponse = class _TemplateUpdateFilesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateUpdateFilesResponseTemplate" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesResponse"); } }; -var TemplateUpdateFilesResponse = _TemplateUpdateFilesResponse; -TemplateUpdateFilesResponse.discriminator = void 0; -TemplateUpdateFilesResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateUpdateFilesResponseTemplate" - } -]; // model/templateUpdateFilesResponseTemplate.ts -var _TemplateUpdateFilesResponseTemplate = class { +var TemplateUpdateFilesResponseTemplate = class _TemplateUpdateFilesResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23972,43 +25908,262 @@ var _TemplateUpdateFilesResponseTemplate = class { ); } }; -var TemplateUpdateFilesResponseTemplate = _TemplateUpdateFilesResponseTemplate; -TemplateUpdateFilesResponseTemplate.discriminator = void 0; -TemplateUpdateFilesResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftCreateEmbeddedRequest.ts -var _UnclaimedDraftCreateEmbeddedRequest = class { +var UnclaimedDraftCreateEmbeddedRequest = class _UnclaimedDraftCreateEmbeddedRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = true; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the signers. + */ this["forceSignerPage"] = false; + /** + * Provide users the ability to review/edit the subject and message. + */ this["forceSubjectMessage"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. + */ this["type"] = _UnclaimedDraftCreateEmbeddedRequest.TypeEnum.RequestSignature; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerPage", + baseName: "force_signer_page", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24016,190 +26171,6 @@ var _UnclaimedDraftCreateEmbeddedRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedRequest = _UnclaimedDraftCreateEmbeddedRequest; -UnclaimedDraftCreateEmbeddedRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerPage", - baseName: "force_signer_page", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateEmbeddedRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -24209,25 +26180,222 @@ UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ })(UnclaimedDraftCreateEmbeddedRequest || (UnclaimedDraftCreateEmbeddedRequest = {})); // model/unclaimedDraftCreateEmbeddedWithTemplateRequest.ts -var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { +var UnclaimedDraftCreateEmbeddedWithTemplateRequest = class _UnclaimedDraftCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24235,302 +26403,170 @@ var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedWithTemplateRequest = _UnclaimedDraftCreateEmbeddedWithTemplateRequest; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - } -]; // model/unclaimedDraftCreateRequest.ts -var _UnclaimedDraftCreateRequest = class { +var UnclaimedDraftCreateRequest = class _UnclaimedDraftCreateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateRequest.TypeEnum" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateRequest"); } }; -var UnclaimedDraftCreateRequest = _UnclaimedDraftCreateRequest; -UnclaimedDraftCreateRequest.discriminator = void 0; -UnclaimedDraftCreateRequest.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateRequest.TypeEnum" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -24540,38 +26576,96 @@ UnclaimedDraftCreateRequest.attributeTypeMap = [ })(UnclaimedDraftCreateRequest || (UnclaimedDraftCreateRequest = {})); // model/unclaimedDraftCreateResponse.ts -var _UnclaimedDraftCreateResponse = class { +var UnclaimedDraftCreateResponse = class _UnclaimedDraftCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "unclaimedDraft", + baseName: "unclaimed_draft", + type: "UnclaimedDraftResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateResponse"); } }; -var UnclaimedDraftCreateResponse = _UnclaimedDraftCreateResponse; -UnclaimedDraftCreateResponse.discriminator = void 0; -UnclaimedDraftCreateResponse.attributeTypeMap = [ - { - name: "unclaimedDraft", - baseName: "unclaimed_draft", - type: "UnclaimedDraftResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftEditAndResendRequest.ts -var _UnclaimedDraftEditAndResendRequest = class { +var UnclaimedDraftEditAndResendRequest = class _UnclaimedDraftEditAndResendRequest { constructor() { + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftEditAndResendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24579,118 +26673,82 @@ var _UnclaimedDraftEditAndResendRequest = class { ); } }; -var UnclaimedDraftEditAndResendRequest = _UnclaimedDraftEditAndResendRequest; -UnclaimedDraftEditAndResendRequest.discriminator = void 0; -UnclaimedDraftEditAndResendRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/unclaimedDraftResponse.ts -var _UnclaimedDraftResponse = class { +var UnclaimedDraftResponse = class _UnclaimedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "claimUrl", + baseName: "claim_url", + type: "string" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftResponse"); } }; -var UnclaimedDraftResponse = _UnclaimedDraftResponse; -UnclaimedDraftResponse.discriminator = void 0; -UnclaimedDraftResponse.attributeTypeMap = [ - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "claimUrl", - baseName: "claim_url", - type: "string" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/warningResponse.ts -var _WarningResponse = class { +var WarningResponse = class _WarningResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "warningMsg", + baseName: "warning_msg", + type: "string" + }, + { + name: "warningName", + baseName: "warning_name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _WarningResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "WarningResponse"); } }; -var WarningResponse = _WarningResponse; -WarningResponse.discriminator = void 0; -WarningResponse.attributeTypeMap = [ - { - name: "warningMsg", - baseName: "warning_msg", - type: "string" - }, - { - name: "warningName", - baseName: "warning_name", - type: "string" - } -]; // model/index.ts var enumsMap = { @@ -24788,6 +26846,10 @@ var typeMap = { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -24935,7 +26997,7 @@ var AccountApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -24961,190 +27023,98 @@ var AccountApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - accountCreate(_0) { - return __async(this, arguments, function* (accountCreateRequest, options = { headers: {} }) { - accountCreateRequest = deserializeIfNeeded( + /** + * Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + * @summary Create Account + * @param accountCreateRequest + * @param options + */ + async accountCreate(accountCreateRequest, options = { headers: {} }) { + accountCreateRequest = deserializeIfNeeded( + accountCreateRequest, + "AccountCreateRequest" + ); + const localVarPath = this.basePath + "/account/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountCreateRequest === null || accountCreateRequest === void 0) { + throw new Error( + "Required parameter accountCreateRequest was null or undefined when calling accountCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountCreateRequest, + AccountCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountCreateRequest, "AccountCreateRequest" ); - const localVarPath = this.basePath + "/account/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountCreateRequest === null || accountCreateRequest === void 0) { - throw new Error( - "Required parameter accountCreateRequest was null or undefined when calling accountCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountCreateRequest, - AccountCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountCreateRequest, - "AccountCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - accountGet(_0, _1) { - return __async(this, arguments, function* (accountId, emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse( resolve, reject, response, - "AccountGetResponse" + "AccountCreateResponse" ); }, (error) => { @@ -25156,7 +27126,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountCreateResponse" )) { return; } @@ -25171,93 +27141,326 @@ var AccountApi = class { reject(error); } ); - }); - }); + } + ); }); } - accountUpdate(_0) { - return __async(this, arguments, function* (accountUpdateRequest, options = { headers: {} }) { - accountUpdateRequest = deserializeIfNeeded( - accountUpdateRequest, - "AccountUpdateRequest" - ); - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns the properties and settings of your Account. + * @summary Get Account + * @param accountId `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + * @param emailAddress `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + * @param options + */ + async accountGet(accountId, emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountUpdateRequest === null || accountUpdateRequest === void 0) { - throw new Error( - "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." + } + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( + }); + }); + } + /** + * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * @summary Update Account + * @param accountUpdateRequest + * @param options + */ + async accountUpdate(accountUpdateRequest, options = { headers: {} }) { + accountUpdateRequest = deserializeIfNeeded( + accountUpdateRequest, + "AccountUpdateRequest" + ); + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountUpdateRequest === null || accountUpdateRequest === void 0) { + throw new Error( + "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountUpdateRequest, + AccountUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountUpdateRequest, - AccountUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountUpdateRequest, - "AccountUpdateRequest" + "AccountUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + }); + }); + } + /** + * Verifies whether an Dropbox Sign Account exists for the given email address. + * @summary Verify Account + * @param accountVerifyRequest + * @param options + */ + async accountVerify(accountVerifyRequest, options = { headers: {} }) { + accountVerifyRequest = deserializeIfNeeded( + accountVerifyRequest, + "AccountVerifyRequest" + ); + const localVarPath = this.basePath + "/account/verify"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountVerifyRequest === null || accountVerifyRequest === void 0) { + throw new Error( + "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountVerifyRequest, + AccountVerifyRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + accountVerifyRequest, + "AccountVerifyRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse( resolve, reject, response, - "AccountGetResponse" + "AccountVerifyResponse" ); }, (error) => { @@ -25269,7 +27472,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountVerifyResponse" )) { return; } @@ -25284,123 +27487,8 @@ var AccountApi = class { reject(error); } ); - }); - }); - }); - } - accountVerify(_0) { - return __async(this, arguments, function* (accountVerifyRequest, options = { headers: {} }) { - accountVerifyRequest = deserializeIfNeeded( - accountVerifyRequest, - "AccountVerifyRequest" - ); - const localVarPath = this.basePath + "/account/verify"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountVerifyRequest === null || accountVerifyRequest === void 0) { - throw new Error( - "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountVerifyRequest, - AccountVerifyRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountVerifyRequest, - "AccountVerifyRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountVerifyResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountVerifyResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } }; @@ -25464,7 +27552,7 @@ var ApiAppApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -25490,513 +27578,541 @@ var ApiAppApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - apiAppCreate(_0) { - return __async(this, arguments, function* (apiAppCreateRequest, options = { headers: {} }) { - apiAppCreateRequest = deserializeIfNeeded2( + /** + * Creates a new API App. + * @summary Create API App + * @param apiAppCreateRequest + * @param options + */ + async apiAppCreate(apiAppCreateRequest, options = { headers: {} }) { + apiAppCreateRequest = deserializeIfNeeded2( + apiAppCreateRequest, + "ApiAppCreateRequest" + ); + const localVarPath = this.basePath + "/api_app"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { + throw new Error( + "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppCreateRequest, + ApiAppCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppCreateRequest, "ApiAppCreateRequest" ); - const localVarPath = this.basePath + "/api_app"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { - throw new Error( - "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppCreateRequest, - ApiAppCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppCreateRequest, - "ApiAppCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 201, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 201, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppDelete(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) + /** + * Deletes an API App. Can only be invoked for apps you own. + * @summary Delete API App + * @param clientId The client id of the API App to delete. + * @param options + */ + async apiAppDelete(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppDelete." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppGet(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns an object with information about an API App. + * @summary Get API App + * @param clientId The client id of the API App to retrieve. + * @param options + */ + async apiAppGet(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppGet." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + * @summary List API Apps + * @param page Which page number of the API App List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async apiAppList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppListResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppListResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppUpdate(_0, _1) { - return __async(this, arguments, function* (clientId, apiAppUpdateRequest, options = { headers: {} }) { - apiAppUpdateRequest = deserializeIfNeeded2( + /** + * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + * @summary Update API App + * @param clientId The client id of the API App to update. + * @param apiAppUpdateRequest + * @param options + */ + async apiAppUpdate(clientId, apiAppUpdateRequest, options = { headers: {} }) { + apiAppUpdateRequest = deserializeIfNeeded2( + apiAppUpdateRequest, + "ApiAppUpdateRequest" + ); + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppUpdate." + ); + } + if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { + throw new Error( + "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppUpdateRequest, + ApiAppUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppUpdateRequest, "ApiAppUpdateRequest" ); - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppUpdate." - ); - } - if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { - throw new Error( - "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppUpdateRequest, - ApiAppUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppUpdateRequest, - "ApiAppUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -26061,7 +28177,7 @@ var BulkSendJobApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26087,214 +28203,225 @@ var BulkSendJobApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - bulkSendJobGet(_0, _1, _2) { - return __async(this, arguments, function* (bulkSendJobId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( - "{bulk_send_job_id}", - encodeURIComponent(String(bulkSendJobId)) + /** + * Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + * @summary Get Bulk Send Job + * @param bulkSendJobId The id of the BulkSendJob to retrieve. + * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobGet(bulkSendJobId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( + "{bulk_send_job_id}", + encodeURIComponent(String(bulkSendJobId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (bulkSendJobId === null || bulkSendJobId === void 0) { + throw new Error( + "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (bulkSendJobId === null || bulkSendJobId === void 0) { - throw new Error( - "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobGetResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - bulkSendJobList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobListResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobGetResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Returns a list of BulkSendJob that you can access. + * @summary List Bulk Send Jobs + * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobListResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobListResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -26352,7 +28479,7 @@ var EmbeddedApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26378,224 +28505,236 @@ var EmbeddedApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - embeddedEditUrl(_0, _1) { - return __async(this, arguments, function* (templateId, embeddedEditUrlRequest, options = { headers: {} }) { - embeddedEditUrlRequest = deserializeIfNeeded3( + /** + * Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + * @summary Get Embedded Template Edit URL + * @param templateId The id of the template to edit. + * @param embeddedEditUrlRequest + * @param options + */ + async embeddedEditUrl(templateId, embeddedEditUrlRequest, options = { headers: {} }) { + embeddedEditUrlRequest = deserializeIfNeeded3( + embeddedEditUrlRequest, + "EmbeddedEditUrlRequest" + ); + const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling embeddedEditUrl." + ); + } + if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { + throw new Error( + "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + embeddedEditUrlRequest, + EmbeddedEditUrlRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( embeddedEditUrlRequest, "EmbeddedEditUrlRequest" ); - const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling embeddedEditUrl." - ); - } - if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { - throw new Error( - "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - embeddedEditUrlRequest, - EmbeddedEditUrlRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - embeddedEditUrlRequest, - "EmbeddedEditUrlRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedEditUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedEditUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedEditUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedEditUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - embeddedSignUrl(_0) { - return __async(this, arguments, function* (signatureId, options = { headers: {} }) { - const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( - "{signature_id}", - encodeURIComponent(String(signatureId)) + /** + * Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + * @summary Get Embedded Sign URL + * @param signatureId The id of the signature to get a signature url for. + * @param options + */ + async embeddedSignUrl(signatureId, options = { headers: {} }) { + const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( + "{signature_id}", + encodeURIComponent(String(signatureId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureId === null || signatureId === void 0) { + throw new Error( + "Required parameter signatureId was null or undefined when calling embeddedSignUrl." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureId === null || signatureId === void 0) { - throw new Error( - "Required parameter signatureId was null or undefined when calling embeddedSignUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedSignUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedSignUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedSignUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedSignUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -26659,7 +28798,7 @@ var FaxApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26685,456 +28824,480 @@ var FaxApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxDelete(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Deletes the specified Fax from the system + * @summary Delete Fax + * @param faxId Fax ID + * @param options + */ + async faxDelete(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxDelete." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxFiles(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) + /** + * Downloads files associated with a Fax + * @summary Download Fax Files + * @param faxId Fax ID + * @param options + */ + async faxFiles(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxFiles." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "Buffer" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "RequestFile" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxGet(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns information about a Fax + * @summary Get Fax + * @param faxId Fax ID + * @param options + */ + async faxGet(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxGet." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns properties of multiple Faxes + * @summary Lists Faxes + * @param page Which page number of the Fax List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async faxList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxListResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxListResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxSend(_0) { - return __async(this, arguments, function* (faxSendRequest, options = { headers: {} }) { - faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); - const localVarPath = this.basePath + "/fax/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxSendRequest === null || faxSendRequest === void 0) { - throw new Error( - "Required parameter faxSendRequest was null or undefined when calling faxSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxSendRequest, - FaxSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + /** + * Creates and sends a new Fax with the submitted file(s) + * @summary Send Fax + * @param faxSendRequest + * @param options + */ + async faxSend(faxSendRequest, options = { headers: {} }) { + faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); + const localVarPath = this.basePath + "/fax/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxSendRequest === null || faxSendRequest === void 0) { + throw new Error( + "Required parameter faxSendRequest was null or undefined when calling faxSend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxSendRequest, + FaxSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -27199,7 +29362,7 @@ var FaxLineApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -27225,305 +29388,211 @@ var FaxLineApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxLineAddUser(_0) { - return __async(this, arguments, function* (faxLineAddUserRequest, options = { headers: {} }) { - faxLineAddUserRequest = deserializeIfNeeded5( + /** + * Grants a user access to the specified Fax Line. + * @summary Add Fax Line User + * @param faxLineAddUserRequest + * @param options + */ + async faxLineAddUser(faxLineAddUserRequest, options = { headers: {} }) { + faxLineAddUserRequest = deserializeIfNeeded5( + faxLineAddUserRequest, + "FaxLineAddUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/add_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { + throw new Error( + "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineAddUserRequest, + FaxLineAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineAddUserRequest, "FaxLineAddUserRequest" ); - const localVarPath = this.basePath + "/fax_line/add_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { - throw new Error( - "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineAddUserRequest, - FaxLineAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineAddUserRequest, - "FaxLineAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - }); - }); - }); - } - faxLineAreaCodeGet(_0, _1, _2, _3) { - return __async(this, arguments, function* (country, state, province, city, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/area_codes"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (country === null || country === void 0) { - throw new Error( - "Required parameter country was null or undefined when calling faxLineAreaCodeGet." - ); - } - if (country !== void 0) { - localVarQueryParameters["country"] = ObjectSerializer.serialize( - country, - "'CA' | 'US' | 'UK'" - ); - } - if (state !== void 0) { - localVarQueryParameters["state"] = ObjectSerializer.serialize( - state, - "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" - ); - } - if (province !== void 0) { - localVarQueryParameters["province"] = ObjectSerializer.serialize( - province, - "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" - ); - } - if (city !== void 0) { - localVarQueryParameters["city"] = ObjectSerializer.serialize( - city, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineAreaCodeGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineAreaCodeGetResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - faxLineCreate(_0) { - return __async(this, arguments, function* (faxLineCreateRequest, options = { headers: {} }) { - faxLineCreateRequest = deserializeIfNeeded5( - faxLineCreateRequest, - "FaxLineCreateRequest" + /** + * Returns a list of available area codes for a given state/province and city + * @summary Get Available Fax Line Area Codes + * @param country Filter area codes by country + * @param state Filter area codes by state + * @param province Filter area codes by province + * @param city Filter area codes by city + * @param options + */ + async faxLineAreaCodeGet(country, state, province, city, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/area_codes"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (country === null || country === void 0) { + throw new Error( + "Required parameter country was null or undefined when calling faxLineAreaCodeGet." ); - const localVarPath = this.basePath + "/fax_line/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (country !== void 0) { + localVarQueryParameters["country"] = ObjectSerializer.serialize( + country, + "'CA' | 'US' | 'UK'" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { - throw new Error( - "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineCreateRequest, - FaxLineCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineCreateRequest, - "FaxLineCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + if (state !== void 0) { + localVarQueryParameters["state"] = ObjectSerializer.serialize( + state, + "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" + ); + } + if (province !== void 0) { + localVarQueryParameters["province"] = ObjectSerializer.serialize( + province, + "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" + ); + } + if (city !== void 0) { + localVarQueryParameters["city"] = ObjectSerializer.serialize( + city, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" ); }, (error) => { @@ -27535,7 +29604,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" )) { return; } @@ -27550,168 +29619,409 @@ var FaxLineApi = class { reject(error); } ); - }); + } + ); + }); + } + /** + * Purchases a new Fax Line + * @summary Purchase Fax Line + * @param faxLineCreateRequest + * @param options + */ + async faxLineCreate(faxLineCreateRequest, options = { headers: {} }) { + faxLineCreateRequest = deserializeIfNeeded5( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + const localVarPath = this.basePath + "/fax_line/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { + throw new Error( + "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineCreateRequest, + FaxLineCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineDelete(_0) { - return __async(this, arguments, function* (faxLineDeleteRequest, options = { headers: {} }) { - faxLineDeleteRequest = deserializeIfNeeded5( + /** + * Deletes the specified Fax Line from the subscription. + * @summary Delete Fax Line + * @param faxLineDeleteRequest + * @param options + */ + async faxLineDelete(faxLineDeleteRequest, options = { headers: {} }) { + faxLineDeleteRequest = deserializeIfNeeded5( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { + throw new Error( + "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineDeleteRequest, + FaxLineDeleteRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineDeleteRequest, "FaxLineDeleteRequest" ); - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { - throw new Error( - "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineDeleteRequest, - FaxLineDeleteRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineDeleteRequest, - "FaxLineDeleteRequest" - ); - } - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns the properties and settings of a Fax Line. + * @summary Get Fax Line + * @param number The Fax Line number + * @param options + */ + async faxLineGet(number, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (number === null || number === void 0) { + throw new Error( + "Required parameter number was null or undefined when calling faxLineGet." + ); + } + if (number !== void 0) { + localVarQueryParameters["number"] = ObjectSerializer.serialize( + number, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineGet(_0) { - return __async(this, arguments, function* (number, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (number === null || number === void 0) { - throw new Error( - "Required parameter number was null or undefined when calling faxLineGet." - ); - } - if (number !== void 0) { - localVarQueryParameters["number"] = ObjectSerializer.serialize( - number, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the properties and settings of multiple Fax Lines. + * @summary List Fax Lines + * @param accountId Account ID + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param showTeamLines Include Fax Lines belonging to team members in the list + * @param options + */ + async faxLineList(accountId, page, pageSize, showTeamLines, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (showTeamLines !== void 0) { + localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( + showTeamLines, + "boolean" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineListResponse" ); }, (error) => { @@ -27723,7 +30033,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineListResponse" )) { return; } @@ -27738,223 +30048,122 @@ var FaxLineApi = class { reject(error); } ); - }); - }); + } + ); }); } - faxLineList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, showTeamLines, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (showTeamLines !== void 0) { - localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( - showTeamLines, - "boolean" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Removes a user\'s access to the specified Fax Line + * @summary Remove Fax Line Access + * @param faxLineRemoveUserRequest + * @param options + */ + async faxLineRemoveUser(faxLineRemoveUserRequest, options = { headers: {} }) { + faxLineRemoveUserRequest = deserializeIfNeeded5( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/remove_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { + throw new Error( + "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineListResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - faxLineRemoveUser(_0) { - return __async(this, arguments, function* (faxLineRemoveUserRequest, options = { headers: {} }) { - faxLineRemoveUserRequest = deserializeIfNeeded5( + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineRemoveUserRequest, + FaxLineRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineRemoveUserRequest, "FaxLineRemoveUserRequest" ); - const localVarPath = this.basePath + "/fax_line/remove_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { - throw new Error( - "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineRemoveUserRequest, - FaxLineRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineRemoveUserRequest, - "FaxLineRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -28019,7 +30228,7 @@ var OAuthApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28045,209 +30254,223 @@ var OAuthApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - oauthTokenGenerate(_0) { - return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { - oAuthTokenGenerateRequest = deserializeIfNeeded6( + /** + * Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + * @summary OAuth Token Generate + * @param oAuthTokenGenerateRequest + * @param options + */ + async oauthTokenGenerate(oAuthTokenGenerateRequest, options = { headers: {} }) { + oAuthTokenGenerateRequest = deserializeIfNeeded6( + oAuthTokenGenerateRequest, + "OAuthTokenGenerateRequest" + ); + const localVarPath = this.basePath + "/oauth/token"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenGenerateRequest, + OAuthTokenGenerateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( oAuthTokenGenerateRequest, "OAuthTokenGenerateRequest" ); - const localVarPath = this.basePath + "/oauth/token"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenGenerateRequest, - OAuthTokenGenerateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenGenerateRequest, - "OAuthTokenGenerateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - oauthTokenRefresh(_0) { - return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { - oAuthTokenRefreshRequest = deserializeIfNeeded6( + /** + * Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + * @summary OAuth Token Refresh + * @param oAuthTokenRefreshRequest + * @param options + */ + async oauthTokenRefresh(oAuthTokenRefreshRequest, options = { headers: {} }) { + oAuthTokenRefreshRequest = deserializeIfNeeded6( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" + ); + const localVarPath = this.basePath + "/oauth/token?refresh"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenRefreshRequest, + OAuthTokenRefreshRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( oAuthTokenRefreshRequest, "OAuthTokenRefreshRequest" ); - const localVarPath = this.basePath + "/oauth/token?refresh"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenRefreshRequest, - OAuthTokenRefreshRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -28312,7 +30535,7 @@ var ReportApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28338,114 +30561,121 @@ var ReportApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - reportCreate(_0) { - return __async(this, arguments, function* (reportCreateRequest, options = { headers: {} }) { - reportCreateRequest = deserializeIfNeeded7( + /** + * Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + * @summary Create Report + * @param reportCreateRequest + * @param options + */ + async reportCreate(reportCreateRequest, options = { headers: {} }) { + reportCreateRequest = deserializeIfNeeded7( + reportCreateRequest, + "ReportCreateRequest" + ); + const localVarPath = this.basePath + "/report/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (reportCreateRequest === null || reportCreateRequest === void 0) { + throw new Error( + "Required parameter reportCreateRequest was null or undefined when calling reportCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + reportCreateRequest, + ReportCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( reportCreateRequest, "ReportCreateRequest" ); - const localVarPath = this.basePath + "/report/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (reportCreateRequest === null || reportCreateRequest === void 0) { - throw new Error( - "Required parameter reportCreateRequest was null or undefined when calling reportCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - reportCreateRequest, - ReportCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - reportCreateRequest, - "ReportCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse8( - resolve, - reject, - response, - "ReportCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse8( - reject, - error.response, - 200, - "ReportCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse8( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse8( + resolve, + reject, + response, + "ReportCreateResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse8( + reject, + error.response, + 200, + "ReportCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse8( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -28509,7 +30739,7 @@ var SignatureRequestApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28535,298 +30765,108 @@ var SignatureRequestApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - signatureRequestBulkCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + * @summary Embedded Bulk Send with Template + * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestBulkCreateEmbeddedWithTemplate(signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestBulkSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } else { + data = ObjectSerializer.serialize( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkSendWithTemplateRequest, - SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestCancel(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "BulkSendJobSendResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "BulkSendJobSendResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -28838,311 +30878,102 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); - }); - } - signatureRequestCreateEmbedded(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( - signatureRequestCreateEmbeddedRequest, - "SignatureRequestCreateEmbeddedRequest" - ); - const localVarPath = this.basePath + "/signature_request/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedRequest, - SignatureRequestCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedRequest, - "SignatureRequestCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - signatureRequestCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( - signatureRequestCreateEmbeddedWithTemplateRequest, - "SignatureRequestCreateEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + * @summary Bulk Send with Template + * @param signatureRequestBulkSendWithTemplateRequest + * @param options + */ + async signatureRequestBulkSendWithTemplate(signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedWithTemplateRequest, - SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedWithTemplateRequest, - "SignatureRequestCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkSendWithTemplateRequest, + SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestFiles(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "Buffer" + "BulkSendJobSendResponse" ); }, (error) => { @@ -29154,7 +30985,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "RequestFile" + "BulkSendJobSendResponse" )) { return; } @@ -29169,178 +31000,188 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestFilesAsDataUri(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * 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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + * @summary Cancel Incomplete Signature Request + * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. + * @param options + */ + async signatureRequestCancel(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - signatureRequestFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + /** + * Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request + * @param signatureRequestCreateEmbeddedRequest + * @param options + */ + async signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedRequest, + "SignatureRequestCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedRequest, + SignatureRequestCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestCreateEmbeddedRequest, + "SignatureRequestCreateEmbeddedRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "FileResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -29352,7 +31193,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "FileResponse" + "SignatureRequestGetResponse" )) { return; } @@ -29367,502 +31208,248 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestGet(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request with Template + * @param signatureRequestCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedWithTemplateRequest, + "SignatureRequestCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } else { + data = ObjectSerializer.serialize( + signatureRequestCreateEmbeddedWithTemplateRequest, + "SignatureRequestCreateEmbeddedWithTemplateRequest" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestListResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestReleaseHold(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestRemind(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { - signatureRequestRemindRequest = deserializeIfNeeded8( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditRequest + * @param options + */ + async signatureRequestEdit(signatureRequestId, signatureRequestEditRequest, options = { headers: {} }) { + signatureRequestEditRequest = deserializeIfNeeded8( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditRequest === null || signatureRequestEditRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." - ); - } - if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { - throw new Error( - "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestRemindRequest, - SignatureRequestRemindRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditRequest, + SignatureRequestEditRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestRemove(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditRequest, + "SignatureRequestEditRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -29874,539 +31461,111 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestSend(_0) { - return __async(this, arguments, function* (signatureRequestSendRequest, options = { headers: {} }) { - signatureRequestSendRequest = deserializeIfNeeded8( - signatureRequestSendRequest, - "SignatureRequestSendRequest" + /** + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedRequest + * @param options + */ + async signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." ); - const localVarPath = this.basePath + "/signature_request/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditEmbeddedRequest === null || signatureRequestEditEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendRequest, - SignatureRequestSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendRequest, - "SignatureRequestSendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendWithTemplateRequest, - SignatureRequestSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestUpdate(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { - signatureRequestUpdateRequest = deserializeIfNeeded8( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." - ); - } - if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestUpdateRequest, - SignatureRequestUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } -}; -function deserializeIfNeeded8(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse9(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - if (returnType) { - body = ObjectSerializer.deserialize(body, returnType); - } - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } -} -function handleErrorCodeResponse9(reject, response, code, returnType) { - if (response.status !== code) { - return false; - } - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; -} -function handleErrorRangeResponse9(reject, response, code, returnType) { - let rangeCodeLeft = Number(code[0] + "00"); - let rangeCodeRight = Number(code[0] + "99"); - if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; - } - return false; -} - -// api/teamApi.ts -var defaultBasePath10 = "https://api.hellosign.com/v3"; -var TeamApi = class { - constructor(basePath) { - this._basePath = defaultBasePath10; - this._defaultHeaders = { "User-Agent": USER_AGENT }; - this._useQuerystring = false; - this.authentications = { - default: new VoidAuth(), - api_key: new HttpBasicAuth(), - oauth2: new HttpBearerAuth() - }; - this.interceptors = []; - if (basePath) { - this.basePath = basePath; } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key) { - this.authentications.api_key.username = key; - } - set username(username) { - this.authentications.api_key.username = username; - } - set password(password) { - this.authentications.api_key.password = password; - } - set accessToken(accessToken) { - this.authentications.oauth2.accessToken = accessToken; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - teamAddMember(_0, _1) { - return __async(this, arguments, function* (teamAddMemberRequest, teamId, options = { headers: {} }) { - teamAddMemberRequest = deserializeIfNeeded9( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - const localVarPath = this.basePath + "/team/add_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { - throw new Error( - "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." - ); - } - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamAddMemberRequest, - TeamAddMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30414,15 +31573,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30433,90 +31592,111 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamCreate(_0) { - return __async(this, arguments, function* (teamCreateRequest, options = { headers: {} }) { - teamCreateRequest = deserializeIfNeeded9( - teamCreateRequest, - "TeamCreateRequest" - ); - const localVarPath = this.basePath + "/team/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamCreateRequest === null || teamCreateRequest === void 0) { - throw new Error( - "Required parameter teamCreateRequest was null or undefined when calling teamCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamCreateRequest, - TeamCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + /** + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request with Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + if (signatureRequestEditEmbeddedWithTemplateRequest === null || signatureRequestEditEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30524,15 +31704,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30543,141 +31723,111 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamDelete() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team/destroy"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request With Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditWithTemplateRequest + * @param options + */ + async signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - }); - }); - }); - } - teamGet() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + if (signatureRequestEditWithTemplateRequest === null || signatureRequestEditWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditWithTemplateRequest, + SignatureRequestEditWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30685,15 +31835,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -30704,392 +31854,187 @@ var TeamApi = class { reject(error); } ); - }); - }); - }); - } - teamInfo(_0) { - return __async(this, arguments, function* (teamId, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/info"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamGetInfoResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamGetInfoResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - teamInvites(_0) { - return __async(this, arguments, function* (emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/invites"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async signatureRequestFiles(signatureRequestId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamInvitesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamInvitesResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - teamMembers(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/members/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamMembers." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamMembersResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamMembersResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "Buffer" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - teamRemoveMember(_0) { - return __async(this, arguments, function* (teamRemoveMemberRequest, options = { headers: {} }) { - teamRemoveMemberRequest = deserializeIfNeeded9( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as Data Uri + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestFilesAsDataUri(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." ); - const localVarPath = this.basePath + "/team/remove_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { - throw new Error( - "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamRemoveMemberRequest, - TeamRemoveMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "FileResponseDataUri" ); }, (error) => { @@ -31097,15 +32042,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, - 201, - "TeamGetResponse" + 200, + "FileResponseDataUri" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31116,199 +32061,187 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamSubTeams(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as File Url + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async signatureRequestFilesAsFileUrl(signatureRequestId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamSubTeams." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamSubTeamsResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamSubTeamsResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "FileResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - teamUpdate(_0) { - return __async(this, arguments, function* (teamUpdateRequest, options = { headers: {} }) { - teamUpdateRequest = deserializeIfNeeded9( - teamUpdateRequest, - "TeamUpdateRequest" - ); - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamUpdateRequest === null || teamUpdateRequest === void 0) { - throw new Error( - "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamUpdateRequest, - TeamUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + * @summary Get Signature Request + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestGet(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31316,15 +32249,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31335,518 +32268,116 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } -}; -function deserializeIfNeeded9(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse10(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - if (returnType) { - body = ObjectSerializer.deserialize(body, returnType); - } - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } -} -function handleErrorCodeResponse10(reject, response, code, returnType) { - if (response.status !== code) { - return false; - } - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; -} -function handleErrorRangeResponse10(reject, response, code, returnType) { - let rangeCodeLeft = Number(code[0] + "00"); - let rangeCodeRight = Number(code[0] + "99"); - if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; - } - return false; -} - -// api/templateApi.ts -var defaultBasePath11 = "https://api.hellosign.com/v3"; -var TemplateApi = class { - constructor(basePath) { - this._basePath = defaultBasePath11; - this._defaultHeaders = { "User-Agent": USER_AGENT }; - this._useQuerystring = false; - this.authentications = { - default: new VoidAuth(), - api_key: new HttpBasicAuth(), - oauth2: new HttpBearerAuth() - }; - this.interceptors = []; - if (basePath) { - this.basePath = basePath; - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key) { - this.authentications.api_key.username = key; - } - set username(username) { - this.authentications.api_key.username = username; - } - set password(password) { - this.authentications.api_key.password = password; - } - set accessToken(accessToken) { - this.authentications.oauth2.accessToken = accessToken; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - templateAddUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateAddUserRequest, options = { headers: {} }) { - templateAddUserRequest = deserializeIfNeeded10( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + * @summary List Signature Requests + * @param accountId Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the SignatureRequest List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + * @param options + */ + async signatureRequestList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateAddUser." - ); - } - if (templateAddUserRequest === null || templateAddUserRequest === void 0) { - throw new Error( - "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateAddUserRequest, - TemplateAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateCreate(_0) { - return __async(this, arguments, function* (templateCreateRequest, options = { headers: {} }) { - templateCreateRequest = deserializeIfNeeded10( - templateCreateRequest, - "TemplateCreateRequest" + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" ); - const localVarPath = this.basePath + "/template/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateRequest === null || templateCreateRequest === void 0) { - throw new Error( - "Required parameter templateCreateRequest was null or undefined when calling templateCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateRequest, - TemplateCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateRequest, - "TemplateCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateCreateEmbeddedDraft(_0) { - return __async(this, arguments, function* (templateCreateEmbeddedDraftRequest, options = { headers: {} }) { - templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" - ); - const localVarPath = this.basePath + "/template/create_embedded_draft"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { - throw new Error( - "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateEmbeddedDraftRequest, - TemplateCreateEmbeddedDraftRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateEmbeddedDraftResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateEmbeddedDraftResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateDelete(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/delete/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestListResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse11( + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestListResponse" + )) { + return; + } + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31857,81 +32388,81 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + /** + * Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + * @summary Release On-Hold Signature Request + * @param signatureRequestId The id of the SignatureRequest to release. + * @param options + */ + async signatureRequestReleaseHold(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse9( resolve, reject, response, - "Buffer" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31939,15 +32470,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse9( reject, error.response, 200, - "RequestFile" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31958,178 +32489,111 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFilesAsDataUri(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (templateId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + /** + * Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + * @summary Send Request Reminder + * @param signatureRequestId The id of the SignatureRequest to send a reminder for. + * @param signatureRequestRemindRequest + * @param options + */ + async signatureRequestRemind(signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { + signatureRequestRemindRequest = deserializeIfNeeded8( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { + throw new Error( + "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestRemindRequest, + SignatureRequestRemindRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse9( resolve, reject, response, - "FileResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -32137,15 +32601,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse9( reject, error.response, 200, - "FileResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -32156,474 +32620,474 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateGet(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + * @summary Remove Signature Request Access + * @param signatureRequestId The id of the SignatureRequest to remove. + * @param options + */ + async signatureRequestRemove(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + /** + * Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + * @summary Send Signature Request + * @param signatureRequestSendRequest + * @param options + */ + async signatureRequestSend(signatureRequestSendRequest, options = { headers: {} }) { + signatureRequestSendRequest = deserializeIfNeeded8( + signatureRequestSendRequest, + "SignatureRequestSendRequest" + ); + const localVarPath = this.basePath + "/signature_request/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendRequest, + SignatureRequestSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestSendRequest, + "SignatureRequestSendRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateListResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - templateRemoveUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateRemoveUserRequest, options = { headers: {} }) { - templateRemoveUserRequest = deserializeIfNeeded10( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" + /** + * Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + * @summary Send with Template + * @param signatureRequestSendWithTemplateRequest + * @param options + */ + async signatureRequestSendWithTemplate(signatureRequestSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." ); - const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendWithTemplateRequest, + SignatureRequestSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateRemoveUser." - ); - } - if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { - throw new Error( - "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateRemoveUserRequest, - TemplateRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - templateUpdateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, templateUpdateFilesRequest, options = { headers: {} }) { - templateUpdateFilesRequest = deserializeIfNeeded10( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" + /** + * Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + * @summary Update Signature Request + * @param signatureRequestId The id of the SignatureRequest to update. + * @param signatureRequestUpdateRequest + * @param options + */ + async signatureRequestUpdate(signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { + signatureRequestUpdateRequest = deserializeIfNeeded8( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." ); - const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateUpdateFiles." - ); - } - if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { - throw new Error( - "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateUpdateFilesRequest, - TemplateUpdateFilesRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestUpdateRequest, + SignatureRequestUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateUpdateFilesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateUpdateFilesResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; -function deserializeIfNeeded10(obj, classname) { +function deserializeIfNeeded8(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse11(resolve, reject, response, returnType) { +function handleSuccessfulResponse9(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -32634,7 +33098,7 @@ function handleSuccessfulResponse11(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse11(reject, response, code, returnType) { +function handleErrorCodeResponse9(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -32642,7 +33106,7 @@ function handleErrorCodeResponse11(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse11(reject, response, code, returnType) { +function handleErrorRangeResponse9(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -32653,11 +33117,11 @@ function handleErrorRangeResponse11(reject, response, code, returnType) { return false; } -// api/unclaimedDraftApi.ts -var defaultBasePath12 = "https://api.hellosign.com/v3"; -var UnclaimedDraftApi = class { +// api/teamApi.ts +var defaultBasePath10 = "https://api.hellosign.com/v3"; +var TeamApi = class { constructor(basePath) { - this._basePath = defaultBasePath12; + this._basePath = defaultBasePath10; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -32677,7 +33141,7 @@ var UnclaimedDraftApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -32703,474 +33167,3010 @@ var UnclaimedDraftApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - unclaimedDraftCreate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateRequest, options = { headers: {} }) { - unclaimedDraftCreateRequest = deserializeIfNeeded11( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" + /** + * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + * @summary Add User to Team + * @param teamAddMemberRequest + * @param teamId The id of the team. + * @param options + */ + async teamAddMember(teamAddMemberRequest, teamId, options = { headers: {} }) { + teamAddMemberRequest = deserializeIfNeeded9( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + const localVarPath = this.basePath + "/team/add_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { + throw new Error( + "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." ); - const localVarPath = this.basePath + "/unclaimed_draft/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateRequest, - UnclaimedDraftCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamAddMemberRequest, + TeamAddMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftCreateEmbedded(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + * @summary Create Team + * @param teamCreateRequest + * @param options + */ + async teamCreate(teamCreateRequest, options = { headers: {} }) { + teamCreateRequest = deserializeIfNeeded9( + teamCreateRequest, + "TeamCreateRequest" + ); + const localVarPath = this.basePath + "/team/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamCreateRequest === null || teamCreateRequest === void 0) { + throw new Error( + "Required parameter teamCreateRequest was null or undefined when calling teamCreate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedRequest, - UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamCreateRequest, + TeamCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + /** + * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + * @summary Delete Team + * @param options + */ + async teamDelete(options = { headers: {} }) { + const localVarPath = this.basePath + "/team/destroy"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + * @summary Get Team + * @param options + */ + async teamGet(options = { headers: {} }) { + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - unclaimedDraftEditAndResend(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { - unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" + /** + * Provides information about a team. + * @summary Get Team Info + * @param teamId The id of the team. + * @param options + */ + async teamInfo(teamId, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/info"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" ); - const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftEditAndResendRequest, - UnclaimedDraftEditAndResendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetInfoResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetInfoResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Provides a list of team invites (and their roles). + * @summary List Team Invites + * @param emailAddress The email address for which to display the team invites. + * @param options + */ + async teamInvites(emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/invites"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamInvitesResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamInvitesResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Provides a paginated list of members (and their roles) that belong to a given team. + * @summary List Team Members + * @param teamId The id of the team that a member list is being requested from. + * @param page Which page number of the team member list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamMembers(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/members/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamMembers." + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamMembersResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamMembersResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; } + reject(error); + } + ); + } + ); + }); + } + /** + * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + * @summary Remove User from Team + * @param teamRemoveMemberRequest + * @param options + */ + async teamRemoveMember(teamRemoveMemberRequest, options = { headers: {} }) { + teamRemoveMemberRequest = deserializeIfNeeded9( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + const localVarPath = this.basePath + "/team/remove_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { + throw new Error( + "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamRemoveMemberRequest, + TeamRemoveMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 201, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } + /** + * Provides a paginated list of sub teams that belong to a given team. + * @summary List Sub Teams + * @param teamId The id of the parent Team. + * @param page Which page number of the SubTeam List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamSubTeams(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamSubTeams." + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamSubTeamsResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamSubTeamsResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Updates the name of your Team. + * @summary Update Team + * @param teamUpdateRequest + * @param options + */ + async teamUpdate(teamUpdateRequest, options = { headers: {} }) { + teamUpdateRequest = deserializeIfNeeded9( + teamUpdateRequest, + "TeamUpdateRequest" + ); + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamUpdateRequest === null || teamUpdateRequest === void 0) { + throw new Error( + "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamUpdateRequest, + TeamUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } +}; +function deserializeIfNeeded9(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse10(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} +function handleErrorCodeResponse10(reject, response, code, returnType) { + if (response.status !== code) { + return false; + } + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; +} +function handleErrorRangeResponse10(reject, response, code, returnType) { + let rangeCodeLeft = Number(code[0] + "00"); + let rangeCodeRight = Number(code[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; + } + return false; +} + +// api/templateApi.ts +var defaultBasePath11 = "https://api.hellosign.com/v3"; +var TemplateApi = class { + constructor(basePath) { + this._basePath = defaultBasePath11; + this._defaultHeaders = { "User-Agent": USER_AGENT }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + * @summary Add User to Template + * @param templateId The id of the Template to give the Account access to. + * @param templateAddUserRequest + * @param options + */ + async templateAddUser(templateId, templateAddUserRequest, options = { headers: {} }) { + templateAddUserRequest = deserializeIfNeeded10( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateAddUser." + ); + } + if (templateAddUserRequest === null || templateAddUserRequest === void 0) { + throw new Error( + "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateAddUserRequest, + TemplateAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a template that can then be used. + * @summary Create Template + * @param templateCreateRequest + * @param options + */ + async templateCreate(templateCreateRequest, options = { headers: {} }) { + templateCreateRequest = deserializeIfNeeded10( + templateCreateRequest, + "TemplateCreateRequest" + ); + const localVarPath = this.basePath + "/template/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateRequest === null || templateCreateRequest === void 0) { + throw new Error( + "Required parameter templateCreateRequest was null or undefined when calling templateCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateRequest, + TemplateCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateCreateRequest, + "TemplateCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template \'edit\' stage. + * @summary Create Embedded Template Draft + * @param templateCreateEmbeddedDraftRequest + * @param options + */ + async templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest, options = { headers: {} }) { + templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + const localVarPath = this.basePath + "/template/create_embedded_draft"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { + throw new Error( + "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateEmbeddedDraftRequest, + TemplateCreateEmbeddedDraftRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateEmbeddedDraftResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateEmbeddedDraftResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Completely deletes the template specified from the account. + * @summary Delete Template + * @param templateId The id of the Template to delete. + * @param options + */ + async templateDelete(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/delete/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files + * @param templateId The id of the template files to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async templateFiles(templateId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFiles." + ); + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as Data Uri + * @param templateId The id of the template files to retrieve. + * @param options + */ + async templateFilesAsDataUri(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponseDataUri" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponseDataUri" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as File Url + * @param templateId The id of the template files to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async templateFilesAsFileUrl(templateId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." + ); + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Returns the Template specified by the `template_id` parameter. + * @summary Get Template + * @param templateId The id of the Template to retrieve. + * @param options + */ + async templateGet(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + * @summary List Templates + * @param accountId Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the Template List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the Template objects. + * @param options + */ + async templateList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateListResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateListResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Removes the specified Account\'s access to the specified Template. + * @summary Remove User from Template + * @param templateId The id of the Template to remove the Account\'s access to. + * @param templateRemoveUserRequest + * @param options + */ + async templateRemoveUser(templateId, templateRemoveUserRequest, options = { headers: {} }) { + templateRemoveUserRequest = deserializeIfNeeded10( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateRemoveUser." + ); + } + if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { + throw new Error( + "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateRemoveUserRequest, + TemplateRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + * @summary Update Template Files + * @param templateId The ID of the template whose files to update. + * @param templateUpdateFilesRequest + * @param options + */ + async templateUpdateFiles(templateId, templateUpdateFilesRequest, options = { headers: {} }) { + templateUpdateFilesRequest = deserializeIfNeeded10( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateUpdateFiles." + ); + } + if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { + throw new Error( + "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateUpdateFilesRequest, + TemplateUpdateFilesRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateUpdateFilesResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateUpdateFilesResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } +}; +function deserializeIfNeeded10(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse11(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} +function handleErrorCodeResponse11(reject, response, code, returnType) { + if (response.status !== code) { + return false; + } + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; +} +function handleErrorRangeResponse11(reject, response, code, returnType) { + let rangeCodeLeft = Number(code[0] + "00"); + let rangeCodeRight = Number(code[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; + } + return false; +} + +// api/unclaimedDraftApi.ts +var defaultBasePath12 = "https://api.hellosign.com/v3"; +var UnclaimedDraftApi = class { + constructor(basePath) { + this._basePath = defaultBasePath12; + this._defaultHeaders = { "User-Agent": USER_AGENT }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + * @summary Create Unclaimed Draft + * @param unclaimedDraftCreateRequest + * @param options + */ + async unclaimedDraftCreate(unclaimedDraftCreateRequest, options = { headers: {} }) { + unclaimedDraftCreateRequest = deserializeIfNeeded11( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateRequest, + UnclaimedDraftCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft + * @param unclaimedDraftCreateEmbeddedRequest + * @param options + */ + async unclaimedDraftCreateEmbedded(unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedRequest, + UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft with Template + * @param unclaimedDraftCreateEmbeddedWithTemplateRequest + * @param options + */ + async unclaimedDraftCreateEmbeddedWithTemplate(unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester\'s email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Edit and Resend Unclaimed Draft + * @param signatureRequestId The ID of the signature request to edit and resend. + * @param unclaimedDraftEditAndResendRequest + * @param options + */ + async unclaimedDraftEditAndResend(signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { + unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftEditAndResendRequest, + UnclaimedDraftEditAndResendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } }; function deserializeIfNeeded11(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { @@ -33223,7 +36223,7 @@ var HttpError = class extends Error { var queryParamsSerializer = (params) => { return import_qs.default.stringify(params, { arrayFormat: "brackets" }); }; -var USER_AGENT = "OpenAPI-Generator/1.8-dev/node"; +var USER_AGENT = "OpenAPI-Generator/1.8.1-dev/node"; var generateFormData = (obj, typemap) => { const data = {}; let localVarUseFormData = false; @@ -33276,8 +36276,7 @@ var toFormData3 = (obj) => { return form; }; function isBufferDetailedFile(obj) { - var _a, _b; - return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && ((_a = obj.options) == null ? void 0 : _a.filename) !== void 0 && ((_b = obj.options) == null ? void 0 : _b.contentType) !== void 0; + return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && obj.options?.filename !== void 0 && obj.options?.contentType !== void 0; } var shouldJsonify = (val) => val === Object(val); @@ -33378,6 +36377,10 @@ var APIS = [ SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, @@ -33514,15 +36517,21 @@ var APIS = [ toFormData, typeMap }); -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ +/*! Bundled license information: + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) +*/ diff --git a/sdks/node/docs/api/AccountApi.md b/sdks/node/docs/api/AccountApi.md index fba97d1f1..cb57cf6ee 100644 --- a/sdks/node/docs/api/AccountApi.md +++ b/sdks/node/docs/api/AccountApi.md @@ -23,52 +23,24 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountCreateRequest = { - emailAddress: "newuser@dropboxsign.com", -}; - -const result = accountApi.accountCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { +const accountCreateRequest: models.AccountCreateRequest = { emailAddress: "newuser@dropboxsign.com", }; -const result = accountApi.accountCreate(data); -result.then(response => { +apiCaller.accountCreate( + accountCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountCreate:"); console.log(error.body); }); @@ -110,44 +82,18 @@ Returns the properties and settings of your Account. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const accountApi = new DropboxSign.AccountApi(); +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = accountApi.accountGet(undefined, "jack@example.com"); -result.then(response => { +apiCaller.accountGet().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountGet:"); console.log(error.body); }); @@ -190,52 +136,25 @@ Updates the properties and settings of your Account. Currently only allows for u ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data: DropboxSign.AccountUpdateRequest = { +const accountUpdateRequest: models.AccountUpdateRequest = { callbackUrl: "https://www.example.com/callback", + locale: "en-US", }; -const result = accountApi.accountUpdate(data); -result.then(response => { +apiCaller.accountUpdate( + accountUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - callbackUrl: "https://www.example.com/callback", -}; - -const result = accountApi.accountUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountUpdate:"); console.log(error.body); }); @@ -277,52 +196,24 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.AccountVerifyRequest = { - emailAddress: "some_user@dropboxsign.com", -}; - -const result = accountApi.accountVerify(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const accountApi = new DropboxSign.AccountApi(); - -// Configure HTTP basic authorization: api_key -accountApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// accountApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.AccountApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const accountVerifyRequest: models.AccountVerifyRequest = { emailAddress: "some_user@dropboxsign.com", }; -const result = accountApi.accountVerify(data); -result.then(response => { +apiCaller.accountVerify( + accountVerifyRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling AccountApi#accountVerify:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/ApiAppApi.md b/sdks/node/docs/api/ApiAppApi.md index 69d312b43..8494edaf2 100644 --- a/sdks/node/docs/api/ApiAppApi.md +++ b/sdks/node/docs/api/ApiAppApi.md @@ -24,88 +24,43 @@ Creates a new API App. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const apiAppApi = new DropboxSign.ApiAppApi(); +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth: DropboxSign.SubOAuth = { +const oauth: models.SubOAuth = { callbackUrl: "https://example.com/oauth", scopes: [ - DropboxSign.SubOAuth.ScopesEnum.BasicAccountInfo, - DropboxSign.SubOAuth.ScopesEnum.RequestSignature, + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, ], }; -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { primaryButtonColor: "#00b3e6", primaryButtonTextColor: "#ffffff", }; -const data: DropboxSign.ApiAppCreateRequest = { +const apiAppCreateRequest: models.ApiAppCreateRequest = { name: "My Production App", - domains: ["example.com"], - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, -}; - -const result = apiAppApi.apiAppCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const oauth = { - callbackUrl: "https://example.com/oauth", - scopes: [ - "basic_account_info", - "request_signature", + domains: [ + "example.com", ], -}; - -const whiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data = { - name: "My Production App", - domains: ["example.com"], customLogoFile: fs.createReadStream("CustomLogoFile.png"), - oauth, - whiteLabelingOptions, + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, }; -const result = apiAppApi.apiAppCreate(data); -result.then(response => { +apiCaller.apiAppCreate( + apiAppCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppCreate:"); console.log(error.body); }); @@ -147,48 +102,18 @@ Deletes an API App. Can only be invoked for apps you own. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppDelete(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).catch(error => { + console.log("Exception when calling ApiAppApi#apiAppDelete:"); console.log(error.body); }); @@ -230,48 +155,20 @@ Returns an object with information about an API App. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppGet(clientId); -result.then(response => { +apiCaller.apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppGet:"); console.log(error.body); }); @@ -313,50 +210,21 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 2; - -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const page = 1; -const pageSize = 2; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = apiAppApi.apiAppList(page, pageSize); -result.then(response => { +apiCaller.apiAppList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppList:"); console.log(error.body); }); @@ -399,74 +267,45 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; +const apiCaller = new api.ApiAppApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = { - primaryButtonColor: "#00b3e6", - primaryButtonTextColor: "#ffffff", -}; - -const data: DropboxSign.ApiAppUpdateRequest = { - name: "New Name", - callbackUrl: "http://example.com/dropboxsign", - customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, +const oauth: models.SubOAuth = { + callbackUrl: "https://example.com/oauth", + scopes: [ + models.SubOAuth.ScopesEnum.BasicAccountInfo, + models.SubOAuth.ScopesEnum.RequestSignature, + ], }; -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const apiAppApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -apiAppApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const whiteLabelingOptions = { +const whiteLabelingOptions: models.SubWhiteLabelingOptions = { primaryButtonColor: "#00b3e6", primaryButtonTextColor: "#ffffff", }; -const data = { +const apiAppUpdateRequest: models.ApiAppUpdateRequest = { + callbackUrl: "https://example.com/dropboxsign", name: "New Name", - callbackUrl: "http://example.com/dropboxsign", + domains: [ + "example.com", + ], customLogoFile: fs.createReadStream("CustomLogoFile.png"), - whiteLabelingOptions, + oauth: oauth, + whiteLabelingOptions: whiteLabelingOptions, }; -const clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - -const result = apiAppApi.apiAppUpdate(clientId, data); -result.then(response => { +apiCaller.apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ApiAppApi#apiAppUpdate:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/BulkSendJobApi.md b/sdks/node/docs/api/BulkSendJobApi.md index bbd50c805..95a7a6b50 100644 --- a/sdks/node/docs/api/BulkSendJobApi.md +++ b/sdks/node/docs/api/BulkSendJobApi.md @@ -21,48 +21,22 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - -const result = bulkSendJobApi.bulkSendJobGet(bulkSendJobId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling BulkSendJobApi#bulkSendJobGet:"); console.log(error.body); }); @@ -106,50 +80,21 @@ Returns a list of BulkSendJob that you can access. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const bulkSendJobApi = new DropboxSign.BulkSendJobApi(); - -// Configure HTTP basic authorization: api_key -bulkSendJobApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// bulkSendJobApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const page = 1; -const pageSize = 20; - -const result = bulkSendJobApi.bulkSendJobList(page, pageSize); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.BulkSendJobApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.bulkSendJobList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling BulkSendJobApi#bulkSendJobList:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/EmbeddedApi.md b/sdks/node/docs/api/EmbeddedApi.md index 3fc622fac..2937ac3ef 100644 --- a/sdks/node/docs/api/EmbeddedApi.md +++ b/sdks/node/docs/api/EmbeddedApi.md @@ -21,58 +21,31 @@ Retrieves an embedded object containing a template url that can be opened in an ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.EmbeddedEditUrlRequest = { - ccRoles: [""], - mergeFields: [], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - ccRoles: [""], - mergeFields: [], +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const mergeFields = [ +]; + +const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { + ccRoles: [ + "", + ], + mergeFields: mergeFields, }; -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = embeddedApi.embeddedEditUrl(templateId, data); -result.then(response => { +apiCaller.embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); console.log(error.body); }); @@ -115,48 +88,20 @@ Retrieves an embedded object containing a signature url that can be opened in an ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const embeddedApi = new DropboxSign.EmbeddedApi(); - -// Configure HTTP basic authorization: api_key -embeddedApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// embeddedApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; +const apiCaller = new api.EmbeddedApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = embeddedApi.embeddedSignUrl(signatureId); -result.then(response => { +apiCaller.embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", // signatureId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling EmbeddedApi#embeddedSignUrl:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/FaxApi.md b/sdks/node/docs/api/FaxApi.md index 84ccc7b39..efc84eea6 100644 --- a/sdks/node/docs/api/FaxApi.md +++ b/sdks/node/docs/api/FaxApi.md @@ -5,7 +5,7 @@ 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 | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 | @@ -19,41 +19,22 @@ faxDelete(faxId: string) Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).catch(error => { + console.log("Exception when calling FaxApi#faxDelete:"); console.log(error.body); }); @@ -88,51 +69,26 @@ void (empty response body) faxFiles(faxId: string): Buffer ``` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = faxApi.faxFiles(faxId); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +apiCaller.faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { + fs.createWriteStream('./file_response').write(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxFiles:"); console.log(error.body); }); @@ -169,47 +125,24 @@ faxGet(faxId: string): FaxGetResponse Get Fax -Returns information about fax +Returns information about a Fax ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.ApiAppApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - -const result = faxApi.faxGet(faxId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = faxApi.faxGet(faxId); -result.then(response => { +apiCaller.faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // faxId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxGet:"); console.log(error.body); }); @@ -246,49 +179,25 @@ faxList(page: number, pageSize: number): FaxListResponse Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -const page = 1; -const pageSize = 2; - -const result = faxApi.faxList(page, pageSize); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const page = 1; -const pageSize = 2; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = faxApi.faxList(page, pageSize); -result.then(response => { +apiCaller.faxList( + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxList:"); console.log(error.body); }); @@ -298,8 +207,8 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **number**| Page | [optional] [default to 1] | -| **pageSize** | **number**| Page size | [optional] [default to 20] | +| **page** | **number**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **number**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | ### Return type @@ -326,109 +235,37 @@ faxSend(faxSendRequest: FaxSendRequest): FaxGetResponse Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxApi(); +apiCaller.username = "YOUR_API_KEY"; -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.FaxSendRequest = { - files: [ file, fileBuffer, fileBufferAlt ], - testMode: true, +const faxSendRequest: models.FaxSendRequest = { 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!", -}; - -const result = faxApi.faxSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const faxApi = new DropboxSign.FaxApi(); - -// Configure HTTP basic authorization: api_key -faxApi.username = "YOUR_API_KEY"; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data = { - files: [ file, fileBuffer, fileBufferAlt ], testMode: true, - recipient: "16690000001", - sender: "16690000000", coverPageTo: "Jill Fax", - coverPageMessage: "I'm sending you a fax!", coverPageFrom: "Faxer Faxerson", + coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", + files: [ + fs.createReadStream("./example_fax.pdf"), + ], }; -const result = faxApi.faxSend(data); -result.then(response => { +apiCaller.faxSend( + faxSendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxApi#faxSend:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/FaxLineApi.md b/sdks/node/docs/api/FaxLineApi.md index 4d9f6208b..5c00c74cf 100644 --- a/sdks/node/docs/api/FaxLineApi.md +++ b/sdks/node/docs/api/FaxLineApi.md @@ -26,48 +26,24 @@ Grants a user access to the specified Fax Line. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineAddUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { +const faxLineAddUserRequest: models.FaxLineAddUserRequest = { number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com", }; -const result = faxLineApi.faxLineAddUser(data); -result.then(response => { +apiCaller.faxLineAddUser( + faxLineAddUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineAddUser:"); console.log(error.body); }); @@ -104,43 +80,27 @@ faxLineAreaCodeGet(country: 'CA' | 'US' | 'UK', state: 'AK' | 'AL' | 'AR' | 'AZ' Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineAreaCodeGet( + "US", // country + undefined, // state + undefined, // province + undefined, // city +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineAreaCodeGet("US", "CA"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); console.log(error.body); }); @@ -150,10 +110,10 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **country** | **'CA' | 'US' | 'UK'**| Filter area codes by country. | | -| **state** | **'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'**| Filter area codes by state. | [optional] | -| **province** | **'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'**| Filter area codes by province. | [optional] | -| **city** | **string**| Filter area codes by city. | [optional] | +| **country** | **'CA' | 'US' | 'UK'**| Filter area codes by country | | +| **state** | **'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'**| Filter area codes by state | [optional] | +| **province** | **'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'**| Filter area codes by province | [optional] | +| **city** | **string**| Filter area codes by city | [optional] | ### Return type @@ -180,53 +140,29 @@ faxLineCreate(faxLineCreateRequest: FaxLineCreateRequest): FaxLineResponse Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineCreateRequest = { +const faxLineCreateRequest: models.FaxLineCreateRequest = { areaCode: 209, - country: "US", + country: models.FaxLineCreateRequest.CountryEnum.Us, }; -const result = faxLineApi.faxLineCreate(data); -result.then(response => { +apiCaller.faxLineCreate( + faxLineCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { - areaCode: 209, - country: "US", -}; - -const result = faxLineApi.faxLineCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineCreate:"); console.log(error.body); }); @@ -268,44 +204,21 @@ Deletes the specified Fax Line from the subscription. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineDeleteRequest = { - number: "[FAX_NUMBER]", -}; - -const result = faxLineApi.faxLineDelete(data); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data = { +const faxLineDeleteRequest: models.FaxLineDeleteRequest = { number: "[FAX_NUMBER]", }; -const result = faxLineApi.faxLineDelete(data); - -result.catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.faxLineDelete( + faxLineDeleteRequest, +).catch(error => { + console.log("Exception when calling FaxLineApi#faxLineDelete:"); console.log(error.body); }); @@ -347,38 +260,19 @@ Returns the properties and settings of a Fax Line. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const faxLineApi = new DropboxSign.FaxLineApi(); +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineGet("[FAX_NUMBER]"); -result.then(response => { +apiCaller.faxLineGet( + "123-123-1234", // number +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineGet:"); console.log(error.body); }); @@ -388,7 +282,7 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **number** | **string**| The Fax Line number. | | +| **number** | **string**| The Fax Line number | | ### Return type @@ -420,38 +314,22 @@ Returns the properties and settings of multiple Fax Lines. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; + +apiCaller.faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + undefined, // showTeamLines +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const result = faxLineApi.faxLineList(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineList:"); console.log(error.body); }); @@ -462,9 +340,9 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **accountId** | **string**| Account ID | [optional] | -| **page** | **number**| Page | [optional] [default to 1] | -| **pageSize** | **number**| Page size | [optional] [default to 20] | -| **showTeamLines** | **boolean**| Show team lines | [optional] | +| **page** | **number**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] | +| **pageSize** | **number**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | +| **showTeamLines** | **boolean**| Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -491,53 +369,29 @@ faxLineRemoveUser(faxLineRemoveUserRequest: FaxLineRemoveUserRequest): FaxLineRe Remove Fax Line Access -Removes a user\'s access to the specified Fax Line. +Removes a user\'s access to the specified Fax Line ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); - -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.FaxLineRemoveUserRequest = { - number: "[FAX_NUMBER]", - emailAddress: "member@dropboxsign.com", -}; - -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const faxLineApi = new DropboxSign.FaxLineApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -faxLineApi.username = "YOUR_API_KEY"; +const apiCaller = new api.FaxLineApi(); +apiCaller.username = "YOUR_API_KEY"; -const data = { +const faxLineRemoveUserRequest: models.FaxLineRemoveUserRequest = { number: "[FAX_NUMBER]", emailAddress: "member@dropboxsign.com", }; -const result = faxLineApi.faxLineRemoveUser(data); -result.then(response => { +apiCaller.faxLineRemoveUser( + faxLineRemoveUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling FaxLineApi#faxLineRemoveUser:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/OAuthApi.md b/sdks/node/docs/api/OAuthApi.md index 81ae5b1db..6746ebc21 100644 --- a/sdks/node/docs/api/OAuthApi.md +++ b/sdks/node/docs/api/OAuthApi.md @@ -21,44 +21,26 @@ Once you have retrieved the code from the user callback, you will need to exchan ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.OAuthApi(); + +const oAuthTokenGenerateRequest: models.OAuthTokenGenerateRequest = { + clientId: "cc91c61d00f8bb2ece1428035716b", + clientSecret: "1d14434088507ffa390e6f5528465", + code: "1b0d28d90c86c141", + state: "900e06e2", + grantType: "authorization_code", +}; + +apiCaller.oauthTokenGenerate( + oAuthTokenGenerateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenGenerateRequest(); -data.state = "900e06e2"; -data.code = "1b0d28d90c86c141"; -data.clientId = "cc91c61d00f8bb2ece1428035716b"; -data.clientSecret = "1d14434088507ffa390e6f5528465"; - -const result = oAuthApi.oauthTokenGenerate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling OAuthApi#oauthTokenGenerate:"); console.log(error.body); }); @@ -100,38 +82,23 @@ Access tokens are only valid for a given period of time (typically one hour) for ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const oAuthApi = new DropboxSign.OAuthApi(); - -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; - -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const oAuthApi = new DropboxSign.OAuthApi(); +const apiCaller = new api.OAuthApi(); -const data = new DropboxSign.OAuthTokenRefreshRequest(); -data.refreshToken = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"; +const oAuthTokenRefreshRequest: models.OAuthTokenRefreshRequest = { + grantType: "refresh_token", + refreshToken: "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", +}; -const result = oAuthApi.oauthTokenRefresh(data); -result.then(response => { +apiCaller.oauthTokenRefresh( + oAuthTokenRefreshRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling OAuthApi#oauthTokenRefresh:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/ReportApi.md b/sdks/node/docs/api/ReportApi.md index 61c772f06..005e83c85 100644 --- a/sdks/node/docs/api/ReportApi.md +++ b/sdks/node/docs/api/ReportApi.md @@ -20,56 +20,28 @@ Request the creation of one or more report(s). When the report(s) have been gen ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const reportApi = new DropboxSign.ReportApi(); +const apiCaller = new api.ReportApi(); +apiCaller.username = "YOUR_API_KEY"; -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data: DropboxSign.ReportCreateRequest = { - startDate: "09/01/2020", - endDate: "09/01/2020", - reportType: [ - DropboxSign.ReportCreateRequest.ReportTypeEnum.UserActivity, - DropboxSign.ReportCreateRequest.ReportTypeEnum.DocumentStatus, - ] -}; - -const result = reportApi.reportCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const reportApi = new DropboxSign.ReportApi(); - -// Configure HTTP basic authorization: api_key -reportApi.username = "YOUR_API_KEY"; - -const data = { +const reportCreateRequest: models.ReportCreateRequest = { startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ - "user_activity", - "document_status", - ] + models.ReportCreateRequest.ReportTypeEnum.UserActivity, + models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, + ], }; -const result = reportApi.reportCreate(data); -result.then(response => { +apiCaller.reportCreate( + reportCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling ReportApi#reportCreate:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/SignatureRequestApi.md b/sdks/node/docs/api/SignatureRequestApi.md index 459c8c120..2590d0d8c 100644 --- a/sdks/node/docs/api/SignatureRequestApi.md +++ b/sdks/node/docs/api/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to https://api.hellosign.com/v3. | [**signatureRequestCancel()**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**signatureRequestCreateEmbedded()**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**signatureRequestCreateEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**signatureRequestEdit()**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**signatureRequestEditEmbedded()**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**signatureRequestEditEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**signatureRequestEditWithTemplate()**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**signatureRequestFiles()**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**signatureRequestFilesAsDataUri()**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**signatureRequestFilesAsFileUrl()**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -35,139 +39,95 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", - value: "ABC Corp", + value: "123 LLC", }; -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList2CustomFields = [ + signerList2CustomFields1, +]; -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; - -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; +const signerList2Signers = [ + signerList2Signers1, +]; -const data: DropboxSign.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { - clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", }; -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example +const signerList1CustomFields = [ + signerList1CustomFields1, +]; -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList1Signers = [ + signerList1Signers1, +]; -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, }; -const signerList2CustomFields = { - name: "company", - value: "123 LLC", +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, }; -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; +const signerList = [ + signerList1, + signerList2, +]; -const cc1 = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const data = { +const ccs = [ + ccs1, +]; + +const signatureRequestBulkCreateEmbeddedWithTemplateRequest: models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = { clientId: "1a659d9ad95bccd307ecad78d72192f8", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], + subject: "Purchase Order", testMode: true, + signerList: signerList, + ccs: ccs, }; -const result = signatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -209,140 +169,95 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signerList1Signer: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", - pin: "d79a3td", -}; - -const signerList1CustomFields: DropboxSign.SubBulkSignerListCustomField = { +const signerList2CustomFields1: models.SubBulkSignerListCustomField = { name: "company", - value: "ABC Corp", + value: "123 LLC", }; -const signerList1: DropboxSign.SubBulkSignerList = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList2CustomFields = [ + signerList2CustomFields1, +]; -const signerList2Signer: DropboxSign.SubSignatureRequestTemplateSigner = { +const signerList2Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "Mary", emailAddress: "mary@example.com", pin: "gd9as5b", }; -const signerList2CustomFields: DropboxSign.SubBulkSignerListCustomField = { - name: "company", - value: "123 LLC", -}; +const signerList2Signers = [ + signerList2Signers1, +]; -const signerList2: DropboxSign.SubBulkSignerList = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; - -const data: DropboxSign.SignatureRequestBulkSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], - testMode: true, +const signerList1CustomFields1: models.SubBulkSignerListCustomField = { + name: "company", + value: "ABC Corp", }; -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` +const signerList1CustomFields = [ + signerList1CustomFields1, +]; -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signerList1Signer = { +const signerList1Signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", pin: "d79a3td", }; -const signerList1CustomFields = { - name: "company", - value: "ABC Corp", -}; - -const signerList1 = { - signers: [ signerList1Signer ], - customFields: [ signerList1CustomFields ], -}; +const signerList1Signers = [ + signerList1Signers1, +]; -const signerList2Signer = { - role: "Client", - name: "Mary", - emailAddress: "mary@example.com", - pin: "gd9as5b", +const signerList1: models.SubBulkSignerList = { + customFields: signerList1CustomFields, + signers: signerList1Signers, }; -const signerList2CustomFields = { - name: "company", - value: "123 LLC", +const signerList2: models.SubBulkSignerList = { + customFields: signerList2CustomFields, + signers: signerList2Signers, }; -const signerList2 = { - signers: [ signerList2Signer ], - customFields: [ signerList2CustomFields ], -}; +const signerList = [ + signerList1, + signerList2, +]; -const cc1 = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", +const ccs = [ + ccs1, +]; + +const signatureRequestBulkSendWithTemplateRequest: models.SignatureRequestBulkSendWithTemplateRequest = { + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], message: "Glad we could come to an agreement.", - signerList: [ signerList1, signerList2 ], - ccs: [ cc1 ], + subject: "Purchase Order", testMode: true, + signerList: signerList, + ccs: ccs, }; -const result = signatureRequestApi.signatureRequestBulkSendWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate:"); console.log(error.body); }); @@ -384,48 +299,18 @@ Cancels an incomplete signature request. This action is **not reversible**. The ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestCancel(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); console.log(error.body); }); @@ -467,116 +352,147 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", +const signers1: models.SubSignatureRequestSigner = { name: "Jack", + emailAddress: "jack@example.com", order: 0, }; -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", +const signers2: models.SubSignatureRequestSigner = { name: "Jill", + emailAddress: "jill@example.com", order: 1, }; -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: true, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; +const signers = [ + signers1, + signers2, +]; -const data: DropboxSign.SignatureRequestCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", +const signatureRequestCreateEmbeddedRequest: models.SignatureRequestCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], + testMode: true, + title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, - testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { +apiCaller.signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](../model/SignatureRequestCreateEmbeddedRequest.md)| | | -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +### Return type -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +### Authorization -const signer1 = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestCreateEmbeddedWithTemplate()` + +```typescript +signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest): SignatureRequestGetResponse +``` + +Create Embedded Signature Request with Template + +Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### TypeScript Example + +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signingOptions = { +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: true, - defaultType: "draw", }; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; + +const signers = [ + signers1, +]; + +const signatureRequestCreateEmbeddedWithTemplateRequest: models.SignatureRequestCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", ], - files: [fs.createReadStream("example_signature_request.pdf")], - signingOptions, + message: "Glad we could come to an agreement.", + subject: "Purchase Order", testMode: true, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbedded(data); -result.then(response => { +apiCaller.signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -586,7 +502,7 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](../model/SignatureRequestCreateEmbeddedRequest.md)| | | +| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](../model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | ### Return type @@ -605,105 +521,183 @@ result.then(response => { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestCreateEmbeddedWithTemplate()` +## `signatureRequestEdit()` ```typescript -signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest): SignatureRequestGetResponse +signatureRequestEdit(signatureRequestId: string, signatureRequestEditRequest: SignatureRequestEditRequest): SignatureRequestGetResponse ``` -Create Embedded Signature Request with Template +Edit Signature Request -Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, }; -const data: DropboxSign.SignatureRequestCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditRequest: models.SignatureRequestEditRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + metadata: { + "custom_id": 1234, + "custom_text": "NDA #9" + }, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEdit:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](../model/SignatureRequestEditRequest.md)| | | -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +### Return type -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +### Authorization -const signer1 = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbedded()` + +```typescript +signatureRequestEditEmbedded(signatureRequestId: string, signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest): SignatureRequestGetResponse +``` + +Edit Embedded Signature Request -const signingOptions = { +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### TypeScript Example + +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: "draw", }; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - signingOptions, +const signers1: models.SubSignatureRequestSigner = { + name: "Jack", + emailAddress: "jack@example.com", + order: 0, +}; + +const signers2: models.SubSignatureRequestSigner = { + name: "Jill", + emailAddress: "jill@example.com", + order: 1, +}; + +const signers = [ + signers1, + signers2, +]; + +const signatureRequestEditEmbeddedRequest: models.SignatureRequestEditEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject: "The NDA we talked about", testMode: true, + title: "NDA with Acme Co.", + ccEmailAddresses: [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded:"); console.log(error.body); }); @@ -713,7 +707,8 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](../model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](../model/SignatureRequestEditEmbeddedRequest.md)| | | ### Return type @@ -732,67 +727,172 @@ result.then(response => { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestFiles()` +## `signatureRequestEditEmbeddedWithTemplate()` ```typescript -signatureRequestFiles(signatureRequestId: string, fileType: 'pdf' | 'zip'): Buffer +signatureRequestEditEmbeddedWithTemplate(signatureRequestId: string, signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest): SignatureRequestGetResponse ``` -Download Files +Edit Embedded Signature Request with Template -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; +const signers = [ + signers1, +]; -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); +const signatureRequestEditEmbeddedWithTemplateRequest: models.SignatureRequestEditEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + templateIds: [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, +}; -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +apiCaller.signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest, +).then(response => { + console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate:"); console.log(error.body); }); ``` -### JavaScript Example +### Parameters -```javascript -import * as DropboxSign from "@dropbox/sign"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](../model/SignatureRequestEditEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditWithTemplate()` + +```typescript +signatureRequestEditWithTemplate(signatureRequestId: string, signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest): SignatureRequestGetResponse +``` + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### TypeScript Example + +```typescript import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, + draw: true, + phone: false, + type: true, + upload: true, +}; + +const signers1: models.SubSignatureRequestTemplateSigner = { + role: "Client", + name: "George", + emailAddress: "george@example.com", +}; -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +const signers = [ + signers1, +]; -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +const ccs1: models.SubCC = { + role: "Accounting", + emailAddress: "accounting@example.com", +}; -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const ccs = [ + ccs1, +]; -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -const fileType = "pdf"; +const customFields1: models.SubCustomField = { + name: "Cost", + editor: "Client", + required: true, + value: "$20,000", +}; -const result = signatureRequestApi.signatureRequestFiles(signatureRequestId, fileType); +const customFields = [ + customFields1, +]; -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +const signatureRequestEditWithTemplateRequest: models.SignatureRequestEditWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message: "Glad we could come to an agreement.", + subject: "Purchase Order", + testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, +}; + +apiCaller.signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest, +).then(response => { + console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate:"); console.log(error.body); }); @@ -802,12 +902,12 @@ result.then(response => { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signatureRequestId** | **string**| The id of the SignatureRequest to retrieve. | | -| **fileType** | **'pdf' | 'zip'**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to 'pdf'] | +| **signatureRequestId** | **string**| The id of the SignatureRequest to edit. | | +| **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](../model/SignatureRequestEditWithTemplateRequest.md)| | | ### Return type -**Buffer** +[**SignatureRequestGetResponse**](../model/SignatureRequestGetResponse.md) ### Authorization @@ -815,68 +915,97 @@ result.then(response => { ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: `application/pdf`, `application/zip`, `application/json` +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) -## `signatureRequestFilesAsDataUri()` +## `signatureRequestFiles()` ```typescript -signatureRequestFilesAsDataUri(signatureRequestId: string): FileResponseDataUri +signatureRequestFiles(signatureRequestId: string, fileType: 'pdf' | 'zip'): Buffer ``` -Download Files as Data Uri +Download Files -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf", // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); +}).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestFiles:"); + console.log(error.body); +}); -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +``` -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +### Parameters -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signatureRequestId** | **string**| The id of the SignatureRequest to retrieve. | | +| **fileType** | **'pdf' | 'zip'**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to 'pdf'] | -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +### Return type -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); +**Buffer** + +### Authorization +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/pdf`, `application/zip`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestFilesAsDataUri()` + +```typescript +signatureRequestFilesAsDataUri(signatureRequestId: string): FileResponseDataUri ``` -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; +Download Files as Data Uri -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +### TypeScript Example -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +```typescript +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestFilesAsDataUri(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri:"); console.log(error.body); }); @@ -918,48 +1047,21 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestFilesAsFileUrl(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1, // forceDownload +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl:"); console.log(error.body); }); @@ -1002,48 +1104,20 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestGet(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestGet:"); console.log(error.body); }); @@ -1085,50 +1159,23 @@ Returns a list of SignatureRequests that you can access. This includes Signature ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = null; -const page = 1; - -const result = signatureRequestApi.signatureRequestList(accountId, page); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.signatureRequestList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestList:"); console.log(error.body); }); @@ -1173,48 +1220,20 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = signatureRequestApi.signatureRequestReleaseHold(signatureRequestId); -result.then(response => { +apiCaller.signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestReleaseHold:"); console.log(error.body); }); @@ -1256,56 +1275,25 @@ Sends an email to the signer reminding them to sign the signature request. You c ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestRemindRequest = { - emailAddress: "john@example.com", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const signatureRequestRemindRequest: models.SignatureRequestRemindRequest = { emailAddress: "john@example.com", }; -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemind(signatureRequestId, data); -result.then(response => { +apiCaller.signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestRemind:"); console.log(error.body); }); @@ -1348,48 +1336,17 @@ Removes your access to a completed signature request. This action is **not rever ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; -const result = signatureRequestApi.signatureRequestRemove(signatureRequestId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId +).catch(error => { + console.log("Exception when calling SignatureRequestApi#signatureRequestRemove:"); console.log(error.body); }); @@ -1431,174 +1388,70 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jack@example.com", - name: "Jack", - order: 0, -}; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer2: DropboxSign.SubSignatureRequestSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer: DropboxSign.RequestDetailedFile = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt: DropboxSign.RequestDetailedFile = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; - -const data: DropboxSign.SignatureRequestSendRequest = { - title: "NDA with Acme Co.", - subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [ file, fileBuffer, fileBufferAlt ], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, }; -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { - emailAddress: "jack@example.com", +const signers1: models.SubSignatureRequestSigner = { name: "Jack", + emailAddress: "jack@example.com", order: 0, }; -const signer2 = { - emailAddress: "jill@example.com", +const signers2: models.SubSignatureRequestSigner = { name: "Jill", + emailAddress: "jill@example.com", order: 1, }; -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -// Upload a local file -const file = fs.createReadStream("example_signature_request.pdf"); - -// or, upload from buffer -const fileBuffer = { - value: fs.readFileSync("example_signature_request.pdf"), - options: { - filename: "example_signature_request.pdf", - contentType: "application/pdf", - }, -}; - -// or, upload from buffer alternative -const fileBufferAlt = { - value: Buffer.from("abc-123"), - options: { - filename: "txt-sample.txt", - contentType: "text/plain", - }, -}; +const signers = [ + signers1, + signers2, +]; -const data = { - title: "NDA with Acme Co.", +const signatureRequestSendRequest: models.SignatureRequestSendRequest = { + message: "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject: "The NDA we talked about", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ signer1, signer2 ], + testMode: true, + title: "NDA with Acme Co.", ccEmailAddresses: [ "lawyer1@dropboxsign.com", - "lawyer2@example.com", + "lawyer2@dropboxsign.com", + ], + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - files: [ file, fileBuffer, fileBufferAlt ], metadata: { "custom_id": 1234, - "custom_text": "NDA #9", + "custom_text": "NDA #9" }, - signingOptions, - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + signingOptions: signingOptions, + signers: signers, }; -const result = signatureRequestApi.signatureRequestSend(data); -result.then(response => { +apiCaller.signatureRequestSend( + signatureRequestSendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestSend:"); console.log(error.body); }); @@ -1640,118 +1493,71 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubSignatureRequestTemplateSigner = { - role: "Client", - emailAddress: "george@example.com", - name: "George", -}; - -const cc1: DropboxSign.SubCC = { - role: "Accounting", - emailAddress: "accounting@example.com", -}; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const customField1: DropboxSign.SubCustomField = { - name: "Cost", - value: "$20,000", - editor: "Client", - required: true, -}; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signingOptions: DropboxSign.SubSigningOptions = { +const signingOptions: models.SubSigningOptions = { + defaultType: models.SubSigningOptions.DefaultTypeEnum.Draw, draw: true, + phone: false, type: true, upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const data: DropboxSign.SignatureRequestSendWithTemplateRequest = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", - message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, - testMode: true, }; -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { +const signers1: models.SubSignatureRequestTemplateSigner = { role: "Client", - emailAddress: "george@example.com", name: "George", + emailAddress: "george@example.com", }; -const cc1 = { +const signers = [ + signers1, +]; + +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@example.com", }; -const customField1 = { +const ccs = [ + ccs1, +]; + +const customFields1: models.SubCustomField = { name: "Cost", - value: "$20,000", editor: "Client", required: true, + value: "$20,000", }; -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; +const customFields = [ + customFields1, +]; -const data = { - templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject: "Purchase Order", +const signatureRequestSendWithTemplateRequest: models.SignatureRequestSendWithTemplateRequest = { + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], message: "Glad we could come to an agreement.", - signers: [ signer1 ], - ccs: [ cc1 ], - customFields: [ customField1 ], - signingOptions, + subject: "Purchase Order", testMode: true, + signingOptions: signingOptions, + signers: signers, + ccs: ccs, + customFields: customFields, }; -const result = signatureRequestApi.signatureRequestSendWithTemplate(data); -result.then(response => { +apiCaller.signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate:"); console.log(error.body); }); @@ -1793,58 +1599,26 @@ Updates the email address and/or the name for a given signer on a signature requ ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.SignatureRequestUpdateRequest = { - emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", -}; - -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const signatureRequestApi = new DropboxSign.SignatureRequestApi(); - -// Configure HTTP basic authorization: api_key -signatureRequestApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// signatureRequestApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.SignatureRequestApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const signatureRequestUpdateRequest: models.SignatureRequestUpdateRequest = { + signatureId: "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", emailAddress: "john@example.com", - signatureId: "78caf2a1d01cd39cea2bc1cbb340dac3", }; -const signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - -const result = signatureRequestApi.signatureRequestUpdate(signatureRequestId, data); -result.then(response => { +apiCaller.signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling SignatureRequestApi#signatureRequestUpdate:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/TeamApi.md b/sdks/node/docs/api/TeamApi.md index cc21d019a..959d4cc46 100644 --- a/sdks/node/docs/api/TeamApi.md +++ b/sdks/node/docs/api/TeamApi.md @@ -29,52 +29,25 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const teamApi = new DropboxSign.TeamApi(); +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamAddMemberRequest = { +const teamAddMemberRequest: models.TeamAddMemberRequest = { emailAddress: "george@example.com", }; -const result = teamApi.teamAddMember(data); -result.then(response => { +apiCaller.teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - emailAddress: "george@example.com", -}; - -const result = teamApi.teamAddMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamAddMember:"); console.log(error.body); }); @@ -117,52 +90,24 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamCreateRequest = { - name: "New Team Name" -}; - -const result = teamApi.teamCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - name: "New Team Name" +const teamCreateRequest: models.TeamCreateRequest = { + name: "New Team Name", }; -const result = teamApi.teamCreate(data); -result.then(response => { +apiCaller.teamCreate( + teamCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamCreate:"); console.log(error.body); }); @@ -204,44 +149,16 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamDelete(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.teamDelete().catch(error => { + console.log("Exception when calling TeamApi#teamDelete:"); console.log(error.body); }); @@ -281,44 +198,18 @@ Returns information about your Team as well as a list of its members. If you do ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { +apiCaller.teamGet().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamGet(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamGet:"); console.log(error.body); }); @@ -358,44 +249,20 @@ Provides information about a team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const result = teamApi.teamInfo(); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = teamApi.teamInfo(); -result.then(response => { +apiCaller.teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamInfo:"); console.log(error.body); }); @@ -437,48 +304,18 @@ Provides a list of team invites (and their roles). ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const teamApi = new DropboxSign.TeamApi(); +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { +apiCaller.teamInvites().then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const emailAddress = "user@dropboxsign.com"; - -const result = teamApi.teamInvites(emailAddress); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamInvites:"); console.log(error.body); }); @@ -520,48 +357,22 @@ Provides a paginated list of members (and their roles) that belong to a given te ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamMembers(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamMembers:"); console.log(error.body); }); @@ -605,54 +416,25 @@ Removes the provided user Account from your Team. If the Account had an outstand ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamRemoveMemberRequest = { - emailAddress: "teammate@dropboxsign.com", - newOwnerEmailAddress: "new_teammate@dropboxsign.com", -}; - -const result = teamApi.teamRemoveMember(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const teamRemoveMemberRequest: models.TeamRemoveMemberRequest = { emailAddress: "teammate@dropboxsign.com", newOwnerEmailAddress: "new_teammate@dropboxsign.com", }; -const result = teamApi.teamRemoveMember(data); -result.then(response => { +apiCaller.teamRemoveMember( + teamRemoveMemberRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamRemoveMember:"); console.log(error.body); }); @@ -694,48 +476,22 @@ Provides a paginated list of sub teams that belong to a given team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20, // pageSize +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - -const result = teamApi.teamSubTeams(teamId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamSubTeams:"); console.log(error.body); }); @@ -779,52 +535,24 @@ Updates the name of your Team. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TeamUpdateRequest = { - name: "New Team Name", -}; - -const result = teamApi.teamUpdate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const teamApi = new DropboxSign.TeamApi(); - -// Configure HTTP basic authorization: api_key -teamApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// teamApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TeamApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const teamUpdateRequest: models.TeamUpdateRequest = { name: "New Team Name", }; -const result = teamApi.teamUpdate(data); -result.then(response => { +apiCaller.teamUpdate( + teamUpdateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TeamApi#teamUpdate:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/TemplateApi.md b/sdks/node/docs/api/TemplateApi.md index e73e5930d..d86551c72 100644 --- a/sdks/node/docs/api/TemplateApi.md +++ b/sdks/node/docs/api/TemplateApi.md @@ -30,56 +30,25 @@ Gives the specified Account access to the specified Template. The specified Acco ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateAddUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const templateAddUserRequest: models.TemplateAddUserRequest = { emailAddress: "george@dropboxsign.com", }; -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateAddUser(templateId, data); -result.then(response => { +apiCaller.templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateAddUser:"); console.log(error.body); }); @@ -122,132 +91,107 @@ Creates a template that can then be used. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, +}; -const role1: DropboxSign.SubTemplateRole = { +const signerRoles1: models.SubTemplateRole = { name: "Client", order: 0, }; -const role2: DropboxSign.SubTemplateRole = { +const signerRoles2: models.SubTemplateRole = { name: "Witness", order: 1, }; -const mergeField1: DropboxSign.SubMergeField = { - name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, -}; - -const mergeField2: DropboxSign.SubMergeField = { - name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; +const signerRoles = [ + signerRoles1, + signerRoles2, +]; -const data: DropboxSign.TemplateCreateRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, +const formFieldsPerDocument1: models.SubFormFieldsPerDocumentText = { + documentIndex: 0, + apiId: "uniqueIdHere_1", + type: "text", + required: true, + signer: "1", + width: 100, + height: 16, + x: 112, + y: 328, + name: "", + page: 1, + placeholder: "", + validationType: models.SubFormFieldsPerDocumentText.ValidationTypeEnum.NumbersOnly, }; -const result = templateApi.templateCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { - name: "Client", - order: 0, +const formFieldsPerDocument2: models.SubFormFieldsPerDocumentSignature = { + documentIndex: 0, + apiId: "uniqueIdHere_2", + type: "signature", + required: true, + signer: "0", + width: 120, + height: 30, + x: 530, + y: 415, + name: "", + page: 1, }; -const role2 = { - name: "Witness", - order: 1, -}; +const formFieldsPerDocument = [ + formFieldsPerDocument1, + formFieldsPerDocument2, +]; -const mergeField1 = { +const mergeFields1: models.SubMergeField = { name: "Full Name", - type: "text", + type: models.SubMergeField.TypeEnum.Text, }; -const mergeField2 = { +const mergeFields2: models.SubMergeField = { name: "Is Registered?", - type: "checkbox", + type: models.SubMergeField.TypeEnum.Checkbox, }; -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; +const mergeFields = [ + mergeFields1, + mergeFields2, +]; -const data = { +const templateCreateRequest: models.TemplateCreateRequest = { clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: [ - role1, - role2, + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + signerRoles: signerRoles, + formFieldsPerDocument: formFieldsPerDocument, + mergeFields: mergeFields, }; -const result = templateApi.templateCreate(data); -result.then(response => { +apiCaller.templateCreate( + templateCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateCreate:"); console.log(error.body); }); @@ -289,132 +233,71 @@ The first step in an embedded template workflow. Creates a draft template that c ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1: DropboxSign.SubTemplateRole = { - name: "Client", - order: 0, -}; - -const role2: DropboxSign.SubTemplateRole = { - name: "Witness", - order: 1, +const fieldOptions: models.SubFieldOptions = { + dateFormat: models.SubFieldOptions.DateFormatEnum.DdMmYyyy, }; -const mergeField1: DropboxSign.SubMergeField = { +const mergeFields1: models.SubMergeField = { name: "Full Name", - type: DropboxSign.SubMergeField.TypeEnum.Text, + type: models.SubMergeField.TypeEnum.Text, }; -const mergeField2: DropboxSign.SubMergeField = { +const mergeFields2: models.SubMergeField = { name: "Is Registered?", - type: DropboxSign.SubMergeField.TypeEnum.Checkbox, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.TemplateCreateEmbeddedDraftRequest = { - clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", - message: "For your approval", - signerRoles: [ - role1, - role2, - ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, - ], - fieldOptions, - testMode: true, + type: models.SubMergeField.TypeEnum.Checkbox, }; -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); +const mergeFields = [ + mergeFields1, + mergeFields2, +]; -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const role1 = { +const signerRoles1: models.SubTemplateRole = { name: "Client", order: 0, }; -const role2 = { +const signerRoles2: models.SubTemplateRole = { name: "Witness", order: 1, }; -const mergeField1 = { - name: "Full Name", - type: "text", -}; - -const mergeField2 = { - name: "Is Registered?", - type: "checkbox", -}; +const signerRoles = [ + signerRoles1, + signerRoles2, +]; -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; - -const data = { +const templateCreateEmbeddedDraftRequest: models.TemplateCreateEmbeddedDraftRequest = { clientId: "37dee8d8440c66d54cfa05d92c160882", - files: [fs.createReadStream("example_signature_request.pdf")], - title: "Test Template", - subject: "Please sign this document", message: "For your approval", - signerRoles: [ - role1, - role2, + subject: "Please sign this document", + testMode: true, + title: "Test Template", + ccRoles: [ + "Manager", ], - ccRoles: ["Manager"], - mergeFields: [ - mergeField1, - mergeField2, + files: [ + fs.createReadStream("./example_signature_request.pdf"), ], - fieldOptions, - testMode: true, + fieldOptions: fieldOptions, + mergeFields: mergeFields, + signerRoles: signerRoles, }; -const result = templateApi.templateCreateEmbeddedDraft(data); -result.then(response => { +apiCaller.templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateCreateEmbeddedDraft:"); console.log(error.body); }); @@ -456,48 +339,18 @@ Completely deletes the template specified from the account. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateDelete(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); +apiCaller.templateDelete( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).catch(error => { + console.log("Exception when calling TemplateApi#templateDelete:"); console.log(error.body); }); @@ -539,52 +392,21 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; -const fileType = "pdf"; - -const result = templateApi.templateFiles(templateId, fileType); -result.then(response => { - fs.createWriteStream('file_response.pdf').write(response.body); +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + undefined, // fileType +).then(response => { + fs.createWriteStream('./file_response').write(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFiles:"); console.log(error.body); }); @@ -627,48 +449,20 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateFilesAsDataUri(templateId); -result.then(response => { +apiCaller.templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFilesAsDataUri:"); console.log(error.body); }); @@ -710,48 +504,21 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateFilesAsFileUrl(templateId); -result.then(response => { +apiCaller.templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1, // forceDownload +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateFilesAsFileUrl:"); console.log(error.body); }); @@ -794,48 +561,20 @@ Returns the Template specified by the `template_id` parameter. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateGet(templateId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateId = "f57db65d3f933b5316d398057a36176831451a35"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const result = templateApi.templateGet(templateId); -result.then(response => { +apiCaller.templateGet( + "f57db65d3f933b5316d398057a36176831451a35", // templateId +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateGet:"); console.log(error.body); }); @@ -877,48 +616,23 @@ Returns a list of the Templates that are accessible by you. Take a look at our ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const accountId = "f57db65d3f933b5316d398057a36176831451a35"; - -const result = templateApi.templateList(accountId); -result.then(response => { +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" + +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; + +apiCaller.templateList( + undefined, // accountId + 1, // page + 20, // pageSize + undefined, // query +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateList:"); console.log(error.body); }); @@ -963,56 +677,25 @@ Removes the specified Account\'s access to the specified Template. ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateRemoveUserRequest = { - emailAddress: "george@dropboxsign.com", -}; - -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { +const templateRemoveUserRequest: models.TemplateRemoveUserRequest = { emailAddress: "george@dropboxsign.com", }; -const templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; - -const result = templateApi.templateRemoveUser(templateId, data); -result.then(response => { +apiCaller.templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateRemoveUser:"); console.log(error.body); }); @@ -1055,58 +738,27 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import fs from "fs"; - -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.TemplateUpdateFilesRequest = { - files: [fs.createReadStream("example_signature_request.pdf")], -}; - -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const templateApi = new DropboxSign.TemplateApi(); - -// Configure HTTP basic authorization: api_key -templateApi.username = "YOUR_API_KEY"; +const apiCaller = new api.TemplateApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// or, configure Bearer (JWT) authorization: oauth2 -// templateApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data = { - files: [fs.createReadStream("example_signature_request.pdf")], +const templateUpdateFilesRequest: models.TemplateUpdateFilesRequest = { + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], }; -const templateId = "5de8179668f2033afac48da1868d0093bf133266"; - -const result = templateApi.templateUpdateFiles(templateId, data); -result.then(response => { +apiCaller.templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling TemplateApi#templateUpdateFiles:"); console.log(error.body); }); diff --git a/sdks/node/docs/api/UnclaimedDraftApi.md b/sdks/node/docs/api/UnclaimedDraftApi.md index 068a54986..ef4bb1104 100644 --- a/sdks/node/docs/api/UnclaimedDraftApi.md +++ b/sdks/node/docs/api/UnclaimedDraftApi.md @@ -23,138 +23,39 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jack@example.com", +const signers1: models.SubUnclaimedDraftSigner = { name: "Jack", - order: 0, -}; - -const signer2: DropboxSign.SubUnclaimedDraftSigner = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions: DropboxSign.SubSigningOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: DropboxSign.SubSigningOptions.DefaultTypeEnum.Draw, -}; - -const fieldOptions: DropboxSign.SubFieldOptions = { - dateFormat: DropboxSign.SubFieldOptions.DateFormatEnum.DD_MM_YYYY, -}; - -const data: DropboxSign.UnclaimedDraftCreateRequest = { - subject: "The NDA we talked about", - type: DropboxSign.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { emailAddress: "jack@example.com", - name: "Jack", order: 0, }; -const signer2 = { - emailAddress: "jill@example.com", - name: "Jill", - order: 1, -}; - -const signingOptions = { - draw: true, - type: true, - upload: true, - phone: false, - defaultType: "draw", -}; - -const fieldOptions = { - dateFormat: "DD - MM - YYYY", -}; +const signers = [ + signers1, +]; -const data = { - subject: "The NDA we talked about", - type: "request_signature", - message: "Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers: [ - signer1, - signer2, - ], - ccEmailAddresses: [ - "lawyer1@dropboxsign.com", - "lawyer2@example.com", - ], - files: [fs.createReadStream("example_signature_request.pdf")], - metadata: { - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signingOptions, - fieldOptions, +const unclaimedDraftCreateRequest: models.UnclaimedDraftCreateRequest = { + type: models.UnclaimedDraftCreateRequest.TypeEnum.RequestSignature, testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], + signers: signers, }; -const result = unclaimedDraftApi.unclaimedDraftCreate(data); -result.then(response => { +apiCaller.unclaimedDraftCreate( + unclaimedDraftCreateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate:"); console.log(error.body); }); @@ -196,60 +97,29 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; -import * as fs from 'fs'; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftCreateEmbeddedRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], - requesterEmailAddress: "jack@dropboxsign.com", - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - files: [fs.createReadStream("example_signature_request.pdf")], +const unclaimedDraftCreateEmbeddedRequest: models.UnclaimedDraftCreateEmbeddedRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", testMode: true, + files: [ + fs.createReadStream("./example_signature_request.pdf"), + ], }; -const result = unclaimedDraftApi.unclaimedDraftCreateEmbedded(data); -result.then(response => { +apiCaller.unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded:"); console.log(error.body); }); @@ -291,84 +161,50 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const signer1: DropboxSign.SubUnclaimedDraftTemplateSigner = { - role: "Client", - name: "George", - emailAddress: "george@example.com", -}; - -const cc1: DropboxSign.SubCC = { +const ccs1: models.SubCC = { role: "Accounting", emailAddress: "accounting@dropboxsign.com", }; -const data: DropboxSign.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, -}; - -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +const ccs = [ + ccs1, +]; -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const signer1 = { +const signers1: models.SubUnclaimedDraftTemplateSigner = { role: "Client", name: "George", emailAddress: "george@example.com", }; -const cc1 = { - role: "Accounting", - emailAddress: "accounting@dropboxsign.com", -}; +const signers = [ + signers1, +]; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - templateIds: ["61a832ff0d8423f91d503e76bfbcc750f7417c78"], +const unclaimedDraftCreateEmbeddedWithTemplateRequest: models.UnclaimedDraftCreateEmbeddedWithTemplateRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", requesterEmailAddress: "jack@dropboxsign.com", - signers: [ signer1 ], - ccs: [ cc1 ], - testMode: true, + templateIds: [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + testMode: false, + ccs: ccs, + signers: signers, }; -const result = unclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate(data); -result.then(response => { +apiCaller.unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate:"); console.log(error.body); }); @@ -410,58 +246,26 @@ Creates a new signature request from an embedded request that can be edited prio ### TypeScript Example ```typescript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; - -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; - -const data: DropboxSign.UnclaimedDraftEditAndResendRequest = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, -}; - -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { - console.log(response.body); -}).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); - console.log(error.body); -}); - -``` - -### JavaScript Example - -```javascript -import * as DropboxSign from "@dropbox/sign"; - -const unclaimedDraftApi = new DropboxSign.UnclaimedDraftApi(); - -// Configure HTTP basic authorization: api_key -unclaimedDraftApi.username = "YOUR_API_KEY"; +import * as fs from 'fs'; +import api from "@dropbox/sign" +import models from "@dropbox/sign" -// or, configure Bearer (JWT) authorization: oauth2 -// unclaimedDraftApi.accessToken = "YOUR_ACCESS_TOKEN"; +const apiCaller = new api.UnclaimedDraftApi(); +apiCaller.username = "YOUR_API_KEY"; +// apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; -const data = { - clientId: "ec64a202072370a737edf4a0eb7f4437", - testMode: true, +const unclaimedDraftEditAndResendRequest: models.UnclaimedDraftEditAndResendRequest = { + clientId: "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + testMode: false, }; -const signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; - -const result = unclaimedDraftApi.unclaimedDraftEditAndResend(signatureRequestId, data); -result.then(response => { +apiCaller.unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest, +).then(response => { console.log(response.body); }).catch(error => { - console.log("Exception when calling Dropbox Sign API:"); + console.log("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend:"); console.log(error.body); }); diff --git a/sdks/node/docs/model/FaxLineAddUserRequest.md b/sdks/node/docs/model/FaxLineAddUserRequest.md index df23c2cdb..0b687c0d8 100644 --- a/sdks/node/docs/model/FaxLineAddUserRequest.md +++ b/sdks/node/docs/model/FaxLineAddUserRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | | `accountId` | ```string``` | Account ID | | | `emailAddress` | ```string``` | Email address | | diff --git a/sdks/node/docs/model/FaxLineCreateRequest.md b/sdks/node/docs/model/FaxLineCreateRequest.md index ae70b5cb9..6087b8973 100644 --- a/sdks/node/docs/model/FaxLineCreateRequest.md +++ b/sdks/node/docs/model/FaxLineCreateRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `areaCode`*_required_ | ```number``` | Area code | | -| `country`*_required_ | ```string``` | Country | | -| `city` | ```string``` | City | | -| `accountId` | ```string``` | Account ID | | +| `areaCode`*_required_ | ```number``` | Area code of the new Fax Line | | +| `country`*_required_ | ```string``` | Country of the area code | | +| `city` | ```string``` | City of the area code | | +| `accountId` | ```string``` | Account ID of the account that will be assigned this new Fax Line | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/FaxLineDeleteRequest.md b/sdks/node/docs/model/FaxLineDeleteRequest.md index a2112ed33..fed4ee118 100644 --- a/sdks/node/docs/model/FaxLineDeleteRequest.md +++ b/sdks/node/docs/model/FaxLineDeleteRequest.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/FaxLineRemoveUserRequest.md b/sdks/node/docs/model/FaxLineRemoveUserRequest.md index e161ecf38..9ae81a65e 100644 --- a/sdks/node/docs/model/FaxLineRemoveUserRequest.md +++ b/sdks/node/docs/model/FaxLineRemoveUserRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | -| `accountId` | ```string``` | Account ID | | -| `emailAddress` | ```string``` | Email address | | +| `number`*_required_ | ```string``` | The Fax Line number | | +| `accountId` | ```string``` | Account ID of the user to remove access | | +| `emailAddress` | ```string``` | Email address of the user to remove access | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/FaxSendRequest.md b/sdks/node/docs/model/FaxSendRequest.md index 72ebb6fb0..9df85d9d2 100644 --- a/sdks/node/docs/model/FaxSendRequest.md +++ b/sdks/node/docs/model/FaxSendRequest.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```string``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```Array``` | Fax File to Send | | -| `fileUrls` | ```Array``` | Fax File URL to Send | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `testMode` | ```boolean``` | API Test Mode Setting | [default to false] | -| `coverPageTo` | ```string``` | Fax Cover Page for Recipient | | -| `coverPageFrom` | ```string``` | Fax Cover Page for Sender | | +| `coverPageTo` | ```string``` | Fax cover page recipient information | | +| `coverPageFrom` | ```string``` | Fax cover page sender information | | | `coverPageMessage` | ```string``` | Fax Cover Page Message | | | `title` | ```string``` | Fax Title | | diff --git a/sdks/node/docs/model/SignatureRequestEditEmbeddedRequest.md b/sdks/node/docs/model/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..bcc66ecf9 --- /dev/null +++ b/sdks/node/docs/model/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,34 @@ +# # SignatureRequestEditEmbeddedRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `clientId`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allowReassign` | ```boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```Array``` | The email addresses that should be CCed. | | +| `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `populateAutoFillFields` | ```boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | +| `expiresAt` | ```number``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/node/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..f417f0f72 --- /dev/null +++ b/sdks/node/docs/model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,25 @@ +# # SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `templateIds`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/SignatureRequestEditRequest.md b/sdks/node/docs/model/SignatureRequestEditRequest.md new file mode 100644 index 000000000..309384652 --- /dev/null +++ b/sdks/node/docs/model/SignatureRequestEditRequest.md @@ -0,0 +1,35 @@ +# # SignatureRequestEditRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allowReassign` | ```boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```Array``` | The email addresses that should be CCed. | | +| `clientId` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `isEid` | ```boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `expiresAt` | ```number``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/SignatureRequestEditWithTemplateRequest.md b/sdks/node/docs/model/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..fdec2cfc0 --- /dev/null +++ b/sdks/node/docs/model/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,26 @@ +# # SignatureRequestEditWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `templateIds`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```string``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isEid` | ```boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```{ [key: string]: any; }``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/faxLineAddUserRequest.ts b/sdks/node/model/faxLineAddUserRequest.ts index 95b75de1b..5f890f7dd 100644 --- a/sdks/node/model/faxLineAddUserRequest.ts +++ b/sdks/node/model/faxLineAddUserRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineAddUserRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; /** diff --git a/sdks/node/model/faxLineCreateRequest.ts b/sdks/node/model/faxLineCreateRequest.ts index 3a67d60e4..764da8214 100644 --- a/sdks/node/model/faxLineCreateRequest.ts +++ b/sdks/node/model/faxLineCreateRequest.ts @@ -26,19 +26,19 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineCreateRequest { /** - * Area code + * Area code of the new Fax Line */ "areaCode": number; /** - * Country + * Country of the area code */ "country": FaxLineCreateRequest.CountryEnum; /** - * City + * City of the area code */ "city"?: string; /** - * Account ID + * Account ID of the account that will be assigned this new Fax Line */ "accountId"?: string; diff --git a/sdks/node/model/faxLineDeleteRequest.ts b/sdks/node/model/faxLineDeleteRequest.ts index 26d8798c4..1cb2e63dc 100644 --- a/sdks/node/model/faxLineDeleteRequest.ts +++ b/sdks/node/model/faxLineDeleteRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineDeleteRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; diff --git a/sdks/node/model/faxLineRemoveUserRequest.ts b/sdks/node/model/faxLineRemoveUserRequest.ts index 02f921c6a..26e8b4e6b 100644 --- a/sdks/node/model/faxLineRemoveUserRequest.ts +++ b/sdks/node/model/faxLineRemoveUserRequest.ts @@ -26,15 +26,15 @@ import { AttributeTypeMap, ObjectSerializer } from "./"; export class FaxLineRemoveUserRequest { /** - * The Fax Line number. + * The Fax Line number */ "number": string; /** - * Account ID + * Account ID of the user to remove access */ "accountId"?: string; /** - * Email address + * Email address of the user to remove access */ "emailAddress"?: string; diff --git a/sdks/node/model/faxSendRequest.ts b/sdks/node/model/faxSendRequest.ts index 11ee71ef4..fcd45d645 100644 --- a/sdks/node/model/faxSendRequest.ts +++ b/sdks/node/model/faxSendRequest.ts @@ -26,7 +26,7 @@ import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; export class FaxSendRequest { /** - * Fax Send To Recipient + * Recipient of the fax Can be a phone number in E.164 format or email address */ "recipient": string; /** @@ -34,11 +34,11 @@ export class FaxSendRequest { */ "sender"?: string; /** - * Fax File to Send + * Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. */ "files"?: Array; /** - * Fax File URL to Send + * Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. */ "fileUrls"?: Array; /** @@ -46,11 +46,11 @@ export class FaxSendRequest { */ "testMode"?: boolean = false; /** - * Fax Cover Page for Recipient + * Fax cover page recipient information */ "coverPageTo"?: string; /** - * Fax Cover Page for Sender + * Fax cover page sender information */ "coverPageFrom"?: string; /** diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 7813c02fc..1f2ea9c97 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -75,6 +75,10 @@ import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatu import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; import { SignatureRequestCreateEmbeddedWithTemplateRequest } from "./signatureRequestCreateEmbeddedWithTemplateRequest"; +import { SignatureRequestEditEmbeddedRequest } from "./signatureRequestEditEmbeddedRequest"; +import { SignatureRequestEditEmbeddedWithTemplateRequest } from "./signatureRequestEditEmbeddedWithTemplateRequest"; +import { SignatureRequestEditRequest } from "./signatureRequestEditRequest"; +import { SignatureRequestEditWithTemplateRequest } from "./signatureRequestEditWithTemplateRequest"; import { SignatureRequestGetResponse } from "./signatureRequestGetResponse"; import { SignatureRequestListResponse } from "./signatureRequestListResponse"; import { SignatureRequestRemindRequest } from "./signatureRequestRemindRequest"; @@ -315,6 +319,12 @@ export let typeMap: { [index: string]: any } = { SignatureRequestCreateEmbeddedRequest: SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest: SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest: + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse: SignatureRequestGetResponse, SignatureRequestListResponse: SignatureRequestListResponse, SignatureRequestRemindRequest: SignatureRequestRemindRequest, @@ -547,6 +557,10 @@ export { SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditRequest, + SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, diff --git a/sdks/node/model/models.ts b/sdks/node/model/models.ts index 3f6c346c4..5db056983 100644 --- a/sdks/node/model/models.ts +++ b/sdks/node/model/models.ts @@ -36,6 +36,26 @@ let primitives = [ "any", ]; +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return ( + str.length >= match.length && + str.substring(str.length - match.length) === match + ); +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -83,21 +103,32 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize(data[key], subType); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); } else { @@ -131,23 +162,34 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { - // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize(data[key], subType); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { diff --git a/sdks/node/model/signatureRequestEditEmbeddedRequest.ts b/sdks/node/model/signatureRequestEditEmbeddedRequest.ts new file mode 100644 index 000000000..78b05c0ac --- /dev/null +++ b/sdks/node/model/signatureRequestEditEmbeddedRequest.ts @@ -0,0 +1,264 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditEmbeddedRequest { + /** + * Client id of the app you\'re using to create this embedded signature request. Used for security purposes. + */ + "clientId": string; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "signers"?: Array; + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "groupedSigners"?: Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ + "allowReassign"?: boolean = false; + /** + * A list describing the attachments + */ + "attachments"?: Array; + /** + * The email addresses that should be CCed. + */ + "ccEmailAddresses"?: Array; + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + */ + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + */ + "formFieldGroups"?: Array; + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + */ + "formFieldRules"?: Array; + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + */ + "formFieldsPerDocument"?: Array; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + "hideTextTags"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + "useTextTags"?: boolean = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + "populateAutoFillFields"?: boolean = false; + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + */ + "expiresAt"?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean", + }, + { + name: "attachments", + baseName: "attachments", + type: "Array", + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions", + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array", + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array", + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array", + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean", + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean", + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditEmbeddedRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditEmbeddedRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedRequest" + ); + } +} diff --git a/sdks/node/model/signatureRequestEditEmbeddedWithTemplateRequest.ts b/sdks/node/model/signatureRequestEditEmbeddedWithTemplateRequest.ts new file mode 100644 index 000000000..c007c76ca --- /dev/null +++ b/sdks/node/model/signatureRequestEditEmbeddedWithTemplateRequest.ts @@ -0,0 +1,181 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditEmbeddedWithTemplateRequest { + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + */ + "templateIds": Array; + /** + * Client id of the app you\'re using to create this embedded signature request. Used for security purposes. + */ + "clientId": string; + /** + * Add Signers to your Templated-based Signature Request. + */ + "signers": Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Add CC email recipients. Required when a CC role exists for the Template. + */ + "ccs"?: Array; + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + */ + "customFields"?: Array; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ + "populateAutoFillFields"?: boolean = false; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "ccs", + baseName: "ccs", + type: "Array", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditEmbeddedWithTemplateRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + } +} diff --git a/sdks/node/model/signatureRequestEditRequest.ts b/sdks/node/model/signatureRequestEditRequest.ts new file mode 100644 index 000000000..432e8fe4f --- /dev/null +++ b/sdks/node/model/signatureRequestEditRequest.ts @@ -0,0 +1,270 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +export class SignatureRequestEditRequest { + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "signers"?: Array; + /** + * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + */ + "groupedSigners"?: Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ + "allowReassign"?: boolean = false; + /** + * A list describing the attachments + */ + "attachments"?: Array; + /** + * The email addresses that should be CCed. + */ + "ccEmailAddresses"?: Array; + /** + * The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + */ + "clientId"?: string; + /** + * When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + */ + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + /** + * Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + */ + "formFieldGroups"?: Array; + /** + * Conditional Logic rules for fields defined in `form_fields_per_document`. + */ + "formFieldRules"?: Array; + /** + * The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + */ + "formFieldsPerDocument"?: Array; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ + "hideTextTags"?: boolean = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + "isEid"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The URL you want signers redirected to after they successfully sign. + */ + "signingRedirectUrl"?: string; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ + "useTextTags"?: boolean = false; + /** + * When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + */ + "expiresAt"?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean", + }, + { + name: "attachments", + baseName: "attachments", + type: "Array", + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions", + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array", + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array", + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array", + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean", + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean", + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditRequest { + return ObjectSerializer.deserialize(data, "SignatureRequestEditRequest"); + } +} diff --git a/sdks/node/model/signatureRequestEditWithTemplateRequest.ts b/sdks/node/model/signatureRequestEditWithTemplateRequest.ts new file mode 100644 index 000000000..f35af5999 --- /dev/null +++ b/sdks/node/model/signatureRequestEditWithTemplateRequest.ts @@ -0,0 +1,193 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; + +/** + * + */ +export class SignatureRequestEditWithTemplateRequest { + /** + * Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + */ + "templateIds": Array; + /** + * Add Signers to your Templated-based Signature Request. + */ + "signers": Array; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ + "allowDecline"?: boolean = false; + /** + * Add CC email recipients. Required when a CC role exists for the Template. + */ + "ccs"?: Array; + /** + * Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + */ + "clientId"?: string; + /** + * An array defining values and options for custom fields. Required when a custom field exists in the Template. + */ + "customFields"?: Array; + /** + * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "files"?: Array; + /** + * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + */ + "fileUrls"?: Array; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ + "isEid"?: boolean = false; + /** + * The custom message in the email that will be sent to the signers. + */ + "message"?: string; + /** + * Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer\'s order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + */ + "metadata"?: { [key: string]: any }; + "signingOptions"?: SubSigningOptions; + /** + * The URL you want signers redirected to after they successfully sign. + */ + "signingRedirectUrl"?: string; + /** + * The subject in the email that will be sent to the signers. + */ + "subject"?: string; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ + "testMode"?: boolean = false; + /** + * The title you want to assign to the SignatureRequest. + */ + "title"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array", + }, + { + name: "signers", + baseName: "signers", + type: "Array", + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean", + }, + { + name: "ccs", + baseName: "ccs", + type: "Array", + }, + { + name: "clientId", + baseName: "client_id", + type: "string", + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array", + }, + { + name: "files", + baseName: "files", + type: "Array", + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array", + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean", + }, + { + name: "message", + baseName: "message", + type: "string", + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }", + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions", + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string", + }, + { + name: "subject", + baseName: "subject", + type: "string", + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean", + }, + { + name: "title", + baseName: "title", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SignatureRequestEditWithTemplateRequest.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SignatureRequestEditWithTemplateRequest { + return ObjectSerializer.deserialize( + data, + "SignatureRequestEditWithTemplateRequest" + ); + } +} diff --git a/sdks/node/model/signatureRequestSendRequest.ts b/sdks/node/model/signatureRequestSendRequest.ts index 63ec9cc6d..75720c17b 100644 --- a/sdks/node/model/signatureRequestSendRequest.ts +++ b/sdks/node/model/signatureRequestSendRequest.ts @@ -93,6 +93,8 @@ export class SignatureRequestSendRequest { "hideTextTags"?: boolean = false; /** * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated */ "isQualifiedSignature"?: boolean = false; /** diff --git a/sdks/node/model/signatureRequestSendWithTemplateRequest.ts b/sdks/node/model/signatureRequestSendWithTemplateRequest.ts index 2a3dbb8ea..12232a129 100644 --- a/sdks/node/model/signatureRequestSendWithTemplateRequest.ts +++ b/sdks/node/model/signatureRequestSendWithTemplateRequest.ts @@ -66,6 +66,8 @@ export class SignatureRequestSendWithTemplateRequest { "fileUrls"?: Array; /** * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated */ "isQualifiedSignature"?: boolean = false; /** diff --git a/sdks/node/model/subFormFieldRuleAction.ts b/sdks/node/model/subFormFieldRuleAction.ts index 43ec2545f..d1fe6f0ec 100644 --- a/sdks/node/model/subFormFieldRuleAction.ts +++ b/sdks/node/model/subFormFieldRuleAction.ts @@ -76,7 +76,9 @@ export class SubFormFieldRuleAction { export namespace SubFormFieldRuleAction { export enum TypeEnum { + ChangeFieldVisibility = "change-field-visibility", FieldVisibility = "change-field-visibility", + ChangeGroupVisibility = "change-group-visibility", GroupVisibility = "change-group-visibility", } } diff --git a/sdks/node/model/templateCreateEmbeddedDraftResponseTemplate.ts b/sdks/node/model/templateCreateEmbeddedDraftResponseTemplate.ts index af7f9a71b..d74b06aed 100644 --- a/sdks/node/model/templateCreateEmbeddedDraftResponseTemplate.ts +++ b/sdks/node/model/templateCreateEmbeddedDraftResponseTemplate.ts @@ -43,6 +43,8 @@ export class TemplateCreateEmbeddedDraftResponseTemplate { "expiresAt"?: number; /** * A list of warnings. + * + * @deprecated */ "warnings"?: Array; diff --git a/sdks/node/model/templateResponse.ts b/sdks/node/model/templateResponse.ts index 4c4b99226..298db4670 100644 --- a/sdks/node/model/templateResponse.ts +++ b/sdks/node/model/templateResponse.ts @@ -85,10 +85,14 @@ export class TemplateResponse { "documents"?: Array; /** * Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. + * + * @deprecated */ "customFields"?: Array | null; /** * Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. + * + * @deprecated */ "namedFormFields"?: Array | null; /** diff --git a/sdks/node/model/templateUpdateFilesResponseTemplate.ts b/sdks/node/model/templateUpdateFilesResponseTemplate.ts index 98e18dabc..2d32cb3b0 100644 --- a/sdks/node/model/templateUpdateFilesResponseTemplate.ts +++ b/sdks/node/model/templateUpdateFilesResponseTemplate.ts @@ -35,6 +35,8 @@ export class TemplateUpdateFilesResponseTemplate { "templateId"?: string; /** * A list of warnings. + * + * @deprecated */ "warnings"?: Array; diff --git a/sdks/node/openapi-config.yaml b/sdks/node/openapi-config.yaml index 130c3ace0..36b2bde68 100644 --- a/sdks/node/openapi-config.yaml +++ b/sdks/node/openapi-config.yaml @@ -2,13 +2,17 @@ generatorName: typescript-node typeMappings: {} additionalProperties: npmName: "@dropbox/sign" - npmVersion: 1.8-dev + npmVersion: 1.8.1-dev supportsES6: true apiDocPath: ./docs/api modelDocPath: ./docs/model sortModelPropertiesByRequiredFlag: true useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.npmName: "@dropbox/sign-sandbox" + oseg.printApiCallProperty: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-npmignore: templateType: SupportingFiles diff --git a/sdks/node/package-lock.json b/sdks/node/package-lock.json index 45782de4c..329130a43 100644 --- a/sdks/node/package-lock.json +++ b/sdks/node/package-lock.json @@ -1,14 +1,14 @@ { "name": "@dropbox/sign", - "version": "1.8-dev", + "version": "1.8.1-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dropbox/sign", - "version": "1.8-dev", + "version": "1.8.1-dev", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -20,7 +20,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", @@ -44,12 +44,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -180,18 +181,18 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -207,111 +208,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", - "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", - "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "dependencies": { - "@babel/types": "^7.25.4" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -543,14 +458,14 @@ } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -575,14 +490,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", - "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -616,6 +530,406 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", + "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", + "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", + "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", + "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", + "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", + "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", + "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", + "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", + "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", + "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", + "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", + "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", + "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", + "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", + "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", + "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", + "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", + "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", + "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", + "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", + "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", + "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", + "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", + "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", + "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1112,9 +1426,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.16.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.1.tgz", - "integrity": "sha512-zJDo7wEadFtSyNz5QITDfRcrhqDvQI1xQNQ0VoizPjM/dVAODqqIUWbJPkvsxmTI0MYRGRikcdjMPhOssnPejQ==", + "version": "20.17.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.24.tgz", + "integrity": "sha512-d7fGCyB96w9BnWQrOsJtpyiSaBcAYYr75bnK6ZRjDbql2cGLj/3GsL5OYmLPNq76l7Gf2q4Rv9J2o6h5CrD9sA==", "dev": true, "dependencies": { "undici-types": "~6.19.2" @@ -1250,9 +1564,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1492,6 +1806,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1691,9 +2018,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1832,6 +2159,20 @@ "node": ">=0.4.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -1881,12 +2222,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -1899,6 +2238,18 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -1952,71 +2303,43 @@ } }, "node_modules/esbuild": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", - "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", + "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/linux-loong64": "0.14.54", - "esbuild-android-64": "0.14.54", - "esbuild-android-arm64": "0.14.54", - "esbuild-darwin-64": "0.14.54", - "esbuild-darwin-arm64": "0.14.54", - "esbuild-freebsd-64": "0.14.54", - "esbuild-freebsd-arm64": "0.14.54", - "esbuild-linux-32": "0.14.54", - "esbuild-linux-64": "0.14.54", - "esbuild-linux-arm": "0.14.54", - "esbuild-linux-arm64": "0.14.54", - "esbuild-linux-mips64le": "0.14.54", - "esbuild-linux-ppc64le": "0.14.54", - "esbuild-linux-riscv64": "0.14.54", - "esbuild-linux-s390x": "0.14.54", - "esbuild-netbsd-64": "0.14.54", - "esbuild-openbsd-64": "0.14.54", - "esbuild-sunos-64": "0.14.54", - "esbuild-windows-32": "0.14.54", - "esbuild-windows-64": "0.14.54", - "esbuild-windows-arm64": "0.14.54" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", - "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", - "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "@esbuild/aix-ppc64": "0.25.1", + "@esbuild/android-arm": "0.25.1", + "@esbuild/android-arm64": "0.25.1", + "@esbuild/android-x64": "0.25.1", + "@esbuild/darwin-arm64": "0.25.1", + "@esbuild/darwin-x64": "0.25.1", + "@esbuild/freebsd-arm64": "0.25.1", + "@esbuild/freebsd-x64": "0.25.1", + "@esbuild/linux-arm": "0.25.1", + "@esbuild/linux-arm64": "0.25.1", + "@esbuild/linux-ia32": "0.25.1", + "@esbuild/linux-loong64": "0.25.1", + "@esbuild/linux-mips64el": "0.25.1", + "@esbuild/linux-ppc64": "0.25.1", + "@esbuild/linux-riscv64": "0.25.1", + "@esbuild/linux-s390x": "0.25.1", + "@esbuild/linux-x64": "0.25.1", + "@esbuild/netbsd-arm64": "0.25.1", + "@esbuild/netbsd-x64": "0.25.1", + "@esbuild/openbsd-arm64": "0.25.1", + "@esbuild/openbsd-x64": "0.25.1", + "@esbuild/sunos-x64": "0.25.1", + "@esbuild/win32-arm64": "0.25.1", + "@esbuild/win32-ia32": "0.25.1", + "@esbuild/win32-x64": "0.25.1" } }, "node_modules/escalade": { @@ -2287,15 +2610,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -2313,6 +2642,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -2356,11 +2698,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2392,21 +2735,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3417,6 +3750,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/memoizee": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", @@ -4137,15 +4479,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/sdks/node/package.json b/sdks/node/package.json index 8800697af..3c0531c93 100644 --- a/sdks/node/package.json +++ b/sdks/node/package.json @@ -1,6 +1,6 @@ { "name": "@dropbox/sign", - "version": "1.8-dev", + "version": "1.8.1-dev", "description": "Official Node client for Dropbox Sign", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", diff --git a/sdks/node/run-build b/sdks/node/run-build index 09afd7e37..7a26bec0b 100755 --- a/sdks/node/run-build +++ b/sdks/node/run-build @@ -22,7 +22,7 @@ rm -f "${DIR}/types/model/"*.ts docker run --rm \ -v "${DIR}/:/local" \ --user "$(id -u):$(id -g)" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -102,6 +102,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + printf "Running build ...\n" bash "${DIR}/bin/node" npm run build bash "${DIR}/bin/node" npm run build-types diff --git a/sdks/node/templates/api-single.mustache b/sdks/node/templates/api-single.mustache index cd57b314c..da9213701 100644 --- a/sdks/node/templates/api-single.mustache +++ b/sdks/node/templates/api-single.mustache @@ -201,6 +201,10 @@ export class {{classname}} { {{#allParams}} * @param {{paramName}} {{description}} {{/allParams}} + {{#isDeprecated}} + * + * @deprecated + {{/isDeprecated}} {{#useCustomTemplateCode}} * @param options {{/useCustomTemplateCode}} diff --git a/sdks/node/templates/dropbox-README.mustache b/sdks/node/templates/dropbox-README.mustache index de052d20b..828b0ec46 100644 --- a/sdks/node/templates/dropbox-README.mustache +++ b/sdks/node/templates/dropbox-README.mustache @@ -56,12 +56,6 @@ REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_TypeScript_CODE ``` -### JavaScript Example - -```javascript -REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_JavaScript_CODE -``` - {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} ## API Endpoints diff --git a/sdks/node/templates/dropbox-api-doc.mustache b/sdks/node/templates/dropbox-api-doc.mustache index b85a3ea2f..432d2afc4 100644 --- a/sdks/node/templates/dropbox-api-doc.mustache +++ b/sdks/node/templates/dropbox-api-doc.mustache @@ -25,12 +25,6 @@ All URIs are relative to {{basePath}}. REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_TypeScript_CODE ``` -### JavaScript Example - -```javascript -REPLACE_ME_WITH_EXAMPLE_FOR__{{{operationId}}}_JavaScript_CODE -``` - ### Parameters {{#vendorExtensions.x-group-parameters}} diff --git a/sdks/node/templates/model.mustache b/sdks/node/templates/model.mustache index a55b8f195..efc79f496 100644 --- a/sdks/node/templates/model.mustache +++ b/sdks/node/templates/model.mustache @@ -27,9 +27,20 @@ export {{#vendorExtensions.x-base-class}}abstract {{/vendorExtensions.x-base-cla {{#description}} /** * {{{.}}} + {{#deprecated}} + * + * @deprecated + {{/deprecated}} */ {{/description}} {{^useCustomTemplateCode}} +{{^description}} + {{#deprecated}} + /** + * @deprecated + */ + {{/deprecated}} +{{/description}} '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{#defaultValue}} = {{#isEnum}}{{classname}}.{{/isEnum}}{{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} diff --git a/sdks/node/templates/models.mustache b/sdks/node/templates/models.mustache index 8443f9341..4285d09ec 100644 --- a/sdks/node/templates/models.mustache +++ b/sdks/node/templates/models.mustache @@ -100,6 +100,23 @@ let typeMap: {[index: string]: any} = { {{/models}} } {{/useCustomTemplateCode}} +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -150,20 +167,35 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); } else { @@ -198,22 +230,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { diff --git a/sdks/node/templates/package.mustache b/sdks/node/templates/package.mustache index ea815e46f..7b289f620 100644 --- a/sdks/node/templates/package.mustache +++ b/sdks/node/templates/package.mustache @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", diff --git a/sdks/node/types/api/apis.d.ts b/sdks/node/types/api/apis.d.ts index abe56f276..843716cb2 100644 --- a/sdks/node/types/api/apis.d.ts +++ b/sdks/node/types/api/apis.d.ts @@ -23,7 +23,7 @@ export interface returnTypeI { body?: any; } export declare const queryParamsSerializer: (params: any) => string; -export declare const USER_AGENT = "OpenAPI-Generator/1.8-dev/node"; +export declare const USER_AGENT = "OpenAPI-Generator/1.8.1-dev/node"; export declare const generateFormData: (obj: any, typemap: AttributeTypeMap) => { localVarUseFormData: boolean; data: object; diff --git a/sdks/node/types/api/signatureRequestApi.d.ts b/sdks/node/types/api/signatureRequestApi.d.ts index 58a02bdcd..54c21ae91 100644 --- a/sdks/node/types/api/signatureRequestApi.d.ts +++ b/sdks/node/types/api/signatureRequestApi.d.ts @@ -1,4 +1,4 @@ -import { Authentication, BulkSendJobSendResponse, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest } from "../model"; +import { Authentication, BulkSendJobSendResponse, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest } from "../model"; import { optionsI, returnTypeI, returnTypeT } from "./"; export declare enum SignatureRequestApiApiKeys { } @@ -29,6 +29,10 @@ export declare class SignatureRequestApi { signatureRequestCancel(signatureRequestId: string, options?: optionsI): Promise; signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest: SignatureRequestCreateEmbeddedRequest, options?: optionsI): Promise>; signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest: SignatureRequestCreateEmbeddedWithTemplateRequest, options?: optionsI): Promise>; + signatureRequestEdit(signatureRequestId: string, signatureRequestEditRequest: SignatureRequestEditRequest, options?: optionsI): Promise>; + signatureRequestEditEmbedded(signatureRequestId: string, signatureRequestEditEmbeddedRequest: SignatureRequestEditEmbeddedRequest, options?: optionsI): Promise>; + signatureRequestEditEmbeddedWithTemplate(signatureRequestId: string, signatureRequestEditEmbeddedWithTemplateRequest: SignatureRequestEditEmbeddedWithTemplateRequest, options?: optionsI): Promise>; + signatureRequestEditWithTemplate(signatureRequestId: string, signatureRequestEditWithTemplateRequest: SignatureRequestEditWithTemplateRequest, options?: optionsI): Promise>; signatureRequestFiles(signatureRequestId: string, fileType?: "pdf" | "zip", options?: optionsI): Promise>; signatureRequestFilesAsDataUri(signatureRequestId: string, options?: optionsI): Promise>; signatureRequestFilesAsFileUrl(signatureRequestId: string, forceDownload?: number, options?: optionsI): Promise>; diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index 664b47950..99010c62f 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -63,6 +63,10 @@ import { SignatureRequestBulkCreateEmbeddedWithTemplateRequest } from "./signatu import { SignatureRequestBulkSendWithTemplateRequest } from "./signatureRequestBulkSendWithTemplateRequest"; import { SignatureRequestCreateEmbeddedRequest } from "./signatureRequestCreateEmbeddedRequest"; import { SignatureRequestCreateEmbeddedWithTemplateRequest } from "./signatureRequestCreateEmbeddedWithTemplateRequest"; +import { SignatureRequestEditEmbeddedRequest } from "./signatureRequestEditEmbeddedRequest"; +import { SignatureRequestEditEmbeddedWithTemplateRequest } from "./signatureRequestEditEmbeddedWithTemplateRequest"; +import { SignatureRequestEditRequest } from "./signatureRequestEditRequest"; +import { SignatureRequestEditWithTemplateRequest } from "./signatureRequestEditWithTemplateRequest"; import { SignatureRequestGetResponse } from "./signatureRequestGetResponse"; import { SignatureRequestListResponse } from "./signatureRequestListResponse"; import { SignatureRequestRemindRequest } from "./signatureRequestRemindRequest"; @@ -194,4 +198,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateEditResponse, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; diff --git a/sdks/node/types/model/signatureRequestEditEmbeddedRequest.d.ts b/sdks/node/types/model/signatureRequestEditEmbeddedRequest.d.ts new file mode 100644 index 000000000..6c2691435 --- /dev/null +++ b/sdks/node/types/model/signatureRequestEditEmbeddedRequest.d.ts @@ -0,0 +1,42 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditEmbeddedRequest { + "clientId": string; + "files"?: Array; + "fileUrls"?: Array; + "signers"?: Array; + "groupedSigners"?: Array; + "allowDecline"?: boolean; + "allowReassign"?: boolean; + "attachments"?: Array; + "ccEmailAddresses"?: Array; + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + "formFieldGroups"?: Array; + "formFieldRules"?: Array; + "formFieldsPerDocument"?: Array; + "hideTextTags"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "useTextTags"?: boolean; + "populateAutoFillFields"?: boolean; + "expiresAt"?: number | null; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditEmbeddedRequest; +} diff --git a/sdks/node/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts b/sdks/node/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts new file mode 100644 index 000000000..6824ad17f --- /dev/null +++ b/sdks/node/types/model/signatureRequestEditEmbeddedWithTemplateRequest.d.ts @@ -0,0 +1,28 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditEmbeddedWithTemplateRequest { + "templateIds": Array; + "clientId": string; + "signers": Array; + "allowDecline"?: boolean; + "ccs"?: Array; + "customFields"?: Array; + "files"?: Array; + "fileUrls"?: Array; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "populateAutoFillFields"?: boolean; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditEmbeddedWithTemplateRequest; +} diff --git a/sdks/node/types/model/signatureRequestEditRequest.d.ts b/sdks/node/types/model/signatureRequestEditRequest.d.ts new file mode 100644 index 000000000..91a01f76c --- /dev/null +++ b/sdks/node/types/model/signatureRequestEditRequest.d.ts @@ -0,0 +1,43 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubAttachment } from "./subAttachment"; +import { SubCustomField } from "./subCustomField"; +import { SubFieldOptions } from "./subFieldOptions"; +import { SubFormFieldGroup } from "./subFormFieldGroup"; +import { SubFormFieldRule } from "./subFormFieldRule"; +import { SubFormFieldsPerDocumentBase } from "./subFormFieldsPerDocumentBase"; +import { SubSignatureRequestGroupedSigners } from "./subSignatureRequestGroupedSigners"; +import { SubSignatureRequestSigner } from "./subSignatureRequestSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditRequest { + "files"?: Array; + "fileUrls"?: Array; + "signers"?: Array; + "groupedSigners"?: Array; + "allowDecline"?: boolean; + "allowReassign"?: boolean; + "attachments"?: Array; + "ccEmailAddresses"?: Array; + "clientId"?: string; + "customFields"?: Array; + "fieldOptions"?: SubFieldOptions; + "formFieldGroups"?: Array; + "formFieldRules"?: Array; + "formFieldsPerDocument"?: Array; + "hideTextTags"?: boolean; + "isEid"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "signingRedirectUrl"?: string; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + "useTextTags"?: boolean; + "expiresAt"?: number | null; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditRequest; +} diff --git a/sdks/node/types/model/signatureRequestEditWithTemplateRequest.d.ts b/sdks/node/types/model/signatureRequestEditWithTemplateRequest.d.ts new file mode 100644 index 000000000..5dc2d730a --- /dev/null +++ b/sdks/node/types/model/signatureRequestEditWithTemplateRequest.d.ts @@ -0,0 +1,29 @@ +import { AttributeTypeMap, RequestFile } from "./"; +import { SubCC } from "./subCC"; +import { SubCustomField } from "./subCustomField"; +import { SubSignatureRequestTemplateSigner } from "./subSignatureRequestTemplateSigner"; +import { SubSigningOptions } from "./subSigningOptions"; +export declare class SignatureRequestEditWithTemplateRequest { + "templateIds": Array; + "signers": Array; + "allowDecline"?: boolean; + "ccs"?: Array; + "clientId"?: string; + "customFields"?: Array; + "files"?: Array; + "fileUrls"?: Array; + "isEid"?: boolean; + "message"?: string; + "metadata"?: { + [key: string]: any; + }; + "signingOptions"?: SubSigningOptions; + "signingRedirectUrl"?: string; + "subject"?: string; + "testMode"?: boolean; + "title"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SignatureRequestEditWithTemplateRequest; +} diff --git a/sdks/node/types/model/subFormFieldRuleAction.d.ts b/sdks/node/types/model/subFormFieldRuleAction.d.ts index 43122776f..650f98673 100644 --- a/sdks/node/types/model/subFormFieldRuleAction.d.ts +++ b/sdks/node/types/model/subFormFieldRuleAction.d.ts @@ -11,7 +11,9 @@ export declare class SubFormFieldRuleAction { } export declare namespace SubFormFieldRuleAction { enum TypeEnum { + ChangeFieldVisibility = "change-field-visibility", FieldVisibility = "change-field-visibility", + ChangeGroupVisibility = "change-group-visibility", GroupVisibility = "change-group-visibility" } } diff --git a/sdks/php/README.md b/sdks/php/README.md index ef4b2677f..26b63859c 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -75,28 +75,28 @@ Please follow the [installation procedure](#installation--usage) and then run th ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); try { - $result = $accountApi->accountCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; } ``` @@ -161,7 +161,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *EmbeddedApi* | [**embeddedEditUrl**](docs/Api/EmbeddedApi.md#embeddedediturl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | | *EmbeddedApi* | [**embeddedSignUrl**](docs/Api/EmbeddedApi.md#embeddedsignurl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | | *FaxApi* | [**faxDelete**](docs/Api/FaxApi.md#faxdelete) | **DELETE** /fax/{fax_id} | Delete Fax | -| *FaxApi* | [**faxFiles**](docs/Api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | List Fax Files | +| *FaxApi* | [**faxFiles**](docs/Api/FaxApi.md#faxfiles) | **GET** /fax/files/{fax_id} | Download Fax Files | | *FaxApi* | [**faxGet**](docs/Api/FaxApi.md#faxget) | **GET** /fax/{fax_id} | Get Fax | | *FaxApi* | [**faxList**](docs/Api/FaxApi.md#faxlist) | **GET** /fax/list | Lists Faxes | | *FaxApi* | [**faxSend**](docs/Api/FaxApi.md#faxsend) | **POST** /fax/send | Send Fax | @@ -180,6 +180,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | *SignatureRequestApi* | [**signatureRequestCancel**](docs/Api/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEdit**](docs/Api/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEditWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | *SignatureRequestApi* | [**signatureRequestFiles**](docs/Api/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -283,6 +287,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestBulkSendWithTemplateRequest](docs/Model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/Model/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditEmbeddedRequest](docs/Model/SignatureRequestEditEmbeddedRequest.md) +- [SignatureRequestEditEmbeddedWithTemplateRequest](docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditRequest](docs/Model/SignatureRequestEditRequest.md) +- [SignatureRequestEditWithTemplateRequest](docs/Model/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/Model/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/Model/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/Model/SignatureRequestRemindRequest.md) @@ -439,6 +447,6 @@ apisupport@hellosign.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.8-dev` - - Generator version: `7.8.0` + - Package version: `1.8.1-dev` + - Generator version: `7.12.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/sdks/php/VERSION b/sdks/php/VERSION index d82db9132..00f91b858 100644 --- a/sdks/php/VERSION +++ b/sdks/php/VERSION @@ -1 +1 @@ -1.8-dev +1.8.1-dev diff --git a/sdks/php/bin/copy-constants.php b/sdks/php/bin/copy-constants.php new file mode 100755 index 000000000..f71f52441 --- /dev/null +++ b/sdks/php/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); diff --git a/sdks/php/docs/Api/AccountApi.md b/sdks/php/docs/Api/AccountApi.md index 9c8e8c9f0..6d0f700ef 100644 --- a/sdks/php/docs/Api/AccountApi.md +++ b/sdks/php/docs/Api/AccountApi.md @@ -24,28 +24,28 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountCreateRequest(); -$data->setEmailAddress("newuser@dropboxsign.com"); +$account_create_request = (new Dropbox\Sign\Model\AccountCreateRequest()) + ->setEmailAddress("newuser@dropboxsign.com"); try { - $result = $accountApi->accountCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountCreate( + account_create_request: $account_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountCreate: {$e->getMessage()}"; } ``` @@ -87,25 +87,23 @@ Returns the properties and settings of your Account. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - try { - $result = $accountApi->accountGet(null, 'jack@example.com'); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountGet(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountGet: {$e->getMessage()}"; } ``` @@ -148,28 +146,29 @@ Updates the properties and settings of your Account. Currently only allows for u ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountUpdateRequest(); -$data->setCallbackUrl("https://www.example.com/callback"); +$account_update_request = (new Dropbox\Sign\Model\AccountUpdateRequest()) + ->setCallbackUrl("https://www.example.com/callback") + ->setLocale("en-US"); try { - $result = $accountApi->accountUpdate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountUpdate( + account_update_request: $account_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountUpdate: {$e->getMessage()}"; } ``` @@ -211,28 +210,28 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$accountApi = new Dropbox\Sign\Api\AccountApi($config); - -$data = new Dropbox\Sign\Model\AccountVerifyRequest(); -$data->setEmailAddress("some_user@dropboxsign.com"); +$account_verify_request = (new Dropbox\Sign\Model\AccountVerifyRequest()) + ->setEmailAddress("some_user@dropboxsign.com"); try { - $result = $accountApi->accountVerify($data); - print_r($result); + $response = (new Dropbox\Sign\Api\AccountApi(config: $config))->accountVerify( + account_verify_request: $account_verify_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling AccountApi#accountVerify: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/ApiAppApi.md b/sdks/php/docs/Api/ApiAppApi.md index a591601b2..eb5e933ca 100644 --- a/sdks/php/docs/Api/ApiAppApi.md +++ b/sdks/php/docs/Api/ApiAppApi.md @@ -25,45 +25,45 @@ Creates a new API App. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$oauth = new Dropbox\Sign\Model\SubOAuth(); -$oauth->setCallbackUrl("https://example.com/oauth") +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") ->setScopes([ Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, ]); -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") ->setPrimaryButtonTextColor("#ffffff"); -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppCreateRequest(); -$data->setName("My Production App") - ->setDomains(["example.com"]) +$api_app_create_request = (new Dropbox\Sign\Model\ApiAppCreateRequest()) + ->setName("My Production App") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) ->setOauth($oauth) - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); + ->setWhiteLabelingOptions($white_labeling_options); try { - $result = $apiAppApi->apiAppCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppCreate( + api_app_create_request: $api_app_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppCreate: {$e->getMessage()}"; } ``` @@ -105,26 +105,23 @@ Deletes an API App. Can only be invoked for apps you own. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - try { - $apiAppApi->apiAppDelete($clientId); + (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppDelete( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppDelete: {$e->getMessage()}"; } ``` @@ -166,27 +163,25 @@ Returns an object with information about an API App. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; - try { - $result = $apiAppApi->apiAppGet($clientId); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppGet( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppGet: {$e->getMessage()}"; } ``` @@ -228,28 +223,26 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); - -$page = 1; -$pageSize = 2; - try { - $result = $apiAppApi->apiAppList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppList: {$e->getMessage()}"; } ``` @@ -292,39 +285,47 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$apiAppApi = new Dropbox\Sign\Api\ApiAppApi($config); +$oauth = (new Dropbox\Sign\Model\SubOAuth()) + ->setCallbackUrl("https://example.com/oauth") + ->setScopes([ + Dropbox\Sign\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, + Dropbox\Sign\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, + ]); -$whiteLabelingOptions = new Dropbox\Sign\Model\SubWhiteLabelingOptions(); -$whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") +$white_labeling_options = (new Dropbox\Sign\Model\SubWhiteLabelingOptions()) + ->setPrimaryButtonColor("#00b3e6") ->setPrimaryButtonTextColor("#ffffff"); -$customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); - -$data = new Dropbox\Sign\Model\ApiAppUpdateRequest(); -$data->setName("New Name") - ->setCallbackUrl("http://example.com/dropboxsign") - ->setWhiteLabelingOptions($whiteLabelingOptions) - ->setCustomLogoFile($customLogoFile); - -$clientId = "0dd3b823a682527788c4e40cb7b6f7e9"; +$api_app_update_request = (new Dropbox\Sign\Model\ApiAppUpdateRequest()) + ->setCallbackUrl("https://example.com/dropboxsign") + ->setName("New Name") + ->setDomains([ + "example.com", + ]) + ->setCustomLogoFile(new SplFileObject("CustomLogoFile.png")) + ->setOauth($oauth) + ->setWhiteLabelingOptions($white_labeling_options); try { - $result = $apiAppApi->apiAppUpdate($clientId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\ApiAppApi(config: $config))->apiAppUpdate( + client_id: "0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request: $api_app_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ApiAppApi#apiAppUpdate: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/BulkSendJobApi.md b/sdks/php/docs/Api/BulkSendJobApi.md index ede4f3415..a58d6349b 100644 --- a/sdks/php/docs/Api/BulkSendJobApi.md +++ b/sdks/php/docs/Api/BulkSendJobApi.md @@ -22,27 +22,27 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$bulkSendJobId = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174"; - try { - $result = $bulkSendJobApi->bulkSendJobGet($bulkSendJobId); - print_r($result); + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobGet( + bulk_send_job_id: "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling BulkSendJobApi#bulkSendJobGet: {$e->getMessage()}"; } ``` @@ -86,28 +86,26 @@ Returns a list of BulkSendJob that you can access. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$bulkSendJobApi = new Dropbox\Sign\Api\BulkSendJobApi($config); - -$page = 1; -$pageSize = 20; - try { - $result = $bulkSendJobApi->bulkSendJobList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\BulkSendJobApi(config: $config))->bulkSendJobList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling BulkSendJobApi#bulkSendJobList: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/EmbeddedApi.md b/sdks/php/docs/Api/EmbeddedApi.md index 8b1acfbc4..c186d9420 100644 --- a/sdks/php/docs/Api/EmbeddedApi.md +++ b/sdks/php/docs/Api/EmbeddedApi.md @@ -22,31 +22,35 @@ Retrieves an embedded object containing a template url that can be opened in an ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); +$merge_fields = [ +]; -$data = new Dropbox\Sign\Model\EmbeddedEditUrlRequest(); -$data->setCcRoles([""]) - ->setMergeFields([]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; +$embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) + ->setCcRoles([ + "", + ]) + ->setMergeFields($merge_fields); try { - $result = $embeddedApi->embeddedEditUrl($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request: $embedded_edit_url_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$e->getMessage()}"; } ``` @@ -89,27 +93,25 @@ Retrieves an embedded object containing a signature url that can be opened in an ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$embeddedApi = new Dropbox\Sign\Api\EmbeddedApi($config); - -$signatureId = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b"; - try { - $result = $embeddedApi->embeddedSignUrl($signatureId); - print_r($result); + $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedSignUrl( + signature_id: "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling EmbeddedApi#embeddedSignUrl: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/FaxApi.md b/sdks/php/docs/Api/FaxApi.md index 8b68458c6..aeb7a3949 100644 --- a/sdks/php/docs/Api/FaxApi.md +++ b/sdks/php/docs/Api/FaxApi.md @@ -5,7 +5,7 @@ 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 | +| [**faxFiles()**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download 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 | @@ -18,28 +18,29 @@ faxDelete($fax_id) ``` Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $faxApi->faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + (new Dropbox\Sign\Api\FaxApi(config: $config))->faxDelete( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxDelete: {$e->getMessage()}"; } ``` @@ -72,33 +73,33 @@ void (empty response body) ```php faxFiles($fax_id): \SplFileObject ``` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxFiles($faxId); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxFiles( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxFiles: {$e->getMessage()}"; } ``` @@ -133,31 +134,31 @@ faxGet($fax_id): \Dropbox\Sign\Model\FaxGetResponse ``` Get Fax -Returns information about fax +Returns information about a Fax ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxGet($faxId); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxGet( + fax_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxGet: {$e->getMessage()}"; } ``` @@ -192,32 +193,32 @@ faxList($page, $page_size): \Dropbox\Sign\Model\FaxListResponse ``` Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +use SplFileObject; +use Dropbox; -$page = 1; -$pageSize = 2; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxApi->faxList($page, $pageSize); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxList: {$e->getMessage()}"; } ``` @@ -226,8 +227,8 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **page** | **int**| Page | [optional] [default to 1] | -| **page_size** | **int**| Page size | [optional] [default to 20] | +| **page** | **int**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] | +| **page_size** | **int**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | ### Return type @@ -253,39 +254,42 @@ faxSend($fax_send_request): \Dropbox\Sign\Model\FaxGetResponse ``` Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxApi = new Dropbox\Sign\Api\FaxApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxSendRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTestMode(true) +$fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) ->setRecipient("16690000001") ->setSender("16690000000") + ->setTestMode(true) ->setCoverPageTo("Jill Fax") - ->setCoverPageMessage("I'm sending you a fax!") ->setCoverPageFrom("Faxer Faxerson") - ->setTitle("This is what the fax is about!"); + ->setCoverPageMessage("I'm sending you a fax!") + ->setTitle("This is what the fax is about!") + ->setFiles([ + ]); try { - $result = $faxApi->faxSend($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( + fax_send_request: $fax_send_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/FaxLineApi.md b/sdks/php/docs/Api/FaxLineApi.md index 1bb340d36..123fd3c96 100644 --- a/sdks/php/docs/Api/FaxLineApi.md +++ b/sdks/php/docs/Api/FaxLineApi.md @@ -27,26 +27,28 @@ Grants a user access to the specified Fax Line. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineAddUserRequest(); -$data->setNumber("[FAX_NUMBER]") +$fax_line_add_user_request = (new Dropbox\Sign\Model\FaxLineAddUserRequest()) + ->setNumber("[FAX_NUMBER]") ->setEmailAddress("member@dropboxsign.com"); try { - $result = $faxLineApi->faxLineAddUser($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAddUser( + fax_line_add_user_request: $fax_line_add_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineAddUser: {$e->getMessage()}"; } ``` @@ -81,29 +83,31 @@ faxLineAreaCodeGet($country, $state, $province, $city): \Dropbox\Sign\Model\FaxL ``` Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineAreaCodeGet("US", "CA"); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( + country: "US", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; } ``` @@ -112,10 +116,10 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **country** | **string**| Filter area codes by country. | | -| **state** | **string**| Filter area codes by state. | [optional] | -| **province** | **string**| Filter area codes by province. | [optional] | -| **city** | **string**| Filter area codes by city. | [optional] | +| **country** | **string**| Filter area codes by country | | +| **state** | **string**| Filter area codes by state | [optional] | +| **province** | **string**| Filter area codes by province | [optional] | +| **city** | **string**| Filter area codes by city | [optional] | ### Return type @@ -141,33 +145,35 @@ faxLineCreate($fax_line_create_request): \Dropbox\Sign\Model\FaxLineResponse ``` Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineCreateRequest(); -$data->setAreaCode(209) - ->setCountry("US"); +$fax_line_create_request = (new Dropbox\Sign\Model\FaxLineCreateRequest()) + ->setAreaCode(209) + ->setCountry(Dropbox\Sign\Model\FaxLineCreateRequest::COUNTRY_US); try { - $result = $faxLineApi->faxLineCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineCreate( + fax_line_create_request: $fax_line_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineCreate: {$e->getMessage()}"; } ``` @@ -209,24 +215,25 @@ Deletes the specified Fax Line from the subscription. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineDeleteRequest(); -$data->setNumber("[FAX_NUMBER]"); +$fax_line_delete_request = (new Dropbox\Sign\Model\FaxLineDeleteRequest()) + ->setNumber("[FAX_NUMBER]"); try { - $faxLineApi->faxLineDelete($data); + (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineDelete( + fax_line_delete_request: $fax_line_delete_request, + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineDelete: {$e->getMessage()}"; } ``` @@ -268,22 +275,24 @@ Returns the properties and settings of a Fax Line. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineGet("[FAX_NUMBER]"); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineGet( + number: "123-123-1234", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineGet: {$e->getMessage()}"; } ``` @@ -292,7 +301,7 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **number** | **string**| The Fax Line number. | | +| **number** | **string**| The Fax Line number | | ### Return type @@ -325,22 +334,26 @@ Returns the properties and settings of multiple Fax Lines. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $result = $faxLineApi->faxLineList(); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineList( + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineList: {$e->getMessage()}"; } ``` @@ -350,9 +363,9 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Account ID | [optional] | -| **page** | **int**| Page | [optional] [default to 1] | -| **page_size** | **int**| Page size | [optional] [default to 20] | -| **show_team_lines** | **bool**| Show team lines | [optional] | +| **page** | **int**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] | +| **page_size** | **int**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] | +| **show_team_lines** | **bool**| Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -378,33 +391,35 @@ faxLineRemoveUser($fax_line_remove_user_request): \Dropbox\Sign\Model\FaxLineRes ``` Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\FaxLineRemoveUserRequest(); -$data->setNumber("[FAX_NUMBER]") +$fax_line_remove_user_request = (new Dropbox\Sign\Model\FaxLineRemoveUserRequest()) + ->setNumber("[FAX_NUMBER]") ->setEmailAddress("member@dropboxsign.com"); try { - $result = $faxLineApi->faxLineRemoveUser($data); - print_r($result); + $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineRemoveUser( + fax_line_remove_user_request: $fax_line_remove_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling FaxLineApi#faxLineRemoveUser: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/OAuthApi.md b/sdks/php/docs/Api/OAuthApi.md index 854b4b7a0..398664ffb 100644 --- a/sdks/php/docs/Api/OAuthApi.md +++ b/sdks/php/docs/Api/OAuthApi.md @@ -22,25 +22,30 @@ Once you have retrieved the code from the user callback, you will need to exchan ```php setState("900e06e2") - ->setCode("1b0d28d90c86c141") +use SplFileObject; +use Dropbox; + +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); + +$o_auth_token_generate_request = (new Dropbox\Sign\Model\OAuthTokenGenerateRequest()) ->setClientId("cc91c61d00f8bb2ece1428035716b") - ->setClientSecret("1d14434088507ffa390e6f5528465"); + ->setClientSecret("1d14434088507ffa390e6f5528465") + ->setCode("1b0d28d90c86c141") + ->setState("900e06e2") + ->setGrantType("authorization_code"); try { - $result = $oauthApi->oauthTokenGenerate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenGenerate( + o_auth_token_generate_request: $o_auth_token_generate_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling OAuthApi#oauthTokenGenerate: {$e->getMessage()}"; } ``` @@ -82,22 +87,27 @@ Access tokens are only valid for a given period of time (typically one hour) for ```php setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); + +$o_auth_token_refresh_request = (new Dropbox\Sign\Model\OAuthTokenRefreshRequest()) + ->setGrantType("refresh_token") + ->setRefreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); try { - $result = $oauthApi->oauthTokenRefresh($data); - print_r($result); + $response = (new Dropbox\Sign\Api\OAuthApi(config: $config))->oauthTokenRefresh( + o_auth_token_refresh_request: $o_auth_token_refresh_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling OAuthApi#oauthTokenRefresh: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/ReportApi.md b/sdks/php/docs/Api/ReportApi.md index 285a20e83..2609a12d9 100644 --- a/sdks/php/docs/Api/ReportApi.md +++ b/sdks/php/docs/Api/ReportApi.md @@ -21,17 +21,18 @@ Request the creation of one or more report(s). When the report(s) have been gen ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -$reportApi = new Dropbox\Sign\Api\ReportApi($config); +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); -$data = new Dropbox\Sign\Model\ReportCreateRequest(); -$data->setStartDate("09/01/2020") +$report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) + ->setStartDate("09/01/2020") ->setEndDate("09/01/2020") ->setReportType([ Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, @@ -39,12 +40,13 @@ $data->setStartDate("09/01/2020") ]); try { - $result = $reportApi->reportCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( + report_create_request: $report_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/SignatureRequestApi.md b/sdks/php/docs/Api/SignatureRequestApi.md index aa4979035..72acdccb9 100644 --- a/sdks/php/docs/Api/SignatureRequestApi.md +++ b/sdks/php/docs/Api/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to https://api.hellosign.com/v3. | [**signatureRequestCancel()**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**signatureRequestCreateEmbedded()**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**signatureRequestCreateEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**signatureRequestEdit()**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**signatureRequestEditEmbedded()**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**signatureRequestEditEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**signatureRequestEditWithTemplate()**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**signatureRequestFiles()**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**signatureRequestFilesAsDataUri()**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**signatureRequestFilesAsFileUrl()**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -36,63 +40,92 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```php setUsername("YOUR_API_KEY"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; + +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com") ->setPin("d79a3td"); -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); - -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$data = new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); -$data->setClientId("1a659d9ad95bccd307ecad78d72192f8") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkCreateEmbeddedWithTemplateRequest()) + ->setClientId("1a659d9ad95bccd307ecad78d72192f8") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); try { - $result = $signatureRequestApi->signatureRequestBulkCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkCreateEmbeddedWithTemplate( + signature_request_bulk_create_embedded_with_template_request: $signature_request_bulk_create_embedded_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate: {$e->getMessage()}"; } ``` @@ -134,65 +167,92 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signer_list_2_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("123 LLC"); + +$signer_list_2_custom_fields = [ + $signer_list_2_custom_fields_1, +]; -$signerList1Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList1Signer->setRole("Client") +$signer_list_2_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("Mary") + ->setEmailAddress("mary@example.com") + ->setPin("gd9as5b"); + +$signer_list_2_signers = [ + $signer_list_2_signers_1, +]; + +$signer_list_1_custom_fields_1 = (new Dropbox\Sign\Model\SubBulkSignerListCustomField()) + ->setName("company") + ->setValue("ABC Corp"); + +$signer_list_1_custom_fields = [ + $signer_list_1_custom_fields_1, +]; + +$signer_list_1_signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com") ->setPin("d79a3td"); -$signerList1CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList1CustomFields->setName("company") - ->setValue("ABC Corp"); - -$signerList1 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList1->setSigners([$signerList1Signer]) - ->setCustomFields([$signerList1CustomFields]); +$signer_list_1_signers = [ + $signer_list_1_signers_1, +]; -$signerList2Signer = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signerList2Signer->setRole("Client") - ->setName("Mary") - ->setEmailAddress("mary@example.com") - ->setPin("gd9as5b"); +$signer_list_1 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_1_custom_fields) + ->setSigners($signer_list_1_signers); -$signerList2CustomFields = new Dropbox\Sign\Model\SubBulkSignerListCustomField(); -$signerList2CustomFields->setName("company") - ->setValue("123 LLC"); +$signer_list_2 = (new Dropbox\Sign\Model\SubBulkSignerList()) + ->setCustomFields($signer_list_2_custom_fields) + ->setSigners($signer_list_2_signers); -$signerList2 = new Dropbox\Sign\Model\SubBulkSignerList(); -$signerList2->setSigners([$signerList2Signer]) - ->setCustomFields([$signerList2CustomFields]); +$signer_list = [ + $signer_list_1, + $signer_list_2, +]; -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$data = new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$ccs = [ + $ccs_1, +]; + +$signature_request_bulk_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestBulkSendWithTemplateRequest()) + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSignerList([$signerList1, $signerList2]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSignerList($signer_list) + ->setCcs($ccs); try { - $result = $signatureRequestApi->signatureRequestBulkSendWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestBulkSendWithTemplate( + signature_request_bulk_send_with_template_request: $signature_request_bulk_send_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate: {$e->getMessage()}"; } ``` @@ -234,26 +294,23 @@ Cancels an incomplete signature request. This action is **not reversible**. The ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - $signatureRequestApi->signatureRequestCancel($signatureRequestId); + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; } ``` @@ -295,56 +352,62 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") + ->setEmailAddress("jill@example.com") ->setOrder(1); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(true) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$signers = [ + $signers_1, + $signers_2, +]; -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTitle("NDA with Acme Co.") +$signature_request_create_embedded_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); try { - $result = $signatureRequestApi->signatureRequestCreateEmbedded($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbedded( + signature_request_create_embedded_request: $signature_request_create_embedded_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded: {$e->getMessage()}"; } ``` @@ -386,46 +449,455 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ```php setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$signature_request_create_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCreateEmbeddedWithTemplate( + signature_request_create_embedded_with_template_request: $signature_request_create_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_create_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest**](../Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers -// or, configure Bearer (JWT) authorization: oauth2 +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEdit()` + +```php +signatureRequestEdit($signature_request_id, $signature_request_edit_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_request = (new Dropbox\Sign\Model\SignatureRequestEditRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEdit( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request: $signature_request_edit_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEdit: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_request** | [**\Dropbox\Sign\Model\SignatureRequestEditRequest**](../Model/SignatureRequestEditRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbedded()` + +```php +signatureRequestEditEmbedded($signature_request_id, $signature_request_edit_embedded_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) ->setType(true) - ->setUpload(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jack") + ->setEmailAddress("jack@example.com") + ->setOrder(0); + +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) + ->setName("Jill") + ->setEmailAddress("jill@example.com") + ->setOrder(1); + +$signers = [ + $signers_1, + $signers_2, +]; + +$signature_request_edit_embedded_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") + ->setSubject("The NDA we talked about") + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([ + ]) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbedded( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request: $signature_request_edit_embedded_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbedded: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest**](../Model/SignatureRequestEditEmbeddedRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbeddedWithTemplate()` + +```php +signatureRequestEditEmbeddedWithTemplate($signature_request_id, $signature_request_edit_embedded_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; -$data = new Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) +$signature_request_edit_embedded_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTemplateIds([ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ]) + ->setMessage("Glad we could come to an agreement.") ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers); + +try { + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditEmbeddedWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request: $signature_request_edit_embedded_with_template_request, + ); + + print_r($response); +} catch (Dropbox\Sign\ApiException $e) { + echo "Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate: {$e->getMessage()}"; +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest**](../Model/SignatureRequestEditEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditWithTemplate()` + +```php +signatureRequestEditWithTemplate($signature_request_id, $signature_request_edit_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); + +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") + ->setEditor("Client") + ->setRequired(true) + ->setValue("\$20,000"); + +$custom_fields = [ + $custom_fields_1, +]; + +$signature_request_edit_with_template_request = (new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); try { - $result = $signatureRequestApi->signatureRequestCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestEditWithTemplate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request: $signature_request_edit_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate: {$e->getMessage()}"; } ``` @@ -434,7 +906,8 @@ try { |Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **signature_request_create_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestCreateEmbeddedWithTemplateRequest**](../Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest**](../Model/SignatureRequestEditWithTemplateRequest.md)| | | ### Return type @@ -467,28 +940,26 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; -$fileType = "pdf"; - try { - $result = $signatureRequestApi->signatureRequestFiles($signatureRequestId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFiles( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type: "pdf", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFiles: {$e->getMessage()}"; } ``` @@ -531,27 +1002,25 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestFilesAsDataUri($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsDataUri( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri: {$e->getMessage()}"; } ``` @@ -593,27 +1062,26 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestFilesAsFileUrl($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestFilesAsFileUrl( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download: 1, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl: {$e->getMessage()}"; } ``` @@ -656,27 +1124,25 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; - try { - $result = $signatureRequestApi->signatureRequestGet($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestGet( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestGet: {$e->getMessage()}"; } ``` @@ -718,28 +1184,26 @@ Returns a list of SignatureRequests that you can access. This includes Signature ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$accountId = null; -$page = 1; - try { - $result = $signatureRequestApi->signatureRequestList($accountId, $page); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestList: {$e->getMessage()}"; } ``` @@ -784,27 +1248,25 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; - try { - $result = $signatureRequestApi->signatureRequestReleaseHold($signatureRequestId); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestReleaseHold( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestReleaseHold: {$e->getMessage()}"; } ``` @@ -846,30 +1308,29 @@ Sends an email to the signer reminding them to sign the signature request. You c ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestRemindRequest(); -$data->setEmailAddress("john@example.com"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$signature_request_remind_request = (new Dropbox\Sign\Model\SignatureRequestRemindRequest()) + ->setEmailAddress("john@example.com"); try { - $result = $signatureRequestApi->signatureRequestRemind($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemind( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request: $signature_request_remind_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestRemind: {$e->getMessage()}"; } ``` @@ -912,23 +1373,22 @@ Removes your access to a completed signature request. This action is **not rever ```php setUsername("YOUR_API_KEY"); +require_once __DIR__ . '/../vendor/autoload.php'; -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +use SplFileObject; +use Dropbox; -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); try { - $signatureRequestApi->signatureRequestRemove($signatureRequestId); + (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestRemove( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestRemove: {$e->getMessage()}"; } ``` @@ -970,63 +1430,71 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer1->setEmailAddress("jack@example.com") +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); + +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); -$signer2->setEmailAddress("jill@example.com") +$signers_2 = (new Dropbox\Sign\Model\SubSignatureRequestSigner()) ->setName("Jill") + ->setEmailAddress("jill@example.com") ->setOrder(1); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); - -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); +$signers = [ + $signers_1, + $signers_2, +]; -$data = new Dropbox\Sign\Model\SignatureRequestSendRequest(); -$data->setTitle("NDA with Acme Co.") +$signature_request_send_request = (new Dropbox\Sign\Model\SignatureRequestSendRequest()) + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.") ->setSubject("The NDA we talked about") - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) + ->setTestMode(true) + ->setTitle("NDA with Acme Co.") ->setCcEmailAddresses([ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", + ->setFiles([ ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setMetadata(json_decode(<<<'EOD' + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD, true)) + ->setFieldOptions($field_options) + ->setSigningOptions($signing_options) + ->setSigners($signers); try { - $result = $signatureRequestApi->signatureRequestSend($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSend( + signature_request_send_request: $signature_request_send_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestSend: {$e->getMessage()}"; } ``` @@ -1068,57 +1536,71 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); +$signing_options = (new Dropbox\Sign\Model\SubSigningOptions()) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW) + ->setDraw(true) + ->setPhone(false) + ->setType(true) + ->setUpload(true); -$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); -$signer1->setRole("Client") - ->setEmailAddress("george@example.com") - ->setName("George"); +$signers_1 = (new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner()) + ->setRole("Client") + ->setName("George") + ->setEmailAddress("george@example.com"); -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") +$signers = [ + $signers_1, +]; + +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") ->setEmailAddress("accounting@example.com"); -$customField1 = new Dropbox\Sign\Model\SubCustomField(); -$customField1->setName("Cost") - ->setValue("$20,000") +$ccs = [ + $ccs_1, +]; + +$custom_fields_1 = (new Dropbox\Sign\Model\SubCustomField()) + ->setName("Cost") ->setEditor("Client") - ->setRequired(true); + ->setRequired(true) + ->setValue("\$20,000"); -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$custom_fields = [ + $custom_fields_1, +]; -$data = new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest(); -$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) - ->setSubject("Purchase Order") +$signature_request_send_with_template_request = (new Dropbox\Sign\Model\SignatureRequestSendWithTemplateRequest()) + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) ->setMessage("Glad we could come to an agreement.") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setCustomFields([$customField1]) - ->setSigningOptions($signingOptions) - ->setTestMode(true); + ->setSubject("Purchase Order") + ->setTestMode(true) + ->setSigningOptions($signing_options) + ->setSigners($signers) + ->setCcs($ccs) + ->setCustomFields($custom_fields); try { - $result = $signatureRequestApi->signatureRequestSendWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestSendWithTemplate( + signature_request_send_with_template_request: $signature_request_send_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate: {$e->getMessage()}"; } ``` @@ -1160,31 +1642,30 @@ Updates the email address and/or the name for a given signer on a signature requ ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); - -$data = new Dropbox\Sign\Model\SignatureRequestUpdateRequest(); -$data->setEmailAddress("john@example.com") - ->setSignatureId("78caf2a1d01cd39cea2bc1cbb340dac3"); - -$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; +$signature_request_update_request = (new Dropbox\Sign\Model\SignatureRequestUpdateRequest()) + ->setSignatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f") + ->setEmailAddress("john@example.com"); try { - $result = $signatureRequestApi->signatureRequestUpdate($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestUpdate( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request: $signature_request_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling SignatureRequestApi#signatureRequestUpdate: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/TeamApi.md b/sdks/php/docs/Api/TeamApi.md index 1f46c6b3f..059036e13 100644 --- a/sdks/php/docs/Api/TeamApi.md +++ b/sdks/php/docs/Api/TeamApi.md @@ -30,28 +30,29 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamAddMemberRequest(); -$data->setEmailAddress("george@example.com"); +$team_add_member_request = (new Dropbox\Sign\Model\TeamAddMemberRequest()) + ->setEmailAddress("george@example.com"); try { - $result = $teamApi->teamAddMember($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamAddMember( + team_add_member_request: $team_add_member_request, + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamAddMember: {$e->getMessage()}"; } ``` @@ -94,28 +95,28 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamCreateRequest(); -$data->setName("New Team Name"); +$team_create_request = (new Dropbox\Sign\Model\TeamCreateRequest()) + ->setName("New Team Name"); try { - $result = $teamApi->teamCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamCreate( + team_create_request: $team_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamCreate: {$e->getMessage()}"; } ``` @@ -157,24 +158,21 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $teamApi->teamDelete(); + (new Dropbox\Sign\Api\TeamApi(config: $config))->teamDelete(); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamDelete: {$e->getMessage()}"; } ``` @@ -214,25 +212,23 @@ Returns information about your Team as well as a list of its members. If you do ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $result = $teamApi->teamGet(); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamGet(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamGet: {$e->getMessage()}"; } ``` @@ -272,25 +268,25 @@ Provides information about a team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - try { - $result = $teamApi->teamInfo(); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInfo( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamInfo: {$e->getMessage()}"; } ``` @@ -332,27 +328,23 @@ Provides a list of team invites (and their roles). ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$emailAddress = "user@dropboxsign.com"; - try { - $result = $teamApi->teamInvites($emailAddress); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamInvites(); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamInvites: {$e->getMessage()}"; } ``` @@ -394,27 +386,27 @@ Provides a paginated list of members (and their roles) that belong to a given te ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - try { - $result = $teamApi->teamMembers($teamId); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamMembers( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamMembers: {$e->getMessage()}"; } ``` @@ -458,29 +450,29 @@ Removes the provided user Account from your Team. If the Account had an outstand ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamRemoveMemberRequest(); -$data->setEmailAddress("teammate@dropboxsign.com") +$team_remove_member_request = (new Dropbox\Sign\Model\TeamRemoveMemberRequest()) + ->setEmailAddress("teammate@dropboxsign.com") ->setNewOwnerEmailAddress("new_teammate@dropboxsign.com"); try { - $result = $teamApi->teamRemoveMember($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamRemoveMember( + team_remove_member_request: $team_remove_member_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamRemoveMember: {$e->getMessage()}"; } ``` @@ -522,27 +514,27 @@ Provides a paginated list of sub teams that belong to a given team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$teamId = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c"; - try { - $result = $teamApi->teamSubTeams($teamId); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamSubTeams( + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamSubTeams: {$e->getMessage()}"; } ``` @@ -586,28 +578,28 @@ Updates the name of your Team. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$teamApi = new Dropbox\Sign\Api\TeamApi($config); - -$data = new Dropbox\Sign\Model\TeamUpdateRequest(); -$data->setName("New Team Name"); +$team_update_request = (new Dropbox\Sign\Model\TeamUpdateRequest()) + ->setName("New Team Name"); try { - $result = $teamApi->teamUpdate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TeamApi(config: $config))->teamUpdate( + team_update_request: $team_update_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TeamApi#teamUpdate: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/TemplateApi.md b/sdks/php/docs/Api/TemplateApi.md index 5381a8290..23d1d5a98 100644 --- a/sdks/php/docs/Api/TemplateApi.md +++ b/sdks/php/docs/Api/TemplateApi.md @@ -31,30 +31,29 @@ Gives the specified Account access to the specified Template. The specified Acco ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateAddUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; +$template_add_user_request = (new Dropbox\Sign\Model\TemplateAddUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); try { - $result = $templateApi->templateAddUser($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateAddUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request: $template_add_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateAddUser: {$e->getMessage()}"; } ``` @@ -97,56 +96,103 @@ Creates a template that can then be used. ```php setUsername('YOUR_API_KEY'); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName('Client') +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") ->setOrder(0); -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName('Witness') +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") ->setOrder(1); -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName('Full Name') +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$form_fields_per_document_1 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentText()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_1") + ->setType("text") + ->setRequired(true) + ->setSigner("1") + ->setWidth(100) + ->setHeight(16) + ->setX(112) + ->setY(328) + ->setName("") + ->setPage(1) + ->setPlaceholder("") + ->setValidationType(Dropbox\Sign\Model\SubFormFieldsPerDocumentText::VALIDATION_TYPE_NUMBERS_ONLY); + +$form_fields_per_document_2 = (new Dropbox\Sign\Model\SubFormFieldsPerDocumentSignature()) + ->setDocumentIndex(0) + ->setApiId("uniqueIdHere_2") + ->setType("signature") + ->setRequired(true) + ->setSigner("0") + ->setWidth(120) + ->setHeight(30) + ->setX(530) + ->setY(415) + ->setName("") + ->setPage(1); + +$form_fields_per_document = [ + $form_fields_per_document_1, + $form_fields_per_document_2, +]; + +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName('Is Registered?') +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\TemplateCreateRequest(); -$data->setClientId('37dee8d8440c66d54cfa05d92c160882') - ->setFiles([new SplFileObject(__DIR__ . '/example_signature_request.pdf')]) - ->setTitle('Test Template') - ->setSubject('Please sign this document') - ->setMessage('For your approval') - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(['Manager']) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; + +$template_create_request = (new Dropbox\Sign\Model\TemplateCreateRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") + ->setMessage("For your approval") + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setSignerRoles($signer_roles) + ->setFormFieldsPerDocument($form_fields_per_document) + ->setMergeFields($merge_fields); try { - $result = $templateApi->templateCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreate( + template_create_request: $template_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo 'Exception when calling Dropbox Sign API: ' - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateCreate: {$e->getMessage()}"; } ``` @@ -188,56 +234,69 @@ The first step in an embedded template workflow. Creates a draft template that c ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$role1 = new Dropbox\Sign\Model\SubTemplateRole(); -$role1->setName("Client") - ->setOrder(0); - -$role2 = new Dropbox\Sign\Model\SubTemplateRole(); -$role2->setName("Witness") - ->setOrder(1); +$field_options = (new Dropbox\Sign\Model\SubFieldOptions()) + ->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); -$mergeField1 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField1->setName("Full Name") +$merge_fields_1 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Full Name") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_TEXT); -$mergeField2 = new Dropbox\Sign\Model\SubMergeField(); -$mergeField2->setName("Is Registered?") +$merge_fields_2 = (new Dropbox\Sign\Model\SubMergeField()) + ->setName("Is Registered?") ->setType(Dropbox\Sign\Model\SubMergeField::TYPE_CHECKBOX); -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); +$merge_fields = [ + $merge_fields_1, + $merge_fields_2, +]; -$data = new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest(); -$data->setClientId("37dee8d8440c66d54cfa05d92c160882") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setTitle("Test Template") - ->setSubject("Please sign this document") +$signer_roles_1 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Client") + ->setOrder(0); + +$signer_roles_2 = (new Dropbox\Sign\Model\SubTemplateRole()) + ->setName("Witness") + ->setOrder(1); + +$signer_roles = [ + $signer_roles_1, + $signer_roles_2, +]; + +$template_create_embedded_draft_request = (new Dropbox\Sign\Model\TemplateCreateEmbeddedDraftRequest()) + ->setClientId("37dee8d8440c66d54cfa05d92c160882") ->setMessage("For your approval") - ->setSignerRoles([$role1, $role2]) - ->setCcRoles(["Manager"]) - ->setMergeFields([$mergeField1, $mergeField2]) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setSubject("Please sign this document") + ->setTestMode(true) + ->setTitle("Test Template") + ->setCcRoles([ + "Manager", + ]) + ->setFiles([ + ]) + ->setFieldOptions($field_options) + ->setMergeFields($merge_fields) + ->setSignerRoles($signer_roles); try { - $result = $templateApi->templateCreateEmbeddedDraft($data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateCreateEmbeddedDraft( + template_create_embedded_draft_request: $template_create_embedded_draft_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateCreateEmbeddedDraft: {$e->getMessage()}"; } ``` @@ -279,26 +338,23 @@ Completely deletes the template specified from the account. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $templateApi->templateDelete($templateId); + (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateDelete( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateDelete: {$e->getMessage()}"; } ``` @@ -340,28 +396,25 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; -$fileType = "pdf"; - try { - $result = $templateApi->templateFiles($templateId, $fileType); - copy($result->getRealPath(), __DIR__ . '/file_response.pdf'); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + copy($response->getRealPath(), __DIR__ . '/file_response'); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFiles: {$e->getMessage()}"; } ``` @@ -404,27 +457,25 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $result = $templateApi->templateFilesAsDataUri($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$e->getMessage()}"; } ``` @@ -466,27 +517,26 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; - try { - $result = $templateApi->templateFilesAsFileUrl($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsFileUrl( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + force_download: 1, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateFilesAsFileUrl: {$e->getMessage()}"; } ``` @@ -529,27 +579,25 @@ Returns the Template specified by the `template_id` parameter. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$templateId = "f57db65d3f933b5316d398057a36176831451a35"; - try { - $result = $templateApi->templateGet($templateId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; } ``` @@ -591,27 +639,26 @@ Returns a list of the Templates that are accessible by you. Take a look at our ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$accountId = "f57db65d3f933b5316d398057a36176831451a35"; - try { - $result = $templateApi->templateList($accountId); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateList( + page: 1, + page_size: 20, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateList: {$e->getMessage()}"; } ``` @@ -656,30 +703,29 @@ Removes the specified Account's access to the specified Template. ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateRemoveUserRequest(); -$data->setEmailAddress("george@dropboxsign.com"); - -$templateId = "21f920ec2b7f4b6bb64d3ed79f26303843046536"; +$template_remove_user_request = (new Dropbox\Sign\Model\TemplateRemoveUserRequest()) + ->setEmailAddress("george@dropboxsign.com"); try { - $result = $templateApi->templateRemoveUser($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateRemoveUser( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request: $template_remove_user_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateRemoveUser: {$e->getMessage()}"; } ``` @@ -722,30 +768,30 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$templateApi = new Dropbox\Sign\Api\TemplateApi($config); - -$data = new Dropbox\Sign\Model\TemplateUpdateFilesRequest(); -$data->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]); - -$templateId = "5de8179668f2033afac48da1868d0093bf133266"; +$template_update_files_request = (new Dropbox\Sign\Model\TemplateUpdateFilesRequest()) + ->setFiles([ + ]); try { - $result = $templateApi->templateUpdateFiles($templateId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdateFiles( + template_id: "f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request: $template_update_files_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling TemplateApi#templateUpdateFiles: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Api/UnclaimedDraftApi.md b/sdks/php/docs/Api/UnclaimedDraftApi.md index a2b2f4236..caf17af70 100644 --- a/sdks/php/docs/Api/UnclaimedDraftApi.md +++ b/sdks/php/docs/Api/UnclaimedDraftApi.md @@ -24,63 +24,41 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer1->setEmailAddress("jack@example.com") +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftSigner()) ->setName("Jack") + ->setEmailAddress("jack@example.com") ->setOrder(0); -$signer2 = new Dropbox\Sign\Model\SubUnclaimedDraftSigner(); -$signer2->setEmailAddress("jill@example.com") - ->setName("Jill") - ->setOrder(1); - -$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); -$signingOptions->setDraw(true) - ->setType(true) - ->setUpload(true) - ->setPhone(false) - ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); +$signers = [ + $signers_1, +]; -$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); -$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateRequest(); -$data->setSubject("The NDA we talked about") +$unclaimed_draft_create_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateRequest()) ->setType(Dropbox\Sign\Model\UnclaimedDraftCreateRequest::TYPE_REQUEST_SIGNATURE) - ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") - ->setSigners([$signer1, $signer2]) - ->setCcEmailAddresses([ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ]) - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) - ->setMetadata([ - "custom_id" => 1234, - "custom_text" => "NDA #9", + ->setTestMode(true) + ->setFiles([ ]) - ->setSigningOptions($signingOptions) - ->setFieldOptions($fieldOptions) - ->setTestMode(true); + ->setSigners($signers); try { - $result = $unclaimedDraftApi->unclaimedDraftCreate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreate( + unclaimed_draft_create_request: $unclaimed_draft_create_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreate: {$e->getMessage()}"; } ``` @@ -122,31 +100,32 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) +$unclaimed_draft_create_embedded_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setTestMode(true); + ->setTestMode(true) + ->setFiles([ + ]); try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbedded($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbedded( + unclaimed_draft_create_embedded_request: $unclaimed_draft_create_embedded_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded: {$e->getMessage()}"; } ``` @@ -188,42 +167,52 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); +$ccs_1 = (new Dropbox\Sign\Model\SubCC()) + ->setRole("Accounting") + ->setEmailAddress("accounting@dropboxsign.com"); + +$ccs = [ + $ccs_1, +]; -$signer1 = new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner(); -$signer1->setRole("Client") +$signers_1 = (new Dropbox\Sign\Model\SubUnclaimedDraftTemplateSigner()) + ->setRole("Client") ->setName("George") ->setEmailAddress("george@example.com"); -$cc1 = new Dropbox\Sign\Model\SubCC(); -$cc1->setRole("Accounting") - ->setEmailAddress("accounting@dropboxsign.com"); +$signers = [ + $signers_1, +]; -$data = new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTemplateIds(["61a832ff0d8423f91d503e76bfbcc750f7417c78"]) +$unclaimed_draft_create_embedded_with_template_request = (new Dropbox\Sign\Model\UnclaimedDraftCreateEmbeddedWithTemplateRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") ->setRequesterEmailAddress("jack@dropboxsign.com") - ->setSigners([$signer1]) - ->setCcs([$cc1]) - ->setTestMode(true); + ->setTemplateIds([ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ]) + ->setTestMode(false) + ->setCcs($ccs) + ->setSigners($signers); try { - $result = $unclaimedDraftApi->unclaimedDraftCreateEmbeddedWithTemplate($data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftCreateEmbeddedWithTemplate( + unclaimed_draft_create_embedded_with_template_request: $unclaimed_draft_create_embedded_with_template_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate: {$e->getMessage()}"; } ``` @@ -265,31 +254,30 @@ Creates a new signature request from an embedded request that can be edited prio ```php setUsername("YOUR_API_KEY"); +use SplFileObject; +use Dropbox; -// or, configure Bearer (JWT) authorization: oauth2 +$config = Dropbox\Sign\Configuration::getDefaultConfiguration(); +$config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); -$unclaimedDraftApi = new Dropbox\Sign\Api\UnclaimedDraftApi($config); - -$data = new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest(); -$data->setClientId("ec64a202072370a737edf4a0eb7f4437") - ->setTestMode(true); - -$signatureRequestId = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f"; +$unclaimed_draft_edit_and_resend_request = (new Dropbox\Sign\Model\UnclaimedDraftEditAndResendRequest()) + ->setClientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a") + ->setTestMode(false); try { - $result = $unclaimedDraftApi->unclaimedDraftEditAndResend($signatureRequestId, $data); - print_r($result); + $response = (new Dropbox\Sign\Api\UnclaimedDraftApi(config: $config))->unclaimedDraftEditAndResend( + signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request: $unclaimed_draft_edit_and_resend_request, + ); + + print_r($response); } catch (Dropbox\Sign\ApiException $e) { - $error = $e->getResponseObject(); - echo "Exception when calling Dropbox Sign API: " - . print_r($error->getError()); + echo "Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend: {$e->getMessage()}"; } ``` diff --git a/sdks/php/docs/Model/FaxLineAddUserRequest.md b/sdks/php/docs/Model/FaxLineAddUserRequest.md index aef875b22..966ac619f 100644 --- a/sdks/php/docs/Model/FaxLineAddUserRequest.md +++ b/sdks/php/docs/Model/FaxLineAddUserRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | | `account_id` | ```string``` | Account ID | | | `email_address` | ```string``` | Email address | | diff --git a/sdks/php/docs/Model/FaxLineCreateRequest.md b/sdks/php/docs/Model/FaxLineCreateRequest.md index 6b599a339..3483d66d8 100644 --- a/sdks/php/docs/Model/FaxLineCreateRequest.md +++ b/sdks/php/docs/Model/FaxLineCreateRequest.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_code`*_required_ | ```int``` | Area code | | -| `country`*_required_ | ```string``` | Country | | -| `city` | ```string``` | City | | -| `account_id` | ```string``` | Account ID | | +| `area_code`*_required_ | ```int``` | Area code of the new Fax Line | | +| `country`*_required_ | ```string``` | Country of the area code | | +| `city` | ```string``` | City of the area code | | +| `account_id` | ```string``` | Account ID of the account that will be assigned this new Fax Line | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/FaxLineDeleteRequest.md b/sdks/php/docs/Model/FaxLineDeleteRequest.md index a2112ed33..fed4ee118 100644 --- a/sdks/php/docs/Model/FaxLineDeleteRequest.md +++ b/sdks/php/docs/Model/FaxLineDeleteRequest.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | +| `number`*_required_ | ```string``` | The Fax Line number | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/FaxLineRemoveUserRequest.md b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md index 6def01071..d5b79cefa 100644 --- a/sdks/php/docs/Model/FaxLineRemoveUserRequest.md +++ b/sdks/php/docs/Model/FaxLineRemoveUserRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```string``` | The Fax Line number. | | -| `account_id` | ```string``` | Account ID | | -| `email_address` | ```string``` | Email address | | +| `number`*_required_ | ```string``` | The Fax Line number | | +| `account_id` | ```string``` | Account ID of the user to remove access | | +| `email_address` | ```string``` | Email address of the user to remove access | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/FaxSendRequest.md b/sdks/php/docs/Model/FaxSendRequest.md index dcbf730c4..432fd5ef6 100644 --- a/sdks/php/docs/Model/FaxSendRequest.md +++ b/sdks/php/docs/Model/FaxSendRequest.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `recipient`*_required_ | ```string``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```string``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```string``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```\SplFileObject[]``` | Fax File to Send | | -| `file_urls` | ```string[]``` | Fax File URL to Send | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `test_mode` | ```bool``` | API Test Mode Setting | [default to false] | -| `cover_page_to` | ```string``` | Fax Cover Page for Recipient | | -| `cover_page_from` | ```string``` | Fax Cover Page for Sender | | +| `cover_page_to` | ```string``` | Fax cover page recipient information | | +| `cover_page_from` | ```string``` | Fax cover page sender information | | | `cover_page_message` | ```string``` | Fax Cover Page Message | | | `title` | ```string``` | Fax Title | | diff --git a/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md b/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..b2567ac3f --- /dev/null +++ b/sdks/php/docs/Model/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,34 @@ +# # SignatureRequestEditEmbeddedRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to false] | +| `attachments` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\SubFormFieldGroup[]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..3b9df4cac --- /dev/null +++ b/sdks/php/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,25 @@ +# # SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/SignatureRequestEditRequest.md b/sdks/php/docs/Model/SignatureRequestEditRequest.md new file mode 100644 index 000000000..0d3ca23ce --- /dev/null +++ b/sdks/php/docs/Model/SignatureRequestEditRequest.md @@ -0,0 +1,35 @@ +# # SignatureRequestEditRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [default to false] | +| `attachments` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `client_id` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\SubFormFieldGroup[]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md b/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..072fdc080 --- /dev/null +++ b/sdks/php/docs/Model/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,26 @@ +# # SignatureRequestEditWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```string``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/openapi-config.yaml b/sdks/php/openapi-config.yaml index 75c7f3f57..f761f58f7 100644 --- a/sdks/php/openapi-config.yaml +++ b/sdks/php/openapi-config.yaml @@ -2,7 +2,7 @@ generatorName: php additionalProperties: packageName: dropbox/sign packageVersion: "^1.8.0" - artifactVersion: 1.8-dev + artifactVersion: 1.8.1-dev invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src @@ -15,6 +15,12 @@ additionalProperties: developerOrganizationEmail: "apisupport@hellosign.com" useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.composerPackageName: dropbox/sign-sandbox + oseg.namespace: Dropbox\SignSandbox + oseg.autoloadLocation: "__DIR__ . '/../vendor/autoload.php'" + oseg.ignoreOptionalUnset: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-EventCallbackHelper.mustache: templateType: SupportingFiles diff --git a/sdks/php/run-build b/sdks/php/run-build index ec27ffff1..e1012e02f 100755 --- a/sdks/php/run-build +++ b/sdks/php/run-build @@ -19,7 +19,7 @@ rm -f "${DIR}/src/Model/"*.php docker run --rm \ -v "${DIR}/:/local" \ -v "${DIR}/openapi-sdk.yaml:/local/openapi-sdk.yaml" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ @@ -48,6 +48,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php-8" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/php/src/Api/AccountApi.php b/sdks/php/src/Api/AccountApi.php index cfdc96f11..700b22166 100644 --- a/sdks/php/src/Api/AccountApi.php +++ b/sdks/php/src/Api/AccountApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -88,9 +88,9 @@ class AccountApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -194,19 +194,6 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -246,6 +233,19 @@ public function accountCreateWithHttpInfo(Model\AccountCreateRequest $account_cr ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -481,14 +481,14 @@ public function accountCreateRequest(Model\AccountCreateRequest $account_create_ * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) * * @return Model\AccountGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function accountGet(string $account_id = null, string $email_address = null) + public function accountGet(?string $account_id = null, ?string $email_address = null) { list($response) = $this->accountGetWithHttpInfo($account_id, $email_address); return $response; @@ -499,16 +499,16 @@ public function accountGet(string $account_id = null, string $email_address = nu * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return array of Model\AccountGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetWithHttpInfo(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetWithHttpInfo(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $request = $this->accountGetRequest($account_id, $email_address, $contentType); @@ -535,19 +535,6 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -587,6 +574,19 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -637,15 +637,15 @@ public function accountGetWithHttpInfo(string $account_id = null, string $email_ * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetAsync(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetAsync(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { return $this->accountGetAsyncWithHttpInfo($account_id, $email_address, $contentType) ->then( @@ -660,15 +660,15 @@ function ($response) { * * Get Account * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetAsyncWithHttpInfo(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetAsyncWithHttpInfo(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; $request = $this->accountGetRequest($account_id, $email_address, $contentType); @@ -712,15 +712,15 @@ function ($exception) { /** * Create request for operation 'accountGet' * - * @param string $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) - * @param string $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation + * @param string|null $account_id `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. (optional) + * @param string|null $email_address `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['accountGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::accountGet. This method will eventually become unavailable */ - public function accountGetRequest(string $account_id = null, string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) + public function accountGetRequest(?string $account_id = null, ?string $email_address = null, string $contentType = self::contentTypes['accountGet'][0]) { $resourcePath = '/account'; $formParams = []; @@ -873,19 +873,6 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -925,6 +912,19 @@ public function accountUpdateWithHttpInfo(Model\AccountUpdateRequest $account_up ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1212,19 +1212,6 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1264,6 +1251,19 @@ public function accountVerifyWithHttpInfo(Model\AccountVerifyRequest $account_ve ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\AccountVerifyResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/ApiAppApi.php b/sdks/php/src/Api/ApiAppApi.php index 07dd3db63..95b80a91a 100644 --- a/sdks/php/src/Api/ApiAppApi.php +++ b/sdks/php/src/Api/ApiAppApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -93,9 +93,9 @@ class ApiAppApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -199,19 +199,6 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -251,6 +238,19 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -536,19 +536,6 @@ public function apiAppDeleteWithHttpInfo(string $client_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -782,19 +769,6 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -834,6 +808,19 @@ public function apiAppGetWithHttpInfo(string $client_id, string $contentType = s ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1062,14 +1049,14 @@ public function apiAppGetRequest(string $client_id, string $contentType = self:: * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\ApiAppListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function apiAppList(int $page = 1, int $page_size = 20) + public function apiAppList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->apiAppListWithHttpInfo($page, $page_size); return $response; @@ -1080,16 +1067,16 @@ public function apiAppList(int $page = 1, int $page_size = 20) * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return array of Model\ApiAppListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $request = $this->apiAppListRequest($page, $page_size, $contentType); @@ -1116,19 +1103,6 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1168,6 +1142,19 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1218,15 +1205,15 @@ public function apiAppListWithHttpInfo(int $page = 1, int $page_size = 20, strin * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { return $this->apiAppListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -1241,15 +1228,15 @@ function ($response) { * * List API Apps * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $returnType = '\Dropbox\Sign\Model\ApiAppListResponse'; $request = $this->apiAppListRequest($page, $page_size, $contentType); @@ -1293,15 +1280,15 @@ function ($exception) { /** * Create request for operation 'apiAppList' * - * @param int $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation + * @param int|null $page Which page number of the API App List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAppList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::apiAppList. This method will eventually become unavailable */ - public function apiAppListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) + public function apiAppListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['apiAppList'][0]) { $resourcePath = '/api_app/list'; $formParams = []; @@ -1456,19 +1443,6 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1508,6 +1482,19 @@ public function apiAppUpdateWithHttpInfo(string $client_id, Model\ApiAppUpdateRe ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ApiAppGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/BulkSendJobApi.php b/sdks/php/src/Api/BulkSendJobApi.php index 77ad055c7..3c6bb7e79 100644 --- a/sdks/php/src/Api/BulkSendJobApi.php +++ b/sdks/php/src/Api/BulkSendJobApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class BulkSendJobApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -136,15 +136,15 @@ public function getResponse() * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * * @return Model\BulkSendJobGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function bulkSendJobGet(string $bulk_send_job_id, int $page = 1, int $page_size = 20) + public function bulkSendJobGet(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->bulkSendJobGetWithHttpInfo($bulk_send_job_id, $page, $page_size); return $response; @@ -155,17 +155,17 @@ public function bulkSendJobGet(string $bulk_send_job_id, int $page = 1, int $pag * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return array of Model\BulkSendJobGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { $request = $this->bulkSendJobGetRequest($bulk_send_job_id, $page, $page_size, $contentType); @@ -192,19 +192,6 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -244,6 +231,19 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -294,16 +294,16 @@ public function bulkSendJobGetWithHttpInfo(string $bulk_send_job_id, int $page = * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetAsync(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetAsync(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { return $this->bulkSendJobGetAsyncWithHttpInfo($bulk_send_job_id, $page, $page_size, $contentType) ->then( @@ -318,16 +318,16 @@ function ($response) { * * Get Bulk Send Job * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetAsyncWithHttpInfo(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetAsyncWithHttpInfo(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { $returnType = '\Dropbox\Sign\Model\BulkSendJobGetResponse'; $request = $this->bulkSendJobGetRequest($bulk_send_job_id, $page, $page_size, $contentType); @@ -371,16 +371,16 @@ function ($exception) { /** * Create request for operation 'bulkSendJobGet' * - * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) - * @param int $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation + * @param string $bulk_send_job_id The id of the BulkSendJob to retrieve. (required) + * @param int|null $page Which page number of the BulkSendJob list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobGet. This method will eventually become unavailable */ - public function bulkSendJobGetRequest(string $bulk_send_job_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) + public function bulkSendJobGetRequest(string $bulk_send_job_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobGet'][0]) { // verify the required parameter 'bulk_send_job_id' is set if ($bulk_send_job_id === null || (is_array($bulk_send_job_id) && count($bulk_send_job_id) === 0)) { @@ -497,14 +497,14 @@ public function bulkSendJobGetRequest(string $bulk_send_job_id, int $page = 1, i * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) * * @return Model\BulkSendJobListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function bulkSendJobList(int $page = 1, int $page_size = 20) + public function bulkSendJobList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->bulkSendJobListWithHttpInfo($page, $page_size); return $response; @@ -515,16 +515,16 @@ public function bulkSendJobList(int $page = 1, int $page_size = 20) * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return array of Model\BulkSendJobListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $request = $this->bulkSendJobListRequest($page, $page_size, $contentType); @@ -551,19 +551,6 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -603,6 +590,19 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -653,15 +653,15 @@ public function bulkSendJobListWithHttpInfo(int $page = 1, int $page_size = 20, * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { return $this->bulkSendJobListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -676,15 +676,15 @@ function ($response) { * * List Bulk Send Jobs * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $returnType = '\Dropbox\Sign\Model\BulkSendJobListResponse'; $request = $this->bulkSendJobListRequest($page, $page_size, $contentType); @@ -728,15 +728,15 @@ function ($exception) { /** * Create request for operation 'bulkSendJobList' * - * @param int $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation + * @param int|null $page Which page number of the BulkSendJob List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkSendJobList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::bulkSendJobList. This method will eventually become unavailable */ - public function bulkSendJobListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) + public function bulkSendJobListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['bulkSendJobList'][0]) { $resourcePath = '/bulk_send_job/list'; $formParams = []; diff --git a/sdks/php/src/Api/EmbeddedApi.php b/sdks/php/src/Api/EmbeddedApi.php index 364e5f7e7..382228786 100644 --- a/sdks/php/src/Api/EmbeddedApi.php +++ b/sdks/php/src/Api/EmbeddedApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class EmbeddedApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -190,19 +190,6 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -242,6 +229,19 @@ public function embeddedEditUrlWithHttpInfo(string $template_id, Model\EmbeddedE ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\EmbeddedEditUrlResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -548,19 +548,6 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -600,6 +587,19 @@ public function embeddedSignUrlWithHttpInfo(string $signature_id, string $conten ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\EmbeddedSignUrlResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/FaxApi.php b/sdks/php/src/Api/FaxApi.php index 0ae0cf38d..ec43e8a7f 100644 --- a/sdks/php/src/Api/FaxApi.php +++ b/sdks/php/src/Api/FaxApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -93,9 +93,9 @@ class FaxApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -197,19 +197,6 @@ public function faxDeleteWithHttpInfo(string $fax_id, string $contentType = self $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -385,7 +372,7 @@ public function faxDeleteRequest(string $fax_id, string $contentType = self::con /** * Operation faxFiles * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @@ -402,7 +389,7 @@ public function faxFiles(string $fax_id) /** * Operation faxFilesWithHttpInfo * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -439,19 +426,6 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -491,6 +465,19 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -539,7 +526,7 @@ public function faxFilesWithHttpInfo(string $fax_id, string $contentType = self: /** * Operation faxFilesAsync * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -561,7 +548,7 @@ function ($response) { /** * Operation faxFilesAsyncWithHttpInfo * - * List Fax Files + * Download Fax Files * * @param string $fax_id Fax ID (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxFiles'] to see the possible values for this operation @@ -767,19 +754,6 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -819,6 +793,19 @@ public function faxGetWithHttpInfo(string $fax_id, string $contentType = self::c ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1043,14 +1030,14 @@ public function faxGetRequest(string $fax_id, string $contentType = self::conten * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\FaxListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxList(int $page = 1, int $page_size = 20) + public function faxList(?int $page = 1, ?int $page_size = 20) { list($response) = $this->faxListWithHttpInfo($page, $page_size); return $response; @@ -1061,16 +1048,16 @@ public function faxList(int $page = 1, int $page_size = 20) * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return array of Model\FaxListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { $request = $this->faxListRequest($page, $page_size, $contentType); @@ -1097,19 +1084,6 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1149,6 +1123,19 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1199,15 +1186,15 @@ public function faxListWithHttpInfo(int $page = 1, int $page_size = 20, string $ * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListAsync(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListAsync(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { return $this->faxListAsyncWithHttpInfo($page, $page_size, $contentType) ->then( @@ -1222,15 +1209,15 @@ function ($response) { * * Lists Faxes * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListAsyncWithHttpInfo(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListAsyncWithHttpInfo(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { $returnType = '\Dropbox\Sign\Model\FaxListResponse'; $request = $this->faxListRequest($page, $page_size, $contentType); @@ -1274,15 +1261,15 @@ function ($exception) { /** * Create request for operation 'faxList' * - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation + * @param int|null $page Which page number of the Fax List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxList. This method will eventually become unavailable */ - public function faxListRequest(int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) + public function faxListRequest(?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['faxList'][0]) { if ($page !== null && $page < 1) { throw new InvalidArgumentException('invalid value for "$page" when calling FaxApi.faxList, must be bigger than or equal to 1.'); @@ -1442,19 +1429,6 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1494,6 +1468,19 @@ public function faxSendWithHttpInfo(Model\FaxSendRequest $fax_send_request, stri ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/FaxLineApi.php b/sdks/php/src/Api/FaxLineApi.php index 65cefff54..94a5e6e4a 100644 --- a/sdks/php/src/Api/FaxLineApi.php +++ b/sdks/php/src/Api/FaxLineApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -97,9 +97,9 @@ class FaxLineApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -203,19 +203,6 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -255,6 +242,19 @@ public function faxLineAddUserWithHttpInfo(Model\FaxLineAddUserRequest $fax_line ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -486,16 +486,16 @@ public function faxLineAddUserRequest(Model\FaxLineAddUserRequest $fax_line_add_ * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) * * @return Model\FaxLineAreaCodeGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxLineAreaCodeGet(string $country, string $state = null, string $province = null, string $city = null) + public function faxLineAreaCodeGet(string $country, ?string $state = null, ?string $province = null, ?string $city = null) { list($response) = $this->faxLineAreaCodeGetWithHttpInfo($country, $state, $province, $city); return $response; @@ -506,18 +506,18 @@ public function faxLineAreaCodeGet(string $country, string $state = null, string * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return array of Model\FaxLineAreaCodeGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetWithHttpInfo(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city, $contentType); @@ -544,19 +544,6 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -596,6 +583,19 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -646,17 +646,17 @@ public function faxLineAreaCodeGetWithHttpInfo(string $country, string $state = * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetAsync(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetAsync(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { return $this->faxLineAreaCodeGetAsyncWithHttpInfo($country, $state, $province, $city, $contentType) ->then( @@ -671,17 +671,17 @@ function ($response) { * * Get Available Fax Line Area Codes * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetAsyncWithHttpInfo(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetAsyncWithHttpInfo(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { $returnType = '\Dropbox\Sign\Model\FaxLineAreaCodeGetResponse'; $request = $this->faxLineAreaCodeGetRequest($country, $state, $province, $city, $contentType); @@ -725,17 +725,17 @@ function ($exception) { /** * Create request for operation 'faxLineAreaCodeGet' * - * @param string $country Filter area codes by country. (required) - * @param string $state Filter area codes by state. (optional) - * @param string $province Filter area codes by province. (optional) - * @param string $city Filter area codes by city. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation + * @param string $country Filter area codes by country (required) + * @param string|null $state Filter area codes by state (optional) + * @param string|null $province Filter area codes by province (optional) + * @param string|null $city Filter area codes by city (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineAreaCodeGet'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineAreaCodeGet. This method will eventually become unavailable */ - public function faxLineAreaCodeGetRequest(string $country, string $state = null, string $province = null, string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) + public function faxLineAreaCodeGetRequest(string $country, ?string $state = null, ?string $province = null, ?string $city = null, string $contentType = self::contentTypes['faxLineAreaCodeGet'][0]) { // verify the required parameter 'country' is set if ($country === null || (is_array($country) && count($country) === 0)) { @@ -909,19 +909,6 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -961,6 +948,19 @@ public function faxLineCreateWithHttpInfo(Model\FaxLineCreateRequest $fax_line_c ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1242,19 +1242,6 @@ public function faxLineDeleteWithHttpInfo(Model\FaxLineDeleteRequest $fax_line_d $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1439,7 +1426,7 @@ public function faxLineDeleteRequest(Model\FaxLineDeleteRequest $fax_line_delete * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * * @return Model\FaxLineResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1456,7 +1443,7 @@ public function faxLineGet(string $number) * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return array of Model\FaxLineResponse, HTTP status code, HTTP response headers (array of strings) @@ -1491,19 +1478,6 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1543,6 +1517,19 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1593,7 +1580,7 @@ public function faxLineGetWithHttpInfo(string $number, string $contentType = sel * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface @@ -1615,7 +1602,7 @@ function ($response) { * * Get Fax Line * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface @@ -1666,7 +1653,7 @@ function ($exception) { /** * Create request for operation 'faxLineGet' * - * @param string $number The Fax Line number. (required) + * @param string $number The Fax Line number (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineGet'] to see the possible values for this operation * * @return Request @@ -1768,16 +1755,16 @@ public function faxLineGetRequest(string $number, string $contentType = self::co * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) * * @return Model\FaxLineListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function faxLineList(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null) + public function faxLineList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null) { list($response) = $this->faxLineListWithHttpInfo($account_id, $page, $page_size, $show_team_lines); return $response; @@ -1788,18 +1775,18 @@ public function faxLineList(string $account_id = null, int $page = 1, int $page_ * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return array of Model\FaxLineListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines, $contentType); @@ -1826,19 +1813,6 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1878,6 +1852,19 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1928,17 +1915,17 @@ public function faxLineListWithHttpInfo(string $account_id = null, int $page = 1 * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListAsync(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { return $this->faxLineListAsyncWithHttpInfo($account_id, $page, $page_size, $show_team_lines, $contentType) ->then( @@ -1953,17 +1940,17 @@ function ($response) { * * List Fax Lines * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $returnType = '\Dropbox\Sign\Model\FaxLineListResponse'; $request = $this->faxLineListRequest($account_id, $page, $page_size, $show_team_lines, $contentType); @@ -2007,17 +1994,17 @@ function ($exception) { /** * Create request for operation 'faxLineList' * - * @param string $account_id Account ID (optional) - * @param int $page Page (optional, default to 1) - * @param int $page_size Page size (optional, default to 20) - * @param bool $show_team_lines Show team lines (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation + * @param string|null $account_id Account ID (optional) + * @param int|null $page Which page number of the Fax Line List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param bool|null $show_team_lines Include Fax Lines belonging to team members in the list (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['faxLineList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::faxLineList. This method will eventually become unavailable */ - public function faxLineListRequest(string $account_id = null, int $page = 1, int $page_size = 20, bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) + public function faxLineListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?bool $show_team_lines = null, string $contentType = self::contentTypes['faxLineList'][0]) { $resourcePath = '/fax_line/list'; $formParams = []; @@ -2184,19 +2171,6 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2236,6 +2210,19 @@ public function faxLineRemoveUserWithHttpInfo(Model\FaxLineRemoveUserRequest $fa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FaxLineResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/OAuthApi.php b/sdks/php/src/Api/OAuthApi.php index 81468626d..19b137a75 100644 --- a/sdks/php/src/Api/OAuthApi.php +++ b/sdks/php/src/Api/OAuthApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -82,9 +82,9 @@ class OAuthApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -198,19 +198,6 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -250,6 +237,19 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -581,19 +581,6 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -633,6 +620,19 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\OAuthTokenResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/ReportApi.php b/sdks/php/src/Api/ReportApi.php index 987fc25fe..cde61fcaf 100644 --- a/sdks/php/src/Api/ReportApi.php +++ b/sdks/php/src/Api/ReportApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -79,9 +79,9 @@ class ReportApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -185,19 +185,6 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -237,6 +224,19 @@ public function reportCreateWithHttpInfo(Model\ReportCreateRequest $report_creat ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\ReportCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/SignatureRequestApi.php b/sdks/php/src/Api/SignatureRequestApi.php index e8da69d75..3f6ad70ec 100644 --- a/sdks/php/src/Api/SignatureRequestApi.php +++ b/sdks/php/src/Api/SignatureRequestApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -87,6 +87,22 @@ class SignatureRequestApi 'application/json', 'multipart/form-data', ], + 'signatureRequestEdit' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditEmbedded' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditEmbeddedWithTemplate' => [ + 'application/json', + 'multipart/form-data', + ], + 'signatureRequestEditWithTemplate' => [ + 'application/json', + 'multipart/form-data', + ], 'signatureRequestFiles' => [ 'application/json', ], @@ -131,9 +147,9 @@ class SignatureRequestApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -237,19 +253,6 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -289,6 +292,19 @@ public function signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo(Model ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -572,19 +588,6 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -624,6 +627,19 @@ public function signatureRequestBulkSendWithTemplateWithHttpInfo(Model\Signature ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\BulkSendJobSendResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -909,19 +925,6 @@ public function signatureRequestCancelWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1155,19 +1158,6 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1207,6 +1197,19 @@ public function signatureRequestCreateEmbeddedWithHttpInfo(Model\SignatureReques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1494,19 +1497,6 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1546,6 +1536,19 @@ public function signatureRequestCreateEmbeddedWithTemplateWithHttpInfo(Model\Sig ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1777,40 +1780,40 @@ public function signatureRequestCreateEmbeddedWithTemplateRequest(Model\Signatur } /** - * Operation signatureRequestFiles + * Operation signatureRequestEdit * - * Download Files + * Edit Signature Request * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request signature_request_edit_request (required) * - * @return SplFileObject + * @return Model\SignatureRequestGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestFiles(string $signature_request_id, string $file_type = 'pdf') + public function signatureRequestEdit(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) { - list($response) = $this->signatureRequestFilesWithHttpInfo($signature_request_id, $file_type); + list($response) = $this->signatureRequestEditWithHttpInfo($signature_request_id, $signature_request_edit_request); return $response; } /** - * Operation signatureRequestFilesWithHttpInfo + * Operation signatureRequestEditWithHttpInfo * - * Download Files + * Edit Signature Request * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation * - * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable */ - public function signatureRequestFilesWithHttpInfo(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestEditWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) { - $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1835,19 +1838,6 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1859,11 +1849,11 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, switch ($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer } else { $content = (string)$response->getBody(); - if ('\SplFileObject' !== 'string') { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { try { $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); } catch (JsonException $exception) { @@ -1881,12 +1871,1465 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, } return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), $response->getStatusCode(), $response->getHeaders(), ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditAsync + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditAsync(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + return $this->signatureRequestEditAsyncWithHttpInfo($signature_request_id, $signature_request_edit_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditAsyncWithHttpInfo + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEdit' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEdit'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEdit. This method will eventually become unavailable + */ + public function signatureRequestEditRequest(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request, string $contentType = self::contentTypes['signatureRequestEdit'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEdit' + ); + } + + // verify the required parameter 'signature_request_edit_request' is set + if ($signature_request_edit_request === null || (is_array($signature_request_edit_request) && count($signature_request_edit_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_request when calling signatureRequestEdit' + ); + } + + $resourcePath = '/signature_request/edit/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_request)); + } else { + $httpBody = $signature_request_edit_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbedded + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request signature_request_edit_embedded_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditEmbedded(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request); + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedAsync + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + return $this->signatureRequestEditEmbeddedAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedAsyncWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbedded' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbedded'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbedded. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request, string $contentType = self::contentTypes['signatureRequestEditEmbedded'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbedded' + ); + } + + // verify the required parameter 'signature_request_edit_embedded_request' is set + if ($signature_request_edit_embedded_request === null || (is_array($signature_request_edit_embedded_request) && count($signature_request_edit_embedded_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_request when calling signatureRequestEditEmbedded' + ); + } + + $resourcePath = '/signature_request/edit_embedded/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_request)); + } else { + $httpBody = $signature_request_edit_embedded_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplate + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request signature_request_edit_embedded_with_template_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditEmbeddedWithTemplate(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request); + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsync + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + return $this->signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbeddedWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditEmbeddedWithTemplate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditEmbeddedWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditEmbeddedWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request, string $contentType = self::contentTypes['signatureRequestEditEmbeddedWithTemplate'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + + // verify the required parameter 'signature_request_edit_embedded_with_template_request' is set + if ($signature_request_edit_embedded_with_template_request === null || (is_array($signature_request_edit_embedded_with_template_request) && count($signature_request_edit_embedded_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_with_template_request when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_embedded_with_template/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_with_template_request)); + } else { + $httpBody = $signature_request_edit_embedded_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_with_template_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditWithTemplate + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request signature_request_edit_with_template_request (required) + * + * @return Model\SignatureRequestGetResponse + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestEditWithTemplate(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + list($response) = $this->signatureRequestEditWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request); + return $response; + } + + /** + * Operation signatureRequestEditWithTemplateWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + throw $e; + } + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation signatureRequestEditWithTemplateAsync + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + return $this->signatureRequestEditWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditWithTemplateAsyncWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return \GuzzleHttp\Promise\PromiseInterface + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestEditWithTemplate'] to see the possible values for this operation + * + * @return Request + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestEditWithTemplate. This method will eventually become unavailable + */ + public function signatureRequestEditWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request, string $contentType = self::contentTypes['signatureRequestEditWithTemplate'][0]) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditWithTemplate' + ); + } + + // verify the required parameter 'signature_request_edit_with_template_request' is set + if ($signature_request_edit_with_template_request === null || (is_array($signature_request_edit_with_template_request) && count($signature_request_edit_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_with_template_request when calling signatureRequestEditWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_with_template/{signature_request_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{signature_request_id}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + $headers = $this->headerSelector->selectHeaders( + $multipart ? ['multipart/form-data'] : ['application/json'], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) === 0) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_with_template_request)); + } else { + $httpBody = $signature_request_edit_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_with_template_request); + } + $httpBody = new MultipartStream($multipartContents); + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + // if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestFiles + * + * Download Files + * + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * + * @return SplFileObject + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + */ + public function signatureRequestFiles(string $signature_request_id, ?string $file_type = 'pdf') + { + list($response) = $this->signatureRequestFilesWithHttpInfo($signature_request_id, $file_type); + return $response; + } + + /** + * Operation signatureRequestFilesWithHttpInfo + * + * Download Files + * + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * + * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable + */ + public function signatureRequestFilesWithHttpInfo(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + { + $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string)$e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int)$e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + $result = $this->handleRangeCodeResponse( + $response, + '4XX', + '\Dropbox\Sign\Model\ErrorResponse' + ); + if ($result) { + return $result; + } + + switch ($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); // stream goes to serializer + } else { + $content = (string)$response->getBody(); + if ('\SplFileObject' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1937,15 +3380,15 @@ public function signatureRequestFilesWithHttpInfo(string $signature_request_id, * * Download Files * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesAsync(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesAsync(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { return $this->signatureRequestFilesAsyncWithHttpInfo($signature_request_id, $file_type, $contentType) ->then( @@ -1960,15 +3403,15 @@ function ($response) { * * Download Files * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesAsyncWithHttpInfo(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesAsyncWithHttpInfo(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { $returnType = '\SplFileObject'; $request = $this->signatureRequestFilesRequest($signature_request_id, $file_type, $contentType); @@ -2012,15 +3455,15 @@ function ($exception) { /** * Create request for operation 'signatureRequestFiles' * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional, default to 'pdf') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFiles'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFiles. This method will eventually become unavailable */ - public function signatureRequestFilesRequest(string $signature_request_id, string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) + public function signatureRequestFilesRequest(string $signature_request_id, ?string $file_type = 'pdf', string $contentType = self::contentTypes['signatureRequestFiles'][0]) { // verify the required parameter 'signature_request_id' is set if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { @@ -2180,19 +3623,6 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2232,6 +3662,19 @@ public function signatureRequestFilesAsDataUriWithHttpInfo(string $signature_req ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2460,14 +3903,14 @@ public function signatureRequestFilesAsDataUriRequest(string $signature_request_ * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * * @return Model\FileResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestFilesAsFileUrl(string $signature_request_id, int $force_download = 1) + public function signatureRequestFilesAsFileUrl(string $signature_request_id, ?int $force_download = 1) { list($response) = $this->signatureRequestFilesAsFileUrlWithHttpInfo($signature_request_id, $force_download); return $response; @@ -2478,16 +3921,16 @@ public function signatureRequestFilesAsFileUrl(string $signature_request_id, int * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return array of Model\FileResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { $request = $this->signatureRequestFilesAsFileUrlRequest($signature_request_id, $force_download, $contentType); @@ -2514,19 +3957,6 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2566,6 +3996,19 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2616,15 +4059,15 @@ public function signatureRequestFilesAsFileUrlWithHttpInfo(string $signature_req * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlAsync(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlAsync(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { return $this->signatureRequestFilesAsFileUrlAsyncWithHttpInfo($signature_request_id, $force_download, $contentType) ->then( @@ -2639,15 +4082,15 @@ function ($response) { * * Download Files as File Url * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlAsyncWithHttpInfo(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlAsyncWithHttpInfo(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { $returnType = '\Dropbox\Sign\Model\FileResponse'; $request = $this->signatureRequestFilesAsFileUrlRequest($signature_request_id, $force_download, $contentType); @@ -2691,15 +4134,15 @@ function ($exception) { /** * Create request for operation 'signatureRequestFilesAsFileUrl' * - * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation + * @param string $signature_request_id The id of the SignatureRequest to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestFilesAsFileUrl'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestFilesAsFileUrl. This method will eventually become unavailable */ - public function signatureRequestFilesAsFileUrlRequest(string $signature_request_id, int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) + public function signatureRequestFilesAsFileUrlRequest(string $signature_request_id, ?int $force_download = 1, string $contentType = self::contentTypes['signatureRequestFilesAsFileUrl'][0]) { // verify the required parameter 'signature_request_id' is set if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { @@ -2859,19 +4302,6 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2911,6 +4341,19 @@ public function signatureRequestGetWithHttpInfo(string $signature_request_id, st ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3139,16 +4582,16 @@ public function signatureRequestGetRequest(string $signature_request_id, string * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) * * @return Model\SignatureRequestListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function signatureRequestList(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null) + public function signatureRequestList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null) { list($response) = $this->signatureRequestListWithHttpInfo($account_id, $page, $page_size, $query); return $response; @@ -3159,18 +4602,18 @@ public function signatureRequestList(string $account_id = null, int $page = 1, i * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return array of Model\SignatureRequestListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $request = $this->signatureRequestListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3197,19 +4640,6 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3249,6 +4679,19 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3299,17 +4742,17 @@ public function signatureRequestListWithHttpInfo(string $account_id = null, int * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListAsync(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { return $this->signatureRequestListAsyncWithHttpInfo($account_id, $page, $page_size, $query, $contentType) ->then( @@ -3324,17 +4767,17 @@ function ($response) { * * List Signature Requests * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $returnType = '\Dropbox\Sign\Model\SignatureRequestListResponse'; $request = $this->signatureRequestListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3378,17 +4821,17 @@ function ($exception) { /** * Create request for operation 'signatureRequestList' * - * @param string $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation + * @param string|null $account_id Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the SignatureRequest List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['signatureRequestList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::signatureRequestList. This method will eventually become unavailable */ - public function signatureRequestListRequest(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) + public function signatureRequestListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['signatureRequestList'][0]) { $resourcePath = '/signature_request/list'; $formParams = []; @@ -3559,19 +5002,6 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3611,6 +5041,19 @@ public function signatureRequestReleaseHoldWithHttpInfo(string $signature_reques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3893,19 +5336,6 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3945,6 +5375,19 @@ public function signatureRequestRemindWithHttpInfo(string $signature_request_id, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -4249,19 +5692,6 @@ public function signatureRequestRemoveWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -4491,19 +5921,6 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -4543,6 +5960,19 @@ public function signatureRequestSendWithHttpInfo(Model\SignatureRequestSendReque ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -4830,19 +6260,6 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -4882,6 +6299,19 @@ public function signatureRequestSendWithTemplateWithHttpInfo(Model\SignatureRequ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -5171,19 +6601,6 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -5223,6 +6640,19 @@ public function signatureRequestUpdateWithHttpInfo(string $signature_request_id, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/TeamApi.php b/sdks/php/src/Api/TeamApi.php index ec599b4ac..8b61a5d4b 100644 --- a/sdks/php/src/Api/TeamApi.php +++ b/sdks/php/src/Api/TeamApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -106,9 +106,9 @@ class TeamApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -161,13 +161,13 @@ public function getResponse() * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * * @return Model\TeamGetResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null) + public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null) { list($response) = $this->teamAddMemberWithHttpInfo($team_add_member_request, $team_id); return $response; @@ -179,7 +179,7 @@ public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_reques * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return array of Model\TeamGetResponse, HTTP status code, HTTP response headers (array of strings) @@ -187,7 +187,7 @@ public function teamAddMember(Model\TeamAddMemberRequest $team_add_member_reques * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { $request = $this->teamAddMemberRequest($team_add_member_request, $team_id, $contentType); @@ -214,19 +214,6 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -266,6 +253,19 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -317,14 +317,14 @@ public function teamAddMemberWithHttpInfo(Model\TeamAddMemberRequest $team_add_m * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberAsync(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberAsync(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { return $this->teamAddMemberAsyncWithHttpInfo($team_add_member_request, $team_id, $contentType) ->then( @@ -340,14 +340,14 @@ function ($response) { * Add User to Team * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberAsyncWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberAsyncWithHttpInfo(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; $request = $this->teamAddMemberRequest($team_add_member_request, $team_id, $contentType); @@ -392,14 +392,14 @@ function ($exception) { * Create request for operation 'teamAddMember' * * @param Model\TeamAddMemberRequest $team_add_member_request (required) - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamAddMember'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamAddMember. This method will eventually become unavailable */ - public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member_request, string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) + public function teamAddMemberRequest(Model\TeamAddMemberRequest $team_add_member_request, ?string $team_id = null, string $contentType = self::contentTypes['teamAddMember'][0]) { // verify the required parameter 'team_add_member_request' is set if ($team_add_member_request === null || (is_array($team_add_member_request) && count($team_add_member_request) === 0)) { @@ -565,19 +565,6 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -617,6 +604,19 @@ public function teamCreateWithHttpInfo(Model\TeamCreateRequest $team_create_requ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -899,19 +899,6 @@ public function teamDeleteWithHttpInfo(string $contentType = self::contentTypes[ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1123,19 +1110,6 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1175,6 +1149,19 @@ public function teamGetWithHttpInfo(string $contentType = self::contentTypes['te ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1384,13 +1371,13 @@ public function teamGetRequest(string $contentType = self::contentTypes['teamGet * * Get Team Info * - * @param string $team_id The id of the team. (optional) + * @param string|null $team_id The id of the team. (optional) * * @return Model\TeamGetInfoResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamInfo(string $team_id = null) + public function teamInfo(?string $team_id = null) { list($response) = $this->teamInfoWithHttpInfo($team_id); return $response; @@ -1401,15 +1388,15 @@ public function teamInfo(string $team_id = null) * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return array of Model\TeamGetInfoResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoWithHttpInfo(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $request = $this->teamInfoRequest($team_id, $contentType); @@ -1436,19 +1423,6 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1488,6 +1462,19 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetInfoResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1538,14 +1525,14 @@ public function teamInfoWithHttpInfo(string $team_id = null, string $contentType * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoAsync(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoAsync(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { return $this->teamInfoAsyncWithHttpInfo($team_id, $contentType) ->then( @@ -1560,14 +1547,14 @@ function ($response) { * * Get Team Info * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoAsyncWithHttpInfo(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoAsyncWithHttpInfo(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $returnType = '\Dropbox\Sign\Model\TeamGetInfoResponse'; $request = $this->teamInfoRequest($team_id, $contentType); @@ -1611,14 +1598,14 @@ function ($exception) { /** * Create request for operation 'teamInfo' * - * @param string $team_id The id of the team. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation + * @param string|null $team_id The id of the team. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInfo'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInfo. This method will eventually become unavailable */ - public function teamInfoRequest(string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) + public function teamInfoRequest(?string $team_id = null, string $contentType = self::contentTypes['teamInfo'][0]) { $resourcePath = '/team/info'; $formParams = []; @@ -1710,13 +1697,13 @@ public function teamInfoRequest(string $team_id = null, string $contentType = se * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) + * @param string|null $email_address The email address for which to display the team invites. (optional) * * @return Model\TeamInvitesResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamInvites(string $email_address = null) + public function teamInvites(?string $email_address = null) { list($response) = $this->teamInvitesWithHttpInfo($email_address); return $response; @@ -1727,15 +1714,15 @@ public function teamInvites(string $email_address = null) * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return array of Model\TeamInvitesResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesWithHttpInfo(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesWithHttpInfo(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $request = $this->teamInvitesRequest($email_address, $contentType); @@ -1762,19 +1749,6 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1814,6 +1788,19 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamInvitesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1864,14 +1851,14 @@ public function teamInvitesWithHttpInfo(string $email_address = null, string $co * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesAsync(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesAsync(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { return $this->teamInvitesAsyncWithHttpInfo($email_address, $contentType) ->then( @@ -1886,14 +1873,14 @@ function ($response) { * * List Team Invites * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesAsyncWithHttpInfo(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesAsyncWithHttpInfo(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $returnType = '\Dropbox\Sign\Model\TeamInvitesResponse'; $request = $this->teamInvitesRequest($email_address, $contentType); @@ -1937,14 +1924,14 @@ function ($exception) { /** * Create request for operation 'teamInvites' * - * @param string $email_address The email address for which to display the team invites. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation + * @param string|null $email_address The email address for which to display the team invites. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamInvites'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamInvites. This method will eventually become unavailable */ - public function teamInvitesRequest(string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) + public function teamInvitesRequest(?string $email_address = null, string $contentType = self::contentTypes['teamInvites'][0]) { $resourcePath = '/team/invites'; $formParams = []; @@ -2036,15 +2023,15 @@ public function teamInvitesRequest(string $email_address = null, string $content * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\TeamMembersResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamMembers(string $team_id, int $page = 1, int $page_size = 20) + public function teamMembers(string $team_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->teamMembersWithHttpInfo($team_id, $page, $page_size); return $response; @@ -2055,17 +2042,17 @@ public function teamMembers(string $team_id, int $page = 1, int $page_size = 20) * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return array of Model\TeamMembersResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { $request = $this->teamMembersRequest($team_id, $page, $page_size, $contentType); @@ -2092,19 +2079,6 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2144,6 +2118,19 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamMembersResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2194,16 +2181,16 @@ public function teamMembersWithHttpInfo(string $team_id, int $page = 1, int $pag * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersAsync(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersAsync(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { return $this->teamMembersAsyncWithHttpInfo($team_id, $page, $page_size, $contentType) ->then( @@ -2218,16 +2205,16 @@ function ($response) { * * List Team Members * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersAsyncWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersAsyncWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { $returnType = '\Dropbox\Sign\Model\TeamMembersResponse'; $request = $this->teamMembersRequest($team_id, $page, $page_size, $contentType); @@ -2271,16 +2258,16 @@ function ($exception) { /** * Create request for operation 'teamMembers' * - * @param string $team_id The id of the team that a member list is being requested from. (required) - * @param int $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation + * @param string $team_id The id of the team that a member list is being requested from. (required) + * @param int|null $page Which page number of the team member list to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamMembers'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamMembers. This method will eventually become unavailable */ - public function teamMembersRequest(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) + public function teamMembersRequest(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamMembers'][0]) { // verify the required parameter 'team_id' is set if ($team_id === null || (is_array($team_id) && count($team_id) === 0)) { @@ -2456,19 +2443,6 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2508,6 +2482,19 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2743,15 +2730,15 @@ public function teamRemoveMemberRequest(Model\TeamRemoveMemberRequest $team_remo * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) * * @return Model\TeamSubTeamsResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function teamSubTeams(string $team_id, int $page = 1, int $page_size = 20) + public function teamSubTeams(string $team_id, ?int $page = 1, ?int $page_size = 20) { list($response) = $this->teamSubTeamsWithHttpInfo($team_id, $page, $page_size); return $response; @@ -2762,17 +2749,17 @@ public function teamSubTeams(string $team_id, int $page = 1, int $page_size = 20 * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return array of Model\TeamSubTeamsResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { $request = $this->teamSubTeamsRequest($team_id, $page, $page_size, $contentType); @@ -2799,19 +2786,6 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2851,6 +2825,19 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamSubTeamsResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2901,16 +2888,16 @@ public function teamSubTeamsWithHttpInfo(string $team_id, int $page = 1, int $pa * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsAsync(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsAsync(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { return $this->teamSubTeamsAsyncWithHttpInfo($team_id, $page, $page_size, $contentType) ->then( @@ -2925,16 +2912,16 @@ function ($response) { * * List Sub Teams * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsAsyncWithHttpInfo(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsAsyncWithHttpInfo(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { $returnType = '\Dropbox\Sign\Model\TeamSubTeamsResponse'; $request = $this->teamSubTeamsRequest($team_id, $page, $page_size, $contentType); @@ -2978,16 +2965,16 @@ function ($exception) { /** * Create request for operation 'teamSubTeams' * - * @param string $team_id The id of the parent Team. (required) - * @param int $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation + * @param string $team_id The id of the parent Team. (required) + * @param int|null $page Which page number of the SubTeam List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['teamSubTeams'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::teamSubTeams. This method will eventually become unavailable */ - public function teamSubTeamsRequest(string $team_id, int $page = 1, int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) + public function teamSubTeamsRequest(string $team_id, ?int $page = 1, ?int $page_size = 20, string $contentType = self::contentTypes['teamSubTeams'][0]) { // verify the required parameter 'team_id' is set if ($team_id === null || (is_array($team_id) && count($team_id) === 0)) { @@ -3163,19 +3150,6 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3215,6 +3189,19 @@ public function teamUpdateWithHttpInfo(Model\TeamUpdateRequest $team_update_requ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TeamGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/TemplateApi.php b/sdks/php/src/Api/TemplateApi.php index 091dc84d6..2d39bc886 100644 --- a/sdks/php/src/Api/TemplateApi.php +++ b/sdks/php/src/Api/TemplateApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -113,9 +113,9 @@ class TemplateApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -221,19 +221,6 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -273,6 +260,19 @@ public function templateAddUserWithHttpInfo(string $template_id, Model\TemplateA ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -579,19 +579,6 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -631,6 +618,19 @@ public function templateCreateWithHttpInfo(Model\TemplateCreateRequest $template ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -918,19 +918,6 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -970,6 +957,19 @@ public function templateCreateEmbeddedDraftWithHttpInfo(Model\TemplateCreateEmbe ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateCreateEmbeddedDraftResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1255,19 +1255,6 @@ public function templateDeleteWithHttpInfo(string $template_id, string $contentT $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { @@ -1449,14 +1436,14 @@ public function templateDeleteRequest(string $template_id, string $contentType = * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) * * @return SplFileObject * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateFiles(string $template_id, string $file_type = null) + public function templateFiles(string $template_id, ?string $file_type = null) { list($response) = $this->templateFilesWithHttpInfo($template_id, $file_type); return $response; @@ -1467,16 +1454,16 @@ public function templateFiles(string $template_id, string $file_type = null) * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return array of \SplFileObject|\Dropbox\Sign\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesWithHttpInfo(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesWithHttpInfo(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { $request = $this->templateFilesRequest($template_id, $file_type, $contentType); @@ -1503,19 +1490,6 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1555,6 +1529,19 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1605,15 +1592,15 @@ public function templateFilesWithHttpInfo(string $template_id, string $file_type * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesAsync(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesAsync(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { return $this->templateFilesAsyncWithHttpInfo($template_id, $file_type, $contentType) ->then( @@ -1628,15 +1615,15 @@ function ($response) { * * Get Template Files * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesAsyncWithHttpInfo(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesAsyncWithHttpInfo(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { $returnType = '\SplFileObject'; $request = $this->templateFilesRequest($template_id, $file_type, $contentType); @@ -1680,15 +1667,15 @@ function ($exception) { /** * Create request for operation 'templateFiles' * - * @param string $template_id The id of the template files to retrieve. (required) - * @param string $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param string|null $file_type Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFiles'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFiles. This method will eventually become unavailable */ - public function templateFilesRequest(string $template_id, string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) + public function templateFilesRequest(string $template_id, ?string $file_type = null, string $contentType = self::contentTypes['templateFiles'][0]) { // verify the required parameter 'template_id' is set if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { @@ -1848,19 +1835,6 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1900,6 +1874,19 @@ public function templateFilesAsDataUriWithHttpInfo(string $template_id, string $ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponseDataUri'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2128,14 +2115,14 @@ public function templateFilesAsDataUriRequest(string $template_id, string $conte * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) * * @return Model\FileResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateFilesAsFileUrl(string $template_id, int $force_download = 1) + public function templateFilesAsFileUrl(string $template_id, ?int $force_download = 1) { list($response) = $this->templateFilesAsFileUrlWithHttpInfo($template_id, $force_download); return $response; @@ -2146,16 +2133,16 @@ public function templateFilesAsFileUrl(string $template_id, int $force_download * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return array of Model\FileResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlWithHttpInfo(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { $request = $this->templateFilesAsFileUrlRequest($template_id, $force_download, $contentType); @@ -2182,19 +2169,6 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2234,6 +2208,19 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\FileResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2284,15 +2271,15 @@ public function templateFilesAsFileUrlWithHttpInfo(string $template_id, int $for * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlAsync(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlAsync(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { return $this->templateFilesAsFileUrlAsyncWithHttpInfo($template_id, $force_download, $contentType) ->then( @@ -2307,15 +2294,15 @@ function ($response) { * * Get Template Files as File Url * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlAsyncWithHttpInfo(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlAsyncWithHttpInfo(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { $returnType = '\Dropbox\Sign\Model\FileResponse'; $request = $this->templateFilesAsFileUrlRequest($template_id, $force_download, $contentType); @@ -2359,15 +2346,15 @@ function ($exception) { /** * Create request for operation 'templateFilesAsFileUrl' * - * @param string $template_id The id of the template files to retrieve. (required) - * @param int $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation + * @param string $template_id The id of the template files to retrieve. (required) + * @param int|null $force_download By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. (optional, default to 1) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateFilesAsFileUrl'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateFilesAsFileUrl. This method will eventually become unavailable */ - public function templateFilesAsFileUrlRequest(string $template_id, int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) + public function templateFilesAsFileUrlRequest(string $template_id, ?int $force_download = 1, string $contentType = self::contentTypes['templateFilesAsFileUrl'][0]) { // verify the required parameter 'template_id' is set if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { @@ -2527,19 +2514,6 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2579,6 +2553,19 @@ public function templateGetWithHttpInfo(string $template_id, string $contentType ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2807,16 +2794,16 @@ public function templateGetRequest(string $template_id, string $contentType = se * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) * * @return Model\TemplateListResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ - public function templateList(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null) + public function templateList(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null) { list($response) = $this->templateListWithHttpInfo($account_id, $page, $page_size, $query); return $response; @@ -2827,18 +2814,18 @@ public function templateList(string $account_id = null, int $page = 1, int $page * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return array of Model\TemplateListResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { $request = $this->templateListRequest($account_id, $page, $page_size, $query, $contentType); @@ -2865,19 +2852,6 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -2917,6 +2891,19 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -2967,17 +2954,17 @@ public function templateListWithHttpInfo(string $account_id = null, int $page = * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListAsync(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListAsync(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { return $this->templateListAsyncWithHttpInfo($account_id, $page, $page_size, $query, $contentType) ->then( @@ -2992,17 +2979,17 @@ function ($response) { * * List Templates * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return \GuzzleHttp\Promise\PromiseInterface * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListAsyncWithHttpInfo(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListAsyncWithHttpInfo(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { $returnType = '\Dropbox\Sign\Model\TemplateListResponse'; $request = $this->templateListRequest($account_id, $page, $page_size, $query, $contentType); @@ -3046,17 +3033,17 @@ function ($exception) { /** * Create request for operation 'templateList' * - * @param string $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) - * @param int $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) - * @param int $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) - * @param string $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation + * @param string|null $account_id Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional) + * @param int|null $page Which page number of the Template List to return. Defaults to `1`. (optional, default to 1) + * @param int|null $page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20) + * @param string|null $query String that includes search terms and/or fields to be used to filter the Template objects. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['templateList'] to see the possible values for this operation * * @return Request * @throws InvalidArgumentException * @deprecated Prefer to use ::templateList. This method will eventually become unavailable */ - public function templateListRequest(string $account_id = null, int $page = 1, int $page_size = 20, string $query = null, string $contentType = self::contentTypes['templateList'][0]) + public function templateListRequest(?string $account_id = null, ?int $page = 1, ?int $page_size = 20, ?string $query = null, string $contentType = self::contentTypes['templateList'][0]) { if ($page_size !== null && $page_size > 100) { throw new InvalidArgumentException('invalid value for "$page_size" when calling TemplateApi.templateList, must be smaller than or equal to 100.'); @@ -3236,19 +3223,6 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3288,6 +3262,19 @@ public function templateRemoveUserWithHttpInfo(string $template_id, Model\Templa ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -3596,19 +3583,6 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -3648,6 +3622,19 @@ public function templateUpdateFilesWithHttpInfo(string $template_id, Model\Templ ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\TemplateUpdateFilesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/Api/UnclaimedDraftApi.php b/sdks/php/src/Api/UnclaimedDraftApi.php index 3886a87c5..bb24fb1d9 100644 --- a/sdks/php/src/Api/UnclaimedDraftApi.php +++ b/sdks/php/src/Api/UnclaimedDraftApi.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -91,9 +91,9 @@ class UnclaimedDraftApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -197,19 +197,6 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -249,6 +236,19 @@ public function unclaimedDraftCreateWithHttpInfo(Model\UnclaimedDraftCreateReque ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -536,19 +536,6 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -588,6 +575,19 @@ public function unclaimedDraftCreateEmbeddedWithHttpInfo(Model\UnclaimedDraftCre ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -875,19 +875,6 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -927,6 +914,19 @@ public function unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo(Model\Uncla ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer @@ -1216,19 +1216,6 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string)$request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string)$response->getBody() - ); - } - $result = $this->handleRangeCodeResponse( $response, '4XX', @@ -1268,6 +1255,19 @@ public function unclaimedDraftEditAndResendWithHttpInfo(string $signature_reques ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string)$request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string)$response->getBody() + ); + } + $returnType = '\Dropbox\Sign\Model\UnclaimedDraftCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); // stream goes to serializer diff --git a/sdks/php/src/ApiException.php b/sdks/php/src/ApiException.php index 3d4a49ca7..88738d79b 100644 --- a/sdks/php/src/ApiException.php +++ b/sdks/php/src/ApiException.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Configuration.php b/sdks/php/src/Configuration.php index 204b66994..b5ee14abd 100644 --- a/sdks/php/src/Configuration.php +++ b/sdks/php/src/Configuration.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -97,7 +97,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.8-dev/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.8.1-dev/PHP'; /** * Debug switch (default set to false) @@ -438,7 +438,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 3.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.8-dev' . PHP_EOL; + $report .= ' SDK Package Version: 1.8.1-dev' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; @@ -492,7 +492,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/sdks/php/src/EventCallbackHelper.php b/sdks/php/src/EventCallbackHelper.php index 16e76ec8b..f15373332 100644 --- a/sdks/php/src/EventCallbackHelper.php +++ b/sdks/php/src/EventCallbackHelper.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/HeaderSelector.php b/sdks/php/src/HeaderSelector.php index fe1faf2c1..9f16eda5a 100644 --- a/sdks/php/src/HeaderSelector.php +++ b/sdks/php/src/HeaderSelector.php @@ -15,7 +15,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -80,7 +80,7 @@ private function selectAcceptHeader(array $accept): ?string } // If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -90,6 +90,28 @@ private function selectAcceptHeader(array $accept): ?string return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + */ + private function selectJsonMimeList(array $mimeList): array + { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if ($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/sdks/php/src/Model/AccountCreateRequest.php b/sdks/php/src/Model/AccountCreateRequest.php index f4b927310..7a4841477 100644 --- a/sdks/php/src/Model/AccountCreateRequest.php +++ b/sdks/php/src/Model/AccountCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountCreateResponse.php b/sdks/php/src/Model/AccountCreateResponse.php index 66e9a34d4..619bf49a3 100644 --- a/sdks/php/src/Model/AccountCreateResponse.php +++ b/sdks/php/src/Model/AccountCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('oauth_data', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountGetResponse.php b/sdks/php/src/Model/AccountGetResponse.php index b59da1285..5005bc421 100644 --- a/sdks/php/src/Model/AccountGetResponse.php +++ b/sdks/php/src/Model/AccountGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountResponse.php b/sdks/php/src/Model/AccountResponse.php index 3fb1a1869..6c3370ef1 100644 --- a/sdks/php/src/Model/AccountResponse.php +++ b/sdks/php/src/Model/AccountResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountResponseQuotas.php b/sdks/php/src/Model/AccountResponseQuotas.php index 85d004055..119733b99 100644 --- a/sdks/php/src/Model/AccountResponseQuotas.php +++ b/sdks/php/src/Model/AccountResponseQuotas.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_signature_requests_left', $data ?? [], null); $this->setIfExists('documents_left', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountResponseUsage.php b/sdks/php/src/Model/AccountResponseUsage.php index 94eb509e7..90cb9bb1c 100644 --- a/sdks/php/src/Model/AccountResponseUsage.php +++ b/sdks/php/src/Model/AccountResponseUsage.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_pages_sent', $data ?? [], null); } diff --git a/sdks/php/src/Model/AccountUpdateRequest.php b/sdks/php/src/Model/AccountUpdateRequest.php index 34a65c498..cc7e7df52 100644 --- a/sdks/php/src/Model/AccountUpdateRequest.php +++ b/sdks/php/src/Model/AccountUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('callback_url', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountVerifyRequest.php b/sdks/php/src/Model/AccountVerifyRequest.php index d8731ea40..8383f6599 100644 --- a/sdks/php/src/Model/AccountVerifyRequest.php +++ b/sdks/php/src/Model/AccountVerifyRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); } diff --git a/sdks/php/src/Model/AccountVerifyResponse.php b/sdks/php/src/Model/AccountVerifyResponse.php index f8f6a65e5..359be63d7 100644 --- a/sdks/php/src/Model/AccountVerifyResponse.php +++ b/sdks/php/src/Model/AccountVerifyResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/AccountVerifyResponseAccount.php b/sdks/php/src/Model/AccountVerifyResponseAccount.php index 34a1de5e9..2c4bf22b3 100644 --- a/sdks/php/src/Model/AccountVerifyResponseAccount.php +++ b/sdks/php/src/Model/AccountVerifyResponseAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); } diff --git a/sdks/php/src/Model/ApiAppCreateRequest.php b/sdks/php/src/Model/ApiAppCreateRequest.php index d31444091..c6d0cc9a9 100644 --- a/sdks/php/src/Model/ApiAppCreateRequest.php +++ b/sdks/php/src/Model/ApiAppCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -267,10 +267,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('domains', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppGetResponse.php b/sdks/php/src/Model/ApiAppGetResponse.php index f95c2b6e0..3d9dc5d0a 100644 --- a/sdks/php/src/Model/ApiAppGetResponse.php +++ b/sdks/php/src/Model/ApiAppGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_app', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppListResponse.php b/sdks/php/src/Model/ApiAppListResponse.php index 44afca3c1..02e2483e9 100644 --- a/sdks/php/src/Model/ApiAppListResponse.php +++ b/sdks/php/src/Model/ApiAppListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_apps', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppResponse.php b/sdks/php/src/Model/ApiAppResponse.php index 3e214031d..c283d86fb 100644 --- a/sdks/php/src/Model/ApiAppResponse.php +++ b/sdks/php/src/Model/ApiAppResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppResponseOAuth.php b/sdks/php/src/Model/ApiAppResponseOAuth.php index ac2ecf08b..6c84b43c6 100644 --- a/sdks/php/src/Model/ApiAppResponseOAuth.php +++ b/sdks/php/src/Model/ApiAppResponseOAuth.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('secret', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppResponseOptions.php b/sdks/php/src/Model/ApiAppResponseOptions.php index 99c11f02a..46466cb77 100644 --- a/sdks/php/src/Model/ApiAppResponseOptions.php +++ b/sdks/php/src/Model/ApiAppResponseOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('can_insert_everywhere', $data ?? [], null); } diff --git a/sdks/php/src/Model/ApiAppResponseOwnerAccount.php b/sdks/php/src/Model/ApiAppResponseOwnerAccount.php index ffc120960..db9e8e0a0 100644 --- a/sdks/php/src/Model/ApiAppResponseOwnerAccount.php +++ b/sdks/php/src/Model/ApiAppResponseOwnerAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php b/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php index 95f29f5f4..b010c59f0 100644 --- a/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php +++ b/sdks/php/src/Model/ApiAppResponseWhiteLabelingOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -309,10 +309,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('header_background_color', $data ?? [], null); $this->setIfExists('legal_version', $data ?? [], null); diff --git a/sdks/php/src/Model/ApiAppUpdateRequest.php b/sdks/php/src/Model/ApiAppUpdateRequest.php index 456d143c2..323f28d52 100644 --- a/sdks/php/src/Model/ApiAppUpdateRequest.php +++ b/sdks/php/src/Model/ApiAppUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -267,10 +267,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('custom_logo_file', $data ?? [], null); diff --git a/sdks/php/src/Model/BulkSendJobGetResponse.php b/sdks/php/src/Model/BulkSendJobGetResponse.php index 3d97f3fe5..a0699b46f 100644 --- a/sdks/php/src/Model/BulkSendJobGetResponse.php +++ b/sdks/php/src/Model/BulkSendJobGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php b/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php index 0781348c0..a68be1c16 100644 --- a/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php +++ b/sdks/php/src/Model/BulkSendJobGetResponseSignatureRequests.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -374,10 +374,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('test_mode', $data ?? [], false); $this->setIfExists('signature_request_id', $data ?? [], null); diff --git a/sdks/php/src/Model/BulkSendJobListResponse.php b/sdks/php/src/Model/BulkSendJobListResponse.php index 8420c469f..ee12f4f40 100644 --- a/sdks/php/src/Model/BulkSendJobListResponse.php +++ b/sdks/php/src/Model/BulkSendJobListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_jobs', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/BulkSendJobResponse.php b/sdks/php/src/Model/BulkSendJobResponse.php index fcd66e120..987a9bd02 100644 --- a/sdks/php/src/Model/BulkSendJobResponse.php +++ b/sdks/php/src/Model/BulkSendJobResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job_id', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); diff --git a/sdks/php/src/Model/BulkSendJobSendResponse.php b/sdks/php/src/Model/BulkSendJobSendResponse.php index 7797e84c7..945a1a518 100644 --- a/sdks/php/src/Model/BulkSendJobSendResponse.php +++ b/sdks/php/src/Model/BulkSendJobSendResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bulk_send_job', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/EmbeddedEditUrlRequest.php b/sdks/php/src/Model/EmbeddedEditUrlRequest.php index b4992a4c8..d5252f0e2 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlRequest.php +++ b/sdks/php/src/Model/EmbeddedEditUrlRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -284,10 +284,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('allow_edit_ccs', $data ?? [], false); $this->setIfExists('cc_roles', $data ?? [], null); diff --git a/sdks/php/src/Model/EmbeddedEditUrlResponse.php b/sdks/php/src/Model/EmbeddedEditUrlResponse.php index 88320ef63..865768dd7 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlResponse.php +++ b/sdks/php/src/Model/EmbeddedEditUrlResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('embedded', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php b/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php index 0ef35374f..bda80cfb8 100644 --- a/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php +++ b/sdks/php/src/Model/EmbeddedEditUrlResponseEmbedded.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('edit_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/sdks/php/src/Model/EmbeddedSignUrlResponse.php b/sdks/php/src/Model/EmbeddedSignUrlResponse.php index 4f91647aa..8b2c9af81 100644 --- a/sdks/php/src/Model/EmbeddedSignUrlResponse.php +++ b/sdks/php/src/Model/EmbeddedSignUrlResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('embedded', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php b/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php index f8b6619ba..54fffcbc2 100644 --- a/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php +++ b/sdks/php/src/Model/EmbeddedSignUrlResponseEmbedded.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sign_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/sdks/php/src/Model/ErrorResponse.php b/sdks/php/src/Model/ErrorResponse.php index 081ed78c0..108b8e6c7 100644 --- a/sdks/php/src/Model/ErrorResponse.php +++ b/sdks/php/src/Model/ErrorResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error', $data ?? [], null); } diff --git a/sdks/php/src/Model/ErrorResponseError.php b/sdks/php/src/Model/ErrorResponseError.php index 60981920d..6bb4b8620 100644 --- a/sdks/php/src/Model/ErrorResponseError.php +++ b/sdks/php/src/Model/ErrorResponseError.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -243,10 +243,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error_msg', $data ?? [], null); $this->setIfExists('error_name', $data ?? [], null); diff --git a/sdks/php/src/Model/EventCallbackRequest.php b/sdks/php/src/Model/EventCallbackRequest.php index 35c806b2d..a3b4a183f 100644 --- a/sdks/php/src/Model/EventCallbackRequest.php +++ b/sdks/php/src/Model/EventCallbackRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event', $data ?? [], null); $this->setIfExists('account', $data ?? [], null); diff --git a/sdks/php/src/Model/EventCallbackRequestEvent.php b/sdks/php/src/Model/EventCallbackRequestEvent.php index 36d99c767..2501307ce 100644 --- a/sdks/php/src/Model/EventCallbackRequestEvent.php +++ b/sdks/php/src/Model/EventCallbackRequestEvent.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -307,10 +307,10 @@ public function getEventTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('event_time', $data ?? [], null); $this->setIfExists('event_type', $data ?? [], null); diff --git a/sdks/php/src/Model/EventCallbackRequestEventMetadata.php b/sdks/php/src/Model/EventCallbackRequestEventMetadata.php index c0d665c8c..9116a543c 100644 --- a/sdks/php/src/Model/EventCallbackRequestEventMetadata.php +++ b/sdks/php/src/Model/EventCallbackRequestEventMetadata.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('related_signature_id', $data ?? [], null); $this->setIfExists('reported_for_account_id', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxGetResponse.php b/sdks/php/src/Model/FaxGetResponse.php index 232943492..ee85f3d1d 100644 --- a/sdks/php/src/Model/FaxGetResponse.php +++ b/sdks/php/src/Model/FaxGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxLineAddUserRequest.php b/sdks/php/src/Model/FaxLineAddUserRequest.php index b7e2c849a..4bada1b28 100644 --- a/sdks/php/src/Model/FaxLineAddUserRequest.php +++ b/sdks/php/src/Model/FaxLineAddUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('account_id', $data ?? [], null); @@ -327,7 +327,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php index 1b96f68c7..68597df2e 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetCountryEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php index 8bfde8747..159986583 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetProvinceEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php b/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php index 085e8a8e3..c4e650c69 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('area_codes', $data ?? [], null); } diff --git a/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php index db4f35fd0..3ce60e6f5 100644 --- a/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php +++ b/sdks/php/src/Model/FaxLineAreaCodeGetStateEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/FaxLineCreateRequest.php b/sdks/php/src/Model/FaxLineCreateRequest.php index a898fef9d..1f9504ac3 100644 --- a/sdks/php/src/Model/FaxLineCreateRequest.php +++ b/sdks/php/src/Model/FaxLineCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -266,10 +266,10 @@ public function getCountryAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('area_code', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); @@ -364,7 +364,7 @@ public function getAreaCode() /** * Sets area_code * - * @param int $area_code Area code + * @param int $area_code Area code of the new Fax Line * * @return self */ @@ -391,7 +391,7 @@ public function getCountry() /** * Sets country * - * @param string $country Country + * @param string $country Country of the area code * * @return self */ @@ -428,7 +428,7 @@ public function getCity() /** * Sets city * - * @param string|null $city City + * @param string|null $city City of the area code * * @return self */ @@ -455,7 +455,7 @@ public function getAccountId() /** * Sets account_id * - * @param string|null $account_id Account ID + * @param string|null $account_id Account ID of the account that will be assigned this new Fax Line * * @return self */ diff --git a/sdks/php/src/Model/FaxLineDeleteRequest.php b/sdks/php/src/Model/FaxLineDeleteRequest.php index 1fc4fa4a6..c3946e2cc 100644 --- a/sdks/php/src/Model/FaxLineDeleteRequest.php +++ b/sdks/php/src/Model/FaxLineDeleteRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); } @@ -313,7 +313,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ diff --git a/sdks/php/src/Model/FaxLineListResponse.php b/sdks/php/src/Model/FaxLineListResponse.php index 1b32ad49c..904c477ae 100644 --- a/sdks/php/src/Model/FaxLineListResponse.php +++ b/sdks/php/src/Model/FaxLineListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('list_info', $data ?? [], null); $this->setIfExists('fax_lines', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxLineRemoveUserRequest.php b/sdks/php/src/Model/FaxLineRemoveUserRequest.php index 5bec49060..43bcce54d 100644 --- a/sdks/php/src/Model/FaxLineRemoveUserRequest.php +++ b/sdks/php/src/Model/FaxLineRemoveUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('account_id', $data ?? [], null); @@ -327,7 +327,7 @@ public function getNumber() /** * Sets number * - * @param string $number the Fax Line number + * @param string $number The Fax Line number * * @return self */ @@ -354,7 +354,7 @@ public function getAccountId() /** * Sets account_id * - * @param string|null $account_id Account ID + * @param string|null $account_id Account ID of the user to remove access * * @return self */ @@ -381,7 +381,7 @@ public function getEmailAddress() /** * Sets email_address * - * @param string|null $email_address Email address + * @param string|null $email_address Email address of the user to remove access * * @return self */ diff --git a/sdks/php/src/Model/FaxLineResponse.php b/sdks/php/src/Model/FaxLineResponse.php index c30616f6c..7b84af2f9 100644 --- a/sdks/php/src/Model/FaxLineResponse.php +++ b/sdks/php/src/Model/FaxLineResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_line', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxLineResponseFaxLine.php b/sdks/php/src/Model/FaxLineResponseFaxLine.php index 4a3fe8fa7..bde887583 100644 --- a/sdks/php/src/Model/FaxLineResponseFaxLine.php +++ b/sdks/php/src/Model/FaxLineResponseFaxLine.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxListResponse.php b/sdks/php/src/Model/FaxListResponse.php index 21e89d342..bb402e895 100644 --- a/sdks/php/src/Model/FaxListResponse.php +++ b/sdks/php/src/Model/FaxListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('faxes', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxResponse.php b/sdks/php/src/Model/FaxResponse.php index 9471ccc8a..ebe08f475 100644 --- a/sdks/php/src/Model/FaxResponse.php +++ b/sdks/php/src/Model/FaxResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('fax_id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxResponseTransmission.php b/sdks/php/src/Model/FaxResponseTransmission.php index 8c30b8ad5..440773960 100644 --- a/sdks/php/src/Model/FaxResponseTransmission.php +++ b/sdks/php/src/Model/FaxResponseTransmission.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -270,10 +270,10 @@ public function getStatusCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipient', $data ?? [], null); $this->setIfExists('status_code', $data ?? [], null); diff --git a/sdks/php/src/Model/FaxSendRequest.php b/sdks/php/src/Model/FaxSendRequest.php index d09573478..4923a515a 100644 --- a/sdks/php/src/Model/FaxSendRequest.php +++ b/sdks/php/src/Model/FaxSendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -279,10 +279,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('recipient', $data ?? [], null); $this->setIfExists('sender', $data ?? [], null); @@ -370,7 +370,7 @@ public function getRecipient() /** * Sets recipient * - * @param string $recipient Fax Send To Recipient + * @param string $recipient Recipient of the fax Can be a phone number in E.164 format or email address * * @return self */ @@ -424,7 +424,7 @@ public function getFiles() /** * Sets files * - * @param SplFileObject[]|null $files Fax File to Send + * @param SplFileObject[]|null $files use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both * * @return self */ @@ -451,7 +451,7 @@ public function getFileUrls() /** * Sets file_urls * - * @param string[]|null $file_urls Fax File URL to Send + * @param string[]|null $file_urls use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both * * @return self */ @@ -505,7 +505,7 @@ public function getCoverPageTo() /** * Sets cover_page_to * - * @param string|null $cover_page_to Fax Cover Page for Recipient + * @param string|null $cover_page_to Fax cover page recipient information * * @return self */ @@ -532,7 +532,7 @@ public function getCoverPageFrom() /** * Sets cover_page_from * - * @param string|null $cover_page_from Fax Cover Page for Sender + * @param string|null $cover_page_from Fax cover page sender information * * @return self */ diff --git a/sdks/php/src/Model/FileResponse.php b/sdks/php/src/Model/FileResponse.php index 3ebdc3378..82f84a632 100644 --- a/sdks/php/src/Model/FileResponse.php +++ b/sdks/php/src/Model/FileResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('file_url', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); diff --git a/sdks/php/src/Model/FileResponseDataUri.php b/sdks/php/src/Model/FileResponseDataUri.php index 474e8a73d..98e37dda6 100644 --- a/sdks/php/src/Model/FileResponseDataUri.php +++ b/sdks/php/src/Model/FileResponseDataUri.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('data_uri', $data ?? [], null); } diff --git a/sdks/php/src/Model/ListInfoResponse.php b/sdks/php/src/Model/ListInfoResponse.php index 623284e41..a036c6d06 100644 --- a/sdks/php/src/Model/ListInfoResponse.php +++ b/sdks/php/src/Model/ListInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('num_pages', $data ?? [], null); $this->setIfExists('num_results', $data ?? [], null); diff --git a/sdks/php/src/Model/ModelInterface.php b/sdks/php/src/Model/ModelInterface.php index 0bc2f212e..1df0ec6c4 100644 --- a/sdks/php/src/Model/ModelInterface.php +++ b/sdks/php/src/Model/ModelInterface.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/OAuthTokenGenerateRequest.php b/sdks/php/src/Model/OAuthTokenGenerateRequest.php index 38a0395d1..c8e76099b 100644 --- a/sdks/php/src/Model/OAuthTokenGenerateRequest.php +++ b/sdks/php/src/Model/OAuthTokenGenerateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('client_secret', $data ?? [], null); diff --git a/sdks/php/src/Model/OAuthTokenRefreshRequest.php b/sdks/php/src/Model/OAuthTokenRefreshRequest.php index 11cf05a3b..d92365095 100644 --- a/sdks/php/src/Model/OAuthTokenRefreshRequest.php +++ b/sdks/php/src/Model/OAuthTokenRefreshRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('grant_type', $data ?? [], 'refresh_token'); $this->setIfExists('refresh_token', $data ?? [], null); diff --git a/sdks/php/src/Model/OAuthTokenResponse.php b/sdks/php/src/Model/OAuthTokenResponse.php index 8c83de78e..72b899309 100644 --- a/sdks/php/src/Model/OAuthTokenResponse.php +++ b/sdks/php/src/Model/OAuthTokenResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('access_token', $data ?? [], null); $this->setIfExists('token_type', $data ?? [], null); diff --git a/sdks/php/src/Model/ReportCreateRequest.php b/sdks/php/src/Model/ReportCreateRequest.php index 58029634b..f2aefab1b 100644 --- a/sdks/php/src/Model/ReportCreateRequest.php +++ b/sdks/php/src/Model/ReportCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -258,10 +258,10 @@ public function getReportTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('end_date', $data ?? [], null); $this->setIfExists('report_type', $data ?? [], null); diff --git a/sdks/php/src/Model/ReportCreateResponse.php b/sdks/php/src/Model/ReportCreateResponse.php index 415406e3c..bc712c962 100644 --- a/sdks/php/src/Model/ReportCreateResponse.php +++ b/sdks/php/src/Model/ReportCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('report', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/ReportResponse.php b/sdks/php/src/Model/ReportResponse.php index c2d024ca1..537eb9293 100644 --- a/sdks/php/src/Model/ReportResponse.php +++ b/sdks/php/src/Model/ReportResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -265,10 +265,10 @@ public function getReportTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('success', $data ?? [], null); $this->setIfExists('start_date', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php index 9c5947fec..1874fd232 100644 --- a/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -303,10 +303,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php index 26092eb3f..1e85b4445 100644 --- a/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestBulkSendWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -303,10 +303,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('signer_file', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php b/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php index 7d14b823c..badc3ea00 100644 --- a/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php +++ b/sdks/php/src/Model/SignatureRequestCreateEmbeddedRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -369,10 +369,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php index b98f7b8b7..4f5b84e26 100644 --- a/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -315,10 +315,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('client_id', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php b/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php new file mode 100644 index 000000000..cb0190f9c --- /dev/null +++ b/sdks/php/src/Model/SignatureRequestEditEmbeddedRequest.php @@ -0,0 +1,1231 @@ + + */ +class SignatureRequestEditEmbeddedRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'client_id' => 'string', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'populate_auto_fill_fields' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'client_id' => null, + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'populate_auto_fill_fields' => null, + 'expires_at' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'client_id' => false, + 'files' => false, + 'file_urls' => false, + 'signers' => false, + 'grouped_signers' => false, + 'allow_decline' => false, + 'allow_reassign' => false, + 'attachments' => false, + 'cc_email_addresses' => false, + 'custom_fields' => false, + 'field_options' => false, + 'form_field_groups' => false, + 'form_field_rules' => false, + 'form_fields_per_document' => false, + 'hide_text_tags' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'use_text_tags' => false, + 'populate_auto_fill_fields' => false, + 'expires_at' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'client_id' => 'client_id', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'signers' => 'signers', + 'grouped_signers' => 'grouped_signers', + 'allow_decline' => 'allow_decline', + 'allow_reassign' => 'allow_reassign', + 'attachments' => 'attachments', + 'cc_email_addresses' => 'cc_email_addresses', + 'custom_fields' => 'custom_fields', + 'field_options' => 'field_options', + 'form_field_groups' => 'form_field_groups', + 'form_field_rules' => 'form_field_rules', + 'form_fields_per_document' => 'form_fields_per_document', + 'hide_text_tags' => 'hide_text_tags', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'use_text_tags' => 'use_text_tags', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + 'expires_at' => 'expires_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'client_id' => 'setClientId', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'client_id' => 'getClientId', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('grouped_signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('allow_reassign', $data ?? [], false); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('cc_email_addresses', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('field_options', $data ?? [], null); + $this->setIfExists('form_field_groups', $data ?? [], null); + $this->setIfExists('form_field_rules', $data ?? [], null); + $this->setIfExists('form_fields_per_document', $data ?? [], null); + $this->setIfExists('hide_text_tags', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('use_text_tags', $data ?? [], false); + $this->setIfExists('populate_auto_fill_fields', $data ?? [], false); + $this->setIfExists('expires_at', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditEmbeddedRequest + { + /** @var SignatureRequestEditEmbeddedRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + if (is_null($grouped_signers)) { + throw new InvalidArgumentException('non-nullable grouped_signers cannot be null'); + } + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $allow_reassign Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + if (is_null($allow_reassign)) { + throw new InvalidArgumentException('non-nullable allow_reassign cannot be null'); + } + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + if (is_null($attachments)) { + throw new InvalidArgumentException('non-nullable attachments cannot be null'); + } + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + if (is_null($cc_email_addresses)) { + throw new InvalidArgumentException('non-nullable cc_email_addresses cannot be null'); + } + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + if (is_null($field_options)) { + throw new InvalidArgumentException('non-nullable field_options cannot be null'); + } + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $form_field_groups Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + if (is_null($form_field_groups)) { + throw new InvalidArgumentException('non-nullable form_field_groups cannot be null'); + } + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + if (is_null($form_field_rules)) { + throw new InvalidArgumentException('non-nullable form_field_rules cannot be null'); + } + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $form_fields_per_document The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + if (is_null($form_fields_per_document)) { + throw new InvalidArgumentException('non-nullable form_fields_per_document cannot be null'); + } + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $hide_text_tags Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + if (is_null($hide_text_tags)) { + throw new InvalidArgumentException('non-nullable hide_text_tags cannot be null'); + } + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $use_text_tags Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + if (is_null($use_text_tags)) { + throw new InvalidArgumentException('non-nullable use_text_tags cannot be null'); + } + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + if (is_null($populate_auto_fill_fields)) { + throw new InvalidArgumentException('non-nullable populate_auto_fill_fields cannot be null'); + } + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $expires_at When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + if (is_null($expires_at)) { + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php new file mode 100644 index 000000000..ac58ec089 --- /dev/null +++ b/sdks/php/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php @@ -0,0 +1,924 @@ + + */ +class SignatureRequestEditEmbeddedWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'client_id' => 'string', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'populate_auto_fill_fields' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'client_id' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'populate_auto_fill_fields' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'template_ids' => false, + 'client_id' => false, + 'signers' => false, + 'allow_decline' => false, + 'ccs' => false, + 'custom_fields' => false, + 'files' => false, + 'file_urls' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'populate_auto_fill_fields' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'client_id' => 'client_id', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'client_id' => 'setClientId', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'client_id' => 'getClientId', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('template_ids', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('ccs', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('populate_auto_fill_fields', $data ?? [], false); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + /** @var SignatureRequestEditEmbeddedWithTemplateRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedWithTemplateRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + if (is_null($template_ids)) { + throw new InvalidArgumentException('non-nullable template_ids cannot be null'); + } + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + if (is_null($ccs)) { + throw new InvalidArgumentException('non-nullable ccs cannot be null'); + } + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + if (is_null($populate_auto_fill_fields)) { + throw new InvalidArgumentException('non-nullable populate_auto_fill_fields cannot be null'); + } + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/SignatureRequestEditRequest.php b/sdks/php/src/Model/SignatureRequestEditRequest.php new file mode 100644 index 000000000..131a3e4c4 --- /dev/null +++ b/sdks/php/src/Model/SignatureRequestEditRequest.php @@ -0,0 +1,1262 @@ + + */ +class SignatureRequestEditRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'client_id' => null, + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'expires_at' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'files' => false, + 'file_urls' => false, + 'signers' => false, + 'grouped_signers' => false, + 'allow_decline' => false, + 'allow_reassign' => false, + 'attachments' => false, + 'cc_email_addresses' => false, + 'client_id' => false, + 'custom_fields' => false, + 'field_options' => false, + 'form_field_groups' => false, + 'form_field_rules' => false, + 'form_fields_per_document' => false, + 'hide_text_tags' => false, + 'is_eid' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'signing_redirect_url' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + 'use_text_tags' => false, + 'expires_at' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'files' => 'files', + 'file_urls' => 'file_urls', + 'signers' => 'signers', + 'grouped_signers' => 'grouped_signers', + 'allow_decline' => 'allow_decline', + 'allow_reassign' => 'allow_reassign', + 'attachments' => 'attachments', + 'cc_email_addresses' => 'cc_email_addresses', + 'client_id' => 'client_id', + 'custom_fields' => 'custom_fields', + 'field_options' => 'field_options', + 'form_field_groups' => 'form_field_groups', + 'form_field_rules' => 'form_field_rules', + 'form_fields_per_document' => 'form_fields_per_document', + 'hide_text_tags' => 'hide_text_tags', + 'is_eid' => 'is_eid', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'signing_redirect_url' => 'signing_redirect_url', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'use_text_tags' => 'use_text_tags', + 'expires_at' => 'expires_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('grouped_signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('allow_reassign', $data ?? [], false); + $this->setIfExists('attachments', $data ?? [], null); + $this->setIfExists('cc_email_addresses', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('field_options', $data ?? [], null); + $this->setIfExists('form_field_groups', $data ?? [], null); + $this->setIfExists('form_field_rules', $data ?? [], null); + $this->setIfExists('form_fields_per_document', $data ?? [], null); + $this->setIfExists('hide_text_tags', $data ?? [], false); + $this->setIfExists('is_eid', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('signing_redirect_url', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('use_text_tags', $data ?? [], false); + $this->setIfExists('expires_at', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditRequest + { + /** @var SignatureRequestEditRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + if (is_null($grouped_signers)) { + throw new InvalidArgumentException('non-nullable grouped_signers cannot be null'); + } + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $allow_reassign Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + if (is_null($allow_reassign)) { + throw new InvalidArgumentException('non-nullable allow_reassign cannot be null'); + } + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + if (is_null($attachments)) { + throw new InvalidArgumentException('non-nullable attachments cannot be null'); + } + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + if (is_null($cc_email_addresses)) { + throw new InvalidArgumentException('non-nullable cc_email_addresses cannot be null'); + } + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $client_id The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + * + * @return self + */ + public function setClientId(?string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + if (is_null($field_options)) { + throw new InvalidArgumentException('non-nullable field_options cannot be null'); + } + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $form_field_groups Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + if (is_null($form_field_groups)) { + throw new InvalidArgumentException('non-nullable form_field_groups cannot be null'); + } + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + if (is_null($form_field_rules)) { + throw new InvalidArgumentException('non-nullable form_field_rules cannot be null'); + } + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $form_fields_per_document The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + if (is_null($form_fields_per_document)) { + throw new InvalidArgumentException('non-nullable form_fields_per_document cannot be null'); + } + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $hide_text_tags Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + if (is_null($hide_text_tags)) { + throw new InvalidArgumentException('non-nullable hide_text_tags cannot be null'); + } + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $is_eid Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + if (is_null($is_eid)) { + throw new InvalidArgumentException('non-nullable is_eid cannot be null'); + } + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + if (is_null($signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable signing_redirect_url cannot be null'); + } + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $use_text_tags Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + if (is_null($use_text_tags)) { + throw new InvalidArgumentException('non-nullable use_text_tags cannot be null'); + } + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $expires_at When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + if (is_null($expires_at)) { + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php new file mode 100644 index 000000000..c7f839f75 --- /dev/null +++ b/sdks/php/src/Model/SignatureRequestEditWithTemplateRequest.php @@ -0,0 +1,956 @@ + + */ +class SignatureRequestEditWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'client_id' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'template_ids' => false, + 'signers' => false, + 'allow_decline' => false, + 'ccs' => false, + 'client_id' => false, + 'custom_fields' => false, + 'files' => false, + 'file_urls' => false, + 'is_eid' => false, + 'message' => false, + 'metadata' => false, + 'signing_options' => false, + 'signing_redirect_url' => false, + 'subject' => false, + 'test_mode' => false, + 'title' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'client_id' => 'client_id', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'is_eid' => 'is_eid', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'signing_redirect_url' => 'signing_redirect_url', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('template_ids', $data ?? [], null); + $this->setIfExists('signers', $data ?? [], null); + $this->setIfExists('allow_decline', $data ?? [], false); + $this->setIfExists('ccs', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('custom_fields', $data ?? [], null); + $this->setIfExists('files', $data ?? [], null); + $this->setIfExists('file_urls', $data ?? [], null); + $this->setIfExists('is_eid', $data ?? [], false); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('signing_options', $data ?? [], null); + $this->setIfExists('signing_redirect_url', $data ?? [], null); + $this->setIfExists('subject', $data ?? [], null); + $this->setIfExists('test_mode', $data ?? [], false); + $this->setIfExists('title', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SignatureRequestEditWithTemplateRequest + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SignatureRequestEditWithTemplateRequest + { + /** @var SignatureRequestEditWithTemplateRequest */ + return ObjectSerializer::deserialize( + $data, + SignatureRequestEditWithTemplateRequest::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + if (is_null($template_ids)) { + throw new InvalidArgumentException('non-nullable template_ids cannot be null'); + } + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + if (is_null($signers)) { + throw new InvalidArgumentException('non-nullable signers cannot be null'); + } + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + if (is_null($allow_decline)) { + throw new InvalidArgumentException('non-nullable allow_decline cannot be null'); + } + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + if (is_null($ccs)) { + throw new InvalidArgumentException('non-nullable ccs cannot be null'); + } + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $client_id Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + * + * @return self + */ + public function setClientId(?string $client_id) + { + if (is_null($client_id)) { + throw new InvalidArgumentException('non-nullable client_id cannot be null'); + } + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + if (is_null($custom_fields)) { + throw new InvalidArgumentException('non-nullable custom_fields cannot be null'); + } + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + if (is_null($files)) { + throw new InvalidArgumentException('non-nullable files cannot be null'); + } + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + if (is_null($file_urls)) { + throw new InvalidArgumentException('non-nullable file_urls cannot be null'); + } + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $is_eid Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + if (is_null($is_eid)) { + throw new InvalidArgumentException('non-nullable is_eid cannot be null'); + } + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if (mb_strlen($message) > 5000) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + if (is_null($metadata)) { + throw new InvalidArgumentException('non-nullable metadata cannot be null'); + } + + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + if (is_null($signing_options)) { + throw new InvalidArgumentException('non-nullable signing_options cannot be null'); + } + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + if (is_null($signing_redirect_url)) { + throw new InvalidArgumentException('non-nullable signing_redirect_url cannot be null'); + } + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (is_null($subject)) { + throw new InvalidArgumentException('non-nullable subject cannot be null'); + } + if (mb_strlen($subject) > 255) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + if (is_null($test_mode)) { + throw new InvalidArgumentException('non-nullable test_mode cannot be null'); + } + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if (mb_strlen($title) > 255) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/SignatureRequestGetResponse.php b/sdks/php/src/Model/SignatureRequestGetResponse.php index 97f5f7c9f..d976e4932 100644 --- a/sdks/php/src/Model/SignatureRequestGetResponse.php +++ b/sdks/php/src/Model/SignatureRequestGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_request', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestListResponse.php b/sdks/php/src/Model/SignatureRequestListResponse.php index 659908071..5d9a26926 100644 --- a/sdks/php/src/Model/SignatureRequestListResponse.php +++ b/sdks/php/src/Model/SignatureRequestListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_requests', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestRemindRequest.php b/sdks/php/src/Model/SignatureRequestRemindRequest.php index 5662351ef..1c5eaefbd 100644 --- a/sdks/php/src/Model/SignatureRequestRemindRequest.php +++ b/sdks/php/src/Model/SignatureRequestRemindRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestResponse.php b/sdks/php/src/Model/SignatureRequestResponse.php index 08442f436..16a8fccf3 100644 --- a/sdks/php/src/Model/SignatureRequestResponse.php +++ b/sdks/php/src/Model/SignatureRequestResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -375,10 +375,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('test_mode', $data ?? [], false); $this->setIfExists('signature_request_id', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestResponseAttachment.php b/sdks/php/src/Model/SignatureRequestResponseAttachment.php index 245930a52..8a91a0b96 100644 --- a/sdks/php/src/Model/SignatureRequestResponseAttachment.php +++ b/sdks/php/src/Model/SignatureRequestResponseAttachment.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('signer', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php index bfa753e11..9d88d03f9 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php index d16c804e7..983134b39 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php index 4115fc171..6c4a94396 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php b/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php index c9f4ea0a2..f441dd572 100644 --- a/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php +++ b/sdks/php/src/Model/SignatureRequestResponseCustomFieldTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/SignatureRequestResponseDataBase.php b/sdks/php/src/Model/SignatureRequestResponseDataBase.php index 5f473fe7f..063b8a164 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataBase.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('api_id', $data ?? [], null); $this->setIfExists('signature_id', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php b/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php index fd4b6e268..f8768e419 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php index c64a1fbc7..e295a3a78 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php index 96ac1dd3e..bb808a601 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueCheckboxMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php b/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php index 78c8794e0..b422b6f5f 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php b/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php index 4171a5860..e91201360 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php b/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php index 25ed14574..9cd07e08b 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -233,10 +233,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php b/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php index 0c05b0bc9..fcd4570eb 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php b/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php index b72a8c1fc..223ca960f 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -233,10 +233,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueText.php b/sdks/php/src/Model/SignatureRequestResponseDataValueText.php index f4ddd0ff3..7c1c97b22 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueText.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php b/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php index ef64d4b8e..d8ea246f6 100644 --- a/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php +++ b/sdks/php/src/Model/SignatureRequestResponseDataValueTextMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -227,10 +227,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SignatureRequestResponseSignatures.php b/sdks/php/src/Model/SignatureRequestResponseSignatures.php index 081ebb6d3..fa7653fa2 100644 --- a/sdks/php/src/Model/SignatureRequestResponseSignatures.php +++ b/sdks/php/src/Model/SignatureRequestResponseSignatures.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -339,10 +339,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_id', $data ?? [], null); $this->setIfExists('signer_group_guid', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestSendRequest.php b/sdks/php/src/Model/SignatureRequestSendRequest.php index 600ee133e..f381a8d85 100644 --- a/sdks/php/src/Model/SignatureRequestSendRequest.php +++ b/sdks/php/src/Model/SignatureRequestSendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -381,10 +381,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('files', $data ?? [], null); $this->setIfExists('file_urls', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php b/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php index c58096632..6f4cd28ff 100644 --- a/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php +++ b/sdks/php/src/Model/SignatureRequestSendWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -328,10 +328,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_ids', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/sdks/php/src/Model/SignatureRequestUpdateRequest.php b/sdks/php/src/Model/SignatureRequestUpdateRequest.php index 2a4a33dcf..c946720ca 100644 --- a/sdks/php/src/Model/SignatureRequestUpdateRequest.php +++ b/sdks/php/src/Model/SignatureRequestUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/SubAttachment.php b/sdks/php/src/Model/SubAttachment.php index d41f3459c..ab6bfb504 100644 --- a/sdks/php/src/Model/SubAttachment.php +++ b/sdks/php/src/Model/SubAttachment.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('signer_index', $data ?? [], null); diff --git a/sdks/php/src/Model/SubBulkSignerList.php b/sdks/php/src/Model/SubBulkSignerList.php index d9702bb7d..1ac8d7818 100644 --- a/sdks/php/src/Model/SubBulkSignerList.php +++ b/sdks/php/src/Model/SubBulkSignerList.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('custom_fields', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/sdks/php/src/Model/SubBulkSignerListCustomField.php b/sdks/php/src/Model/SubBulkSignerListCustomField.php index 17f67ac95..1f1580517 100644 --- a/sdks/php/src/Model/SubBulkSignerListCustomField.php +++ b/sdks/php/src/Model/SubBulkSignerListCustomField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('value', $data ?? [], null); diff --git a/sdks/php/src/Model/SubCC.php b/sdks/php/src/Model/SubCC.php index 0380a3889..2febcebb2 100644 --- a/sdks/php/src/Model/SubCC.php +++ b/sdks/php/src/Model/SubCC.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/SubCustomField.php b/sdks/php/src/Model/SubCustomField.php index e853f9eb1..4cf6dddee 100644 --- a/sdks/php/src/Model/SubCustomField.php +++ b/sdks/php/src/Model/SubCustomField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('editor', $data ?? [], null); diff --git a/sdks/php/src/Model/SubEditorOptions.php b/sdks/php/src/Model/SubEditorOptions.php index cd15d5965..dc6d1e59a 100644 --- a/sdks/php/src/Model/SubEditorOptions.php +++ b/sdks/php/src/Model/SubEditorOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('allow_edit_signers', $data ?? [], false); $this->setIfExists('allow_edit_documents', $data ?? [], false); diff --git a/sdks/php/src/Model/SubFieldOptions.php b/sdks/php/src/Model/SubFieldOptions.php index 974daa4a9..a74afbd7b 100644 --- a/sdks/php/src/Model/SubFieldOptions.php +++ b/sdks/php/src/Model/SubFieldOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -255,10 +255,10 @@ public function getDateFormatAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('date_format', $data ?? [], null); } diff --git a/sdks/php/src/Model/SubFormFieldGroup.php b/sdks/php/src/Model/SubFormFieldGroup.php index 2ff53e101..ba06d9be9 100644 --- a/sdks/php/src/Model/SubFormFieldGroup.php +++ b/sdks/php/src/Model/SubFormFieldGroup.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('group_id', $data ?? [], null); $this->setIfExists('group_label', $data ?? [], null); diff --git a/sdks/php/src/Model/SubFormFieldRule.php b/sdks/php/src/Model/SubFormFieldRule.php index 094d8217c..41c47e642 100644 --- a/sdks/php/src/Model/SubFormFieldRule.php +++ b/sdks/php/src/Model/SubFormFieldRule.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -248,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('trigger_operator', $data ?? [], 'AND'); diff --git a/sdks/php/src/Model/SubFormFieldRuleAction.php b/sdks/php/src/Model/SubFormFieldRuleAction.php index 458b5822f..39e7c0c87 100644 --- a/sdks/php/src/Model/SubFormFieldRuleAction.php +++ b/sdks/php/src/Model/SubFormFieldRuleAction.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -238,8 +238,10 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_FIELD_VISIBILITY = 'change-field-visibility'; - public const TYPE_GROUP_VISIBILITY = 'change-group-visibility'; + public const TYPE_CHANGE_FIELD_VISIBILITY = 'change-field-visibility'; + public const TYPE_FIELD_VISIBILITY = self::TYPE_CHANGE_FIELD_VISIBILITY; + public const TYPE_CHANGE_GROUP_VISIBILITY = 'change-group-visibility'; + public const TYPE_GROUP_VISIBILITY = self::TYPE_CHANGE_GROUP_VISIBILITY; /** * Gets allowable values of the enum @@ -249,8 +251,8 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_FIELD_VISIBILITY, - self::TYPE_GROUP_VISIBILITY, + self::TYPE_CHANGE_FIELD_VISIBILITY, + self::TYPE_CHANGE_GROUP_VISIBILITY, ]; } @@ -264,10 +266,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('hidden', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/sdks/php/src/Model/SubFormFieldRuleTrigger.php b/sdks/php/src/Model/SubFormFieldRuleTrigger.php index 0ab5768e0..75fecd35c 100644 --- a/sdks/php/src/Model/SubFormFieldRuleTrigger.php +++ b/sdks/php/src/Model/SubFormFieldRuleTrigger.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -270,10 +270,10 @@ public function getOperatorAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('operator', $data ?? [], null); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php b/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php index 68158bf5a..085791ea9 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -291,10 +291,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('document_index', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php index c023916c7..c7610dfe4 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -234,10 +234,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php index c3924079b..24ddfbfdd 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentCheckboxMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php b/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php index 5902025ad..1e917ae01 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php b/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php index 121c3eb48..f26d663f3 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php b/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php index bc0eff196..2e9bb512f 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentFontEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php b/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php index 924429f26..f9c93531f 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php b/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php index cfddb0495..d74b4ad1a 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php b/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php index b506baa56..962382cc2 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -234,10 +234,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php b/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php index 37c6e7a15..b4c228bb6 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentText.php b/sdks/php/src/Model/SubFormFieldsPerDocumentText.php index fa048a12b..1cb1f6e8f 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentText.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -357,10 +357,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php b/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php index bfe22420e..2f1fb28c4 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentTextMerge.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getFontFamilyAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php b/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php index 4a4294f5e..47c4c1d45 100644 --- a/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php +++ b/sdks/php/src/Model/SubFormFieldsPerDocumentTypeEnum.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** diff --git a/sdks/php/src/Model/SubMergeField.php b/sdks/php/src/Model/SubMergeField.php index 8631a07e4..3b72a78ab 100644 --- a/sdks/php/src/Model/SubMergeField.php +++ b/sdks/php/src/Model/SubMergeField.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -252,10 +252,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/sdks/php/src/Model/SubOAuth.php b/sdks/php/src/Model/SubOAuth.php index 2bbf85547..39c24d80e 100644 --- a/sdks/php/src/Model/SubOAuth.php +++ b/sdks/php/src/Model/SubOAuth.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -265,10 +265,10 @@ public function getScopesAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('callback_url', $data ?? [], null); $this->setIfExists('scopes', $data ?? [], null); diff --git a/sdks/php/src/Model/SubOptions.php b/sdks/php/src/Model/SubOptions.php index b86fa5b7f..4493687d0 100644 --- a/sdks/php/src/Model/SubOptions.php +++ b/sdks/php/src/Model/SubOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('can_insert_everywhere', $data ?? [], false); } diff --git a/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php b/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php index 2d15bc241..5405a1142 100644 --- a/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php +++ b/sdks/php/src/Model/SubSignatureRequestGroupedSigners.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('group', $data ?? [], null); $this->setIfExists('signers', $data ?? [], null); diff --git a/sdks/php/src/Model/SubSignatureRequestSigner.php b/sdks/php/src/Model/SubSignatureRequestSigner.php index 64133e165..23043b15a 100644 --- a/sdks/php/src/Model/SubSignatureRequestSigner.php +++ b/sdks/php/src/Model/SubSignatureRequestSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -276,10 +276,10 @@ public function getSmsPhoneNumberTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php b/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php index 15070e31f..caf7d9078 100644 --- a/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php +++ b/sdks/php/src/Model/SubSignatureRequestTemplateSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -276,10 +276,10 @@ public function getSmsPhoneNumberTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SubSigningOptions.php b/sdks/php/src/Model/SubSigningOptions.php index 8cbaff0f0..bdb9f4ecf 100644 --- a/sdks/php/src/Model/SubSigningOptions.php +++ b/sdks/php/src/Model/SubSigningOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -275,10 +275,10 @@ public function getDefaultTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('default_type', $data ?? [], null); $this->setIfExists('draw', $data ?? [], false); diff --git a/sdks/php/src/Model/SubTeamResponse.php b/sdks/php/src/Model/SubTeamResponse.php index 60ecc442a..def81afc0 100644 --- a/sdks/php/src/Model/SubTeamResponse.php +++ b/sdks/php/src/Model/SubTeamResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SubTemplateRole.php b/sdks/php/src/Model/SubTemplateRole.php index 2678da93a..489a376a5 100644 --- a/sdks/php/src/Model/SubTemplateRole.php +++ b/sdks/php/src/Model/SubTemplateRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); diff --git a/sdks/php/src/Model/SubUnclaimedDraftSigner.php b/sdks/php/src/Model/SubUnclaimedDraftSigner.php index acc466356..4d9b3ec8f 100644 --- a/sdks/php/src/Model/SubUnclaimedDraftSigner.php +++ b/sdks/php/src/Model/SubUnclaimedDraftSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php b/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php index 9daffb1e4..52544c118 100644 --- a/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php +++ b/sdks/php/src/Model/SubUnclaimedDraftTemplateSigner.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('role', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/SubWhiteLabelingOptions.php b/sdks/php/src/Model/SubWhiteLabelingOptions.php index 0abcbd111..5eafd34ad 100644 --- a/sdks/php/src/Model/SubWhiteLabelingOptions.php +++ b/sdks/php/src/Model/SubWhiteLabelingOptions.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -331,10 +331,10 @@ public function getLegalVersionAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('header_background_color', $data ?? [], '#1a1a1a'); $this->setIfExists('legal_version', $data ?? [], 'terms1'); diff --git a/sdks/php/src/Model/TeamAddMemberRequest.php b/sdks/php/src/Model/TeamAddMemberRequest.php index e38abb02f..c1fbe01a8 100644 --- a/sdks/php/src/Model/TeamAddMemberRequest.php +++ b/sdks/php/src/Model/TeamAddMemberRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -262,10 +262,10 @@ public function getRoleAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamCreateRequest.php b/sdks/php/src/Model/TeamCreateRequest.php index 6ba37cc71..791ab93b5 100644 --- a/sdks/php/src/Model/TeamCreateRequest.php +++ b/sdks/php/src/Model/TeamCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], 'Untitled Team'); } diff --git a/sdks/php/src/Model/TeamGetInfoResponse.php b/sdks/php/src/Model/TeamGetInfoResponse.php index cfac0efbb..58c58f6dd 100644 --- a/sdks/php/src/Model/TeamGetInfoResponse.php +++ b/sdks/php/src/Model/TeamGetInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamGetResponse.php b/sdks/php/src/Model/TeamGetResponse.php index 6d23ddc3b..05624a166 100644 --- a/sdks/php/src/Model/TeamGetResponse.php +++ b/sdks/php/src/Model/TeamGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamInfoResponse.php b/sdks/php/src/Model/TeamInfoResponse.php index 3d5ad124a..7deb94ad8 100644 --- a/sdks/php/src/Model/TeamInfoResponse.php +++ b/sdks/php/src/Model/TeamInfoResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -254,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('team_parent', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamInviteResponse.php b/sdks/php/src/Model/TeamInviteResponse.php index d37dae050..b9d91658c 100644 --- a/sdks/php/src/Model/TeamInviteResponse.php +++ b/sdks/php/src/Model/TeamInviteResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email_address', $data ?? [], null); $this->setIfExists('team_id', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamInvitesResponse.php b/sdks/php/src/Model/TeamInvitesResponse.php index 31b58b939..5ad2014f0 100644 --- a/sdks/php/src/Model/TeamInvitesResponse.php +++ b/sdks/php/src/Model/TeamInvitesResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_invites', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamMemberResponse.php b/sdks/php/src/Model/TeamMemberResponse.php index ee61fbdd3..89141eb9b 100644 --- a/sdks/php/src/Model/TeamMemberResponse.php +++ b/sdks/php/src/Model/TeamMemberResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamMembersResponse.php b/sdks/php/src/Model/TeamMembersResponse.php index 681ad9af1..87a3fda3f 100644 --- a/sdks/php/src/Model/TeamMembersResponse.php +++ b/sdks/php/src/Model/TeamMembersResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_members', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamParentResponse.php b/sdks/php/src/Model/TeamParentResponse.php index d0d447285..bfd6cc6f8 100644 --- a/sdks/php/src/Model/TeamParentResponse.php +++ b/sdks/php/src/Model/TeamParentResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('team_id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamRemoveMemberRequest.php b/sdks/php/src/Model/TeamRemoveMemberRequest.php index 6d7413255..6c411d53a 100644 --- a/sdks/php/src/Model/TeamRemoveMemberRequest.php +++ b/sdks/php/src/Model/TeamRemoveMemberRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -274,10 +274,10 @@ public function getNewRoleAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamResponse.php b/sdks/php/src/Model/TeamResponse.php index 402916a49..922c408b8 100644 --- a/sdks/php/src/Model/TeamResponse.php +++ b/sdks/php/src/Model/TeamResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('accounts', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamSubTeamsResponse.php b/sdks/php/src/Model/TeamSubTeamsResponse.php index e3e9206c2..367149d34 100644 --- a/sdks/php/src/Model/TeamSubTeamsResponse.php +++ b/sdks/php/src/Model/TeamSubTeamsResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_teams', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/TeamUpdateRequest.php b/sdks/php/src/Model/TeamUpdateRequest.php index 6606b7676..c63114671 100644 --- a/sdks/php/src/Model/TeamUpdateRequest.php +++ b/sdks/php/src/Model/TeamUpdateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateAddUserRequest.php b/sdks/php/src/Model/TemplateAddUserRequest.php index ea87103ad..fa235f3c8 100644 --- a/sdks/php/src/Model/TemplateAddUserRequest.php +++ b/sdks/php/src/Model/TemplateAddUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php index fe626a83a..79ce3b26a 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -375,10 +375,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php index 49266a669..ca85bf0ad 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php index 44031ce16..324766d2f 100644 --- a/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php +++ b/sdks/php/src/Model/TemplateCreateEmbeddedDraftResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('edit_url', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateRequest.php b/sdks/php/src/Model/TemplateCreateRequest.php index ec6890622..ddeab0295 100644 --- a/sdks/php/src/Model/TemplateCreateRequest.php +++ b/sdks/php/src/Model/TemplateCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -333,10 +333,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('form_fields_per_document', $data ?? [], null); $this->setIfExists('signer_roles', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateResponse.php b/sdks/php/src/Model/TemplateCreateResponse.php index e17ce910a..3fe65f194 100644 --- a/sdks/php/src/Model/TemplateCreateResponse.php +++ b/sdks/php/src/Model/TemplateCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateCreateResponseTemplate.php b/sdks/php/src/Model/TemplateCreateResponseTemplate.php index 199aa3f74..7baaf00cb 100644 --- a/sdks/php/src/Model/TemplateCreateResponseTemplate.php +++ b/sdks/php/src/Model/TemplateCreateResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -231,10 +231,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateEditResponse.php b/sdks/php/src/Model/TemplateEditResponse.php index 0ef5462cf..3374ff2c3 100644 --- a/sdks/php/src/Model/TemplateEditResponse.php +++ b/sdks/php/src/Model/TemplateEditResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateGetResponse.php b/sdks/php/src/Model/TemplateGetResponse.php index 45b89ba15..321b66702 100644 --- a/sdks/php/src/Model/TemplateGetResponse.php +++ b/sdks/php/src/Model/TemplateGetResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateListResponse.php b/sdks/php/src/Model/TemplateListResponse.php index 49974663e..df656f237 100644 --- a/sdks/php/src/Model/TemplateListResponse.php +++ b/sdks/php/src/Model/TemplateListResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -242,10 +242,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('templates', $data ?? [], null); $this->setIfExists('list_info', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateRemoveUserRequest.php b/sdks/php/src/Model/TemplateRemoveUserRequest.php index d7a8582f9..29407ca6d 100644 --- a/sdks/php/src/Model/TemplateRemoveUserRequest.php +++ b/sdks/php/src/Model/TemplateRemoveUserRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponse.php b/sdks/php/src/Model/TemplateResponse.php index 6bc51cfb9..69492ed9d 100644 --- a/sdks/php/src/Model/TemplateResponse.php +++ b/sdks/php/src/Model/TemplateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -321,10 +321,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseAccount.php b/sdks/php/src/Model/TemplateResponseAccount.php index 47ddefabe..c2cc5fb9c 100644 --- a/sdks/php/src/Model/TemplateResponseAccount.php +++ b/sdks/php/src/Model/TemplateResponseAccount.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('account_id', $data ?? [], null); $this->setIfExists('email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseAccountQuota.php b/sdks/php/src/Model/TemplateResponseAccountQuota.php index 46386d6ec..f88bd937c 100644 --- a/sdks/php/src/Model/TemplateResponseAccountQuota.php +++ b/sdks/php/src/Model/TemplateResponseAccountQuota.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -249,10 +249,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('templates_left', $data ?? [], null); $this->setIfExists('api_signature_requests_left', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseCCRole.php b/sdks/php/src/Model/TemplateResponseCCRole.php index 06ee33219..a9db0181e 100644 --- a/sdks/php/src/Model/TemplateResponseCCRole.php +++ b/sdks/php/src/Model/TemplateResponseCCRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateResponseDocument.php b/sdks/php/src/Model/TemplateResponseDocument.php index 02a88387d..c2f75fcf9 100644 --- a/sdks/php/src/Model/TemplateResponseDocument.php +++ b/sdks/php/src/Model/TemplateResponseDocument.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -260,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('index', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php index 011502522..30dcb7f43 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php index 7ec8dc018..28b195cb6 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php index e63a73978..84beb6eda 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentCustomFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -246,10 +246,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php b/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php index 541714841..b58429dca 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFieldGroup.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('rule', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php b/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php index 1bd31bde9..6c9324b54 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFieldGroupRule.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('requirement', $data ?? [], null); $this->setIfExists('group_label', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php index ecc03a7db..2562903cf 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -279,10 +279,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php index a30010fc1..3b72e3cc0 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php index bd6072350..342281d3c 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php index 3e4a827da..dd4cfc015 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php index 687269f79..01e3b912c 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php index 101a6e955..f20e10da5 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php index 8fd494678..5052ea63d 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php index 777777464..6ba169c16 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -228,10 +228,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php index 42c15b9ed..afb433174 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentFormFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -290,10 +290,10 @@ public function getValidationTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php index bd18e1847..fc632b95a 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldBase.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -285,10 +285,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('api_id', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php index 9739d2e05..1f583ce91 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldCheckbox.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php index 911febf8d..5ae56b512 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDateSigned.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php index 6022f9289..8c424a9b2 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldDropdown.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php index 246bea450..218bbb068 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldHyperlink.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php index 339b3a2a5..ce7701354 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldInitials.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php index 8dc139712..ae47e8afb 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldRadio.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php index c86d1c9a3..c0da5a2d5 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldSignature.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php index ec89541e3..246a22dae 100644 --- a/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php +++ b/sdks/php/src/Model/TemplateResponseDocumentStaticFieldText.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -222,10 +222,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php b/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php index 9277db26a..6fbb12d83 100644 --- a/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php +++ b/sdks/php/src/Model/TemplateResponseFieldAvgTextLength.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('num_lines', $data ?? [], null); $this->setIfExists('num_chars_per_line', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateResponseSignerRole.php b/sdks/php/src/Model/TemplateResponseSignerRole.php index 98a80c6e0..9d62bf4c7 100644 --- a/sdks/php/src/Model/TemplateResponseSignerRole.php +++ b/sdks/php/src/Model/TemplateResponseSignerRole.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateUpdateFilesRequest.php b/sdks/php/src/Model/TemplateUpdateFilesRequest.php index 7c165ff7d..2f87773e4 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesRequest.php +++ b/sdks/php/src/Model/TemplateUpdateFilesRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/sdks/php/src/Model/TemplateUpdateFilesResponse.php b/sdks/php/src/Model/TemplateUpdateFilesResponse.php index d8080fb74..de4fb8bbb 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesResponse.php +++ b/sdks/php/src/Model/TemplateUpdateFilesResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -230,10 +230,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template', $data ?? [], null); } diff --git a/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php b/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php index 70d2e87dc..4f112b637 100644 --- a/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php +++ b/sdks/php/src/Model/TemplateUpdateFilesResponseTemplate.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('template_id', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php index 8d4a7e3e2..9d42586b0 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -458,10 +458,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('requester_email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php index df0b1df69..b96ad7c30 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -405,10 +405,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('requester_email_address', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftCreateRequest.php b/sdks/php/src/Model/UnclaimedDraftCreateRequest.php index 1d55c2c1b..89b665f5c 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -386,10 +386,10 @@ public function getTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftCreateResponse.php b/sdks/php/src/Model/UnclaimedDraftCreateResponse.php index fb93528ef..d6c1043c1 100644 --- a/sdks/php/src/Model/UnclaimedDraftCreateResponse.php +++ b/sdks/php/src/Model/UnclaimedDraftCreateResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -236,10 +236,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('unclaimed_draft', $data ?? [], null); $this->setIfExists('warnings', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php b/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php index 5669e4848..56a60c50b 100644 --- a/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php +++ b/sdks/php/src/Model/UnclaimedDraftEditAndResendRequest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -272,10 +272,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client_id', $data ?? [], null); $this->setIfExists('editor_options', $data ?? [], null); diff --git a/sdks/php/src/Model/UnclaimedDraftResponse.php b/sdks/php/src/Model/UnclaimedDraftResponse.php index da1c26359..774aae3f7 100644 --- a/sdks/php/src/Model/UnclaimedDraftResponse.php +++ b/sdks/php/src/Model/UnclaimedDraftResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -261,10 +261,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('signature_request_id', $data ?? [], null); $this->setIfExists('claim_url', $data ?? [], null); diff --git a/sdks/php/src/Model/WarningResponse.php b/sdks/php/src/Model/WarningResponse.php index 4c37010a0..309277392 100644 --- a/sdks/php/src/Model/WarningResponse.php +++ b/sdks/php/src/Model/WarningResponse.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -237,10 +237,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[]|null $data Associated array of property values + * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('warning_msg', $data ?? [], null); $this->setIfExists('warning_name', $data ?? [], null); diff --git a/sdks/php/src/ObjectSerializer.php b/sdks/php/src/ObjectSerializer.php index 958cd8e04..f8022100b 100644 --- a/sdks/php/src/ObjectSerializer.php +++ b/sdks/php/src/ObjectSerializer.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 3.0.0 * Contact: apisupport@hellosign.com * Generated by: https://openapi-generator.tech - * Generator version: 7.8.0 + * Generator version: 7.12.0 */ /** @@ -60,12 +60,12 @@ public static function setDateTimeFormat(string $format) * Serialize data * * @param string|int|object|array|mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization($data, string $type = null, string $format = null) + public static function sanitizeForSerialization($data, ?string $type = null, ?string $format = null) { if (is_scalar($data) || null === $data) { return $data; @@ -197,6 +197,10 @@ private static function isEmptyValue($value, string $openApiType): bool case 'boolean': return !in_array($value, [false, 0], true); + // For string values, '' is considered empty. + case 'string': + return $value === ''; + // For all the other types, any value at this point can be considered empty. default: return true; @@ -400,11 +404,11 @@ public static function serializeCollection(array $collection, string $style, boo * * @param string|int|object|array|mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ - public static function deserialize($data, string $class, array $httpHeaders = null) + public static function deserialize($data, string $class, ?array $httpHeaders = null) { if (null === $data) { return null; diff --git a/sdks/php/templates/Configuration.mustache b/sdks/php/templates/Configuration.mustache index 1dadde97c..384dcfbcf 100644 --- a/sdks/php/templates/Configuration.mustache +++ b/sdks/php/templates/Configuration.mustache @@ -555,7 +555,7 @@ class Configuration * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/sdks/php/templates/HeaderSelector.mustache b/sdks/php/templates/HeaderSelector.mustache index 1921b0610..d5c284cfe 100644 --- a/sdks/php/templates/HeaderSelector.mustache +++ b/sdks/php/templates/HeaderSelector.mustache @@ -76,7 +76,7 @@ class HeaderSelector } # If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -86,6 +86,34 @@ class HeaderSelector return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + * + * @param string $searchString + * @return bool + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + * + * @param array $mimeList + * @return array + */ + private function selectJsonMimeList(array $mimeList): array { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/sdks/php/templates/ObjectSerializer.mustache b/sdks/php/templates/ObjectSerializer.mustache index 281ed61db..4437c693c 100644 --- a/sdks/php/templates/ObjectSerializer.mustache +++ b/sdks/php/templates/ObjectSerializer.mustache @@ -57,8 +57,8 @@ class ObjectSerializer {{#useCustomTemplateCode}} * @param string|int|object|array|mixed $data the data to serialize {{/useCustomTemplateCode}} - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -207,6 +207,10 @@ class ObjectSerializer case 'boolean': return !in_array($value, [false, 0], true); + # For string values, '' is considered empty. + case 'string': + return $value === ''; + # For all the other types, any value at this point can be considered empty. default: return true; @@ -428,7 +432,7 @@ class ObjectSerializer * @param string|int|object|array|mixed $data object or primitive to be deserialized {{/useCustomTemplateCode}} * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ diff --git a/sdks/php/templates/api.mustache b/sdks/php/templates/api.mustache index 927ce19e3..cbcd7efb7 100644 --- a/sdks/php/templates/api.mustache +++ b/sdks/php/templates/api.mustache @@ -86,10 +86,10 @@ use Psr\Http\Message\ResponseInterface; * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} @@ -100,13 +100,16 @@ use Psr\Http\Message\ResponseInterface; * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - Configuration $config = null, - ClientInterface $client = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?Configuration $config = null, + ?ClientInterface $client = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { {{/useCustomTemplateCode}} $this->client = $client ?: new Client(); + {{^useCustomTemplateCode}} + $this->config = $config ?: Configuration::getDefaultConfiguration(); + {{/useCustomTemplateCode}} $this->config = $config ?: new Configuration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; @@ -193,7 +196,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{^useCustomTemplateCode}} {{#servers}} @@ -262,7 +265,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -311,18 +314,6 @@ use Psr\Http\Message\ResponseInterface; $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } {{#returnType}} {{#useCustomTemplateCode}} {{#responses}}{{#dataType}}{{#isRange}} @@ -375,6 +366,19 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/responses}} + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '{{{returnType}}}'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -469,7 +473,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -534,7 +538,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -627,7 +631,7 @@ use Psr\Http\Message\ResponseInterface; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} {{#servers}} {{#-first}} @@ -780,6 +784,11 @@ use Psr\Http\Message\ResponseInterface; } {{/formParams}} + {{^useCustomTemplateCode}} + {{#isMultipart}} + $multipart = true; + {{/isMultipart}} + {{/useCustomTemplateCode}} $headers = $this->headerSelector->selectHeaders( {{^useCustomTemplateCode}} [{{#produces}}'{{{mediaType}}}', {{/produces}}], diff --git a/sdks/php/templates/libraries/psr-18/ApiException.mustache b/sdks/php/templates/libraries/psr-18/ApiException.mustache index 336d8f7c5..1b7d1a65a 100644 --- a/sdks/php/templates/libraries/psr-18/ApiException.mustache +++ b/sdks/php/templates/libraries/psr-18/ApiException.mustache @@ -58,8 +58,8 @@ class ApiException extends RequestException public function __construct( $message, RequestInterface $request, - ResponseInterface $response = null, - Exception $previous = null + ?ResponseInterface $response = null, + ?Exception $previous = null ) { parent::__construct($message, $request, $previous); if ($response) { @@ -90,7 +90,7 @@ class ApiException extends RequestException } /** - * Sets the deseralized response object (during deserialization) + * Sets the deserialized response object (during deserialization) * {{^useCustomTemplateCode}} * @param mixed $obj Deserialized response object @@ -108,7 +108,7 @@ class ApiException extends RequestException } /** - * Gets the deseralized response object (during deserialization) + * Gets the deserialized response object (during deserialization) * * @return mixed the deserialized response object */ diff --git a/sdks/php/templates/libraries/psr-18/api.mustache b/sdks/php/templates/libraries/psr-18/api.mustache index 6138ab176..7b286d94d 100644 --- a/sdks/php/templates/libraries/psr-18/api.mustache +++ b/sdks/php/templates/libraries/psr-18/api.mustache @@ -95,13 +95,13 @@ use function sprintf; protected $streamFactory; public function __construct( - ClientInterface $httpClient = null, - Configuration $config = null, - HttpAsyncClient $httpAsyncClient = null, - UriFactoryInterface $uriFactory = null, - RequestFactoryInterface $requestFactory = null, - StreamFactoryInterface $streamFactory = null, - HeaderSelector $selector = null, + ?ClientInterface $httpClient = null, + ?Configuration $config = null, + ?HttpAsyncClient $httpAsyncClient = null, + ?UriFactoryInterface $uriFactory = null, + ?RequestFactoryInterface $requestFactory = null, + ?StreamFactoryInterface $streamFactory = null, + ?HeaderSelector $selector = null, ?array $plugins = null, $hostIndex = 0 ) { @@ -181,7 +181,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -219,7 +219,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -342,7 +342,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -383,7 +383,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -448,7 +448,7 @@ use function sprintf; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. {{/-first}} * URL: {{{url}}} {{#-last}} @@ -613,7 +613,7 @@ use function sprintf; // for model (json/xml) {{#bodyParams}} if (isset(${{paramName}})) { - if ($headers['Content-Type'] === 'application/json') { + if ($this->headerSelector->isJsonMime($headers['Content-Type'])) { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization(${{paramName}})); } else { $httpBody = ${{paramName}}; @@ -637,7 +637,7 @@ use function sprintf; // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); - } elseif ($headers['Content-Type'] === 'application/json') { + } elseif ($this->headerSelector->isJsonMime($headers['Content-Type'])) { $httpBody = json_encode($formParams); } else { diff --git a/sdks/php/templates/model_enum.mustache b/sdks/php/templates/model_enum.mustache index 77001f2e6..86d022506 100644 --- a/sdks/php/templates/model_enum.mustache +++ b/sdks/php/templates/model_enum.mustache @@ -5,7 +5,12 @@ class {{classname}} */ {{#allowableValues}} {{#enumVars}} - public const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; + {{#enumDescription}} + /** + * {{enumDescription}} + */ + {{/enumDescription}} + public const {{{name}}} = {{{value}}}; {{/enumVars}} {{/allowableValues}} @@ -18,7 +23,7 @@ class {{classname}} return [ {{#allowableValues}} {{#enumVars}} - self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}}, + self::{{{name}}}{{^-last}}, {{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/sdks/php/templates/model_generic.mustache b/sdks/php/templates/model_generic.mustache index 3b213dd3b..8838e1837 100644 --- a/sdks/php/templates/model_generic.mustache +++ b/sdks/php/templates/model_generic.mustache @@ -231,10 +231,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { {{#parentSchema}} parent::__construct($data); @@ -452,6 +452,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par $allowedValues = $this->{{getter}}AllowableValues(); {{^isContainer}} if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}!in_array(${{{name}}}, $allowedValues, true)) { + {{#enumUnknownDefaultCase}} + ${{name}} = {{#allowableValues}}{{#enumVars}}{{#-last}}self::{{enumName}}_{{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}} + {{/enumUnknownDefaultCase}} + {{^enumUnknownDefaultCase}} throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for '{{name}}', must be one of '%s'", @@ -459,6 +463,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par implode("', '", $allowedValues) ) ); + {{/enumUnknownDefaultCase}} } {{/isContainer}} {{#isContainer}} diff --git a/sdks/python/.gitlab-ci.yml b/sdks/python/.gitlab-ci.yml index e038c25db..ccd6d9bd1 100644 --- a/sdks/python/.gitlab-ci.yml +++ b/sdks/python/.gitlab-ci.yml @@ -14,9 +14,6 @@ stages: - pip install -r test-requirements.txt - pytest --cov=dropbox_sign -pytest-3.7: - extends: .pytest - image: python:3.7-alpine pytest-3.8: extends: .pytest image: python:3.8-alpine @@ -29,3 +26,6 @@ pytest-3.10: pytest-3.11: extends: .pytest image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine diff --git a/sdks/python/.travis.yml b/sdks/python/.travis.yml index 6b47ff20f..757c4eee0 100644 --- a/sdks/python/.travis.yml +++ b/sdks/python/.travis.yml @@ -1,13 +1,13 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch + #- "3.12-dev" # 3.12 development branch #- "nightly" # nightly build # command to install dependencies install: diff --git a/sdks/python/README.md b/sdks/python/README.md index 77ebb1aa4..18cdf1ba8 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -42,14 +42,14 @@ this command. ### Requirements. -Python 3.7+ +Python 3.8+ ### pip Install using `pip`: ```shell -python3 -m pip install dropbox-sign==1.8-dev +python3 -m pip install dropbox-sign==1.9.0-dev ``` Alternatively: @@ -69,29 +69,30 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountCreateRequest( + account_create_request = models.AccountCreateRequest( email_address="newuser@dropboxsign.com", ) try: - response = account_api.account_create(data) + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi#account_create: %s\n" % e) ``` @@ -116,7 +117,7 @@ Class | Method | HTTP request | Description |```EmbeddedApi``` | [```embedded_edit_url```](docs/EmbeddedApi.md#embedded_edit_url) | ```POST /embedded/edit_url/{template_id}``` | Get Embedded Template Edit URL| ```EmbeddedApi``` | [```embedded_sign_url```](docs/EmbeddedApi.md#embedded_sign_url) | ```GET /embedded/sign_url/{signature_id}``` | Get Embedded Sign URL| |```FaxApi``` | [```fax_delete```](docs/FaxApi.md#fax_delete) | ```DELETE /fax/{fax_id}``` | Delete Fax| -```FaxApi``` | [```fax_files```](docs/FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | List Fax Files| +```FaxApi``` | [```fax_files```](docs/FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | Download Fax Files| ```FaxApi``` | [```fax_get```](docs/FaxApi.md#fax_get) | ```GET /fax/{fax_id}``` | Get Fax| ```FaxApi``` | [```fax_list```](docs/FaxApi.md#fax_list) | ```GET /fax/list``` | Lists Faxes| ```FaxApi``` | [```fax_send```](docs/FaxApi.md#fax_send) | ```POST /fax/send``` | Send Fax| @@ -135,6 +136,10 @@ Class | Method | HTTP request | Description ```SignatureRequestApi``` | [```signature_request_cancel```](docs/SignatureRequestApi.md#signature_request_cancel) | ```POST /signature_request/cancel/{signature_request_id}``` | Cancel Incomplete Signature Request| ```SignatureRequestApi``` | [```signature_request_create_embedded```](docs/SignatureRequestApi.md#signature_request_create_embedded) | ```POST /signature_request/create_embedded``` | Create Embedded Signature Request| ```SignatureRequestApi``` | [```signature_request_create_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | ```POST /signature_request/create_embedded_with_template``` | Create Embedded Signature Request with Template| +```SignatureRequestApi``` | [```signature_request_edit```](docs/SignatureRequestApi.md#signature_request_edit) | ```PUT /signature_request/edit/{signature_request_id}``` | Edit Signature Request| +```SignatureRequestApi``` | [```signature_request_edit_embedded```](docs/SignatureRequestApi.md#signature_request_edit_embedded) | ```PUT /signature_request/edit_embedded/{signature_request_id}``` | Edit Embedded Signature Request| +```SignatureRequestApi``` | [```signature_request_edit_embedded_with_template```](docs/SignatureRequestApi.md#signature_request_edit_embedded_with_template) | ```PUT /signature_request/edit_embedded_with_template/{signature_request_id}``` | Edit Embedded Signature Request with Template| +```SignatureRequestApi``` | [```signature_request_edit_with_template```](docs/SignatureRequestApi.md#signature_request_edit_with_template) | ```PUT /signature_request/edit_with_template/{signature_request_id}``` | Edit Signature Request With Template| ```SignatureRequestApi``` | [```signature_request_files```](docs/SignatureRequestApi.md#signature_request_files) | ```GET /signature_request/files/{signature_request_id}``` | Download Files| ```SignatureRequestApi``` | [```signature_request_files_as_data_uri```](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | ```GET /signature_request/files_as_data_uri/{signature_request_id}``` | Download Files as Data Uri| ```SignatureRequestApi``` | [```signature_request_files_as_file_url```](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | ```GET /signature_request/files_as_file_url/{signature_request_id}``` | Download Files as File Url| @@ -238,6 +243,10 @@ Class | Method | HTTP request | Description - [SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) @@ -391,6 +400,6 @@ apisupport@hellosign.com This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.8-dev +- Package version: 1.9.0-dev - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/sdks/python/VERSION b/sdks/python/VERSION index d82db9132..b57588e59 100644 --- a/sdks/python/VERSION +++ b/sdks/python/VERSION @@ -1 +1 @@ -1.8-dev +1.9.0-dev diff --git a/sdks/python/bin/generate-examples.php b/sdks/python/bin/generate-examples.php index ff3b6d302..dc872e59d 100755 --- a/sdks/python/bin/generate-examples.php +++ b/sdks/python/bin/generate-examples.php @@ -271,4 +271,3 @@ protected function getReplaceCodeString( $generate->setUseSnakeCase(true); $generate->run(); - diff --git a/sdks/python/bin/replace b/sdks/python/bin/replace index a9ebab9a7..1199c95b8 100755 --- a/sdks/python/bin/replace +++ b/sdks/python/bin/replace @@ -23,6 +23,6 @@ rep () { done } -rep 'Union\[StrictBytes, StrictStr\]' 'Union[StrictBytes, StrictStr, io.IOBase]' +rep 'Union\[StrictBytes, StrictStr, Tuple\[StrictStr, StrictBytes\]\]' 'Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]' printf "\n" diff --git a/sdks/python/docs/AccountApi.md b/sdks/python/docs/AccountApi.md index ce6cc0f36..baf60a9f2 100644 --- a/sdks/python/docs/AccountApi.md +++ b/sdks/python/docs/AccountApi.md @@ -23,29 +23,30 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountCreateRequest( + account_create_request = models.AccountCreateRequest( email_address="newuser@dropboxsign.com", ) try: - response = account_api.account_create(data) + response = api.AccountApi(api_client).account_create( + account_create_request=account_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi#account_create: %s\n" % e) ``` ``` @@ -90,25 +91,24 @@ Returns the properties and settings of your Account. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - try: - response = account_api.account_get(email_address="jack@example.com") + response = api.AccountApi(api_client).account_get() + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi#account_get: %s\n" % e) ``` ``` @@ -154,29 +154,31 @@ Updates the properties and settings of your Account. Currently only allows for u * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountUpdateRequest( + account_update_request = models.AccountUpdateRequest( callback_url="https://www.example.com/callback", + locale="en-US", ) try: - response = account_api.account_update(data) + response = api.AccountApi(api_client).account_update( + account_update_request=account_update_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi#account_update: %s\n" % e) ``` ``` @@ -221,29 +223,30 @@ Verifies whether an Dropbox Sign Account exists for the given email address. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - account_api = apis.AccountApi(api_client) - - data = models.AccountVerifyRequest( + account_verify_request = models.AccountVerifyRequest( email_address="some_user@dropboxsign.com", ) try: - response = account_api.account_verify(data) + response = api.AccountApi(api_client).account_verify( + account_verify_request=account_verify_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling AccountApi#account_verify: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/AccountCreateRequest.md b/sdks/python/docs/AccountCreateRequest.md index a804661a3..6801084e8 100644 --- a/sdks/python/docs/AccountCreateRequest.md +++ b/sdks/python/docs/AccountCreateRequest.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountCreateResponse.md b/sdks/python/docs/AccountCreateResponse.md index 9b1be1204..4e24e96e3 100644 --- a/sdks/python/docs/AccountCreateResponse.md +++ b/sdks/python/docs/AccountCreateResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountGetResponse.md b/sdks/python/docs/AccountGetResponse.md index 0c1254038..05c765487 100644 --- a/sdks/python/docs/AccountGetResponse.md +++ b/sdks/python/docs/AccountGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountResponse.md b/sdks/python/docs/AccountResponse.md index 26ce76bd1..fe7f8da48 100644 --- a/sdks/python/docs/AccountResponse.md +++ b/sdks/python/docs/AccountResponse.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountResponseQuotas.md b/sdks/python/docs/AccountResponseQuotas.md index 189447310..c487703cb 100644 --- a/sdks/python/docs/AccountResponseQuotas.md +++ b/sdks/python/docs/AccountResponseQuotas.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountResponseUsage.md b/sdks/python/docs/AccountResponseUsage.md index dd99429af..62eba4dc0 100644 --- a/sdks/python/docs/AccountResponseUsage.md +++ b/sdks/python/docs/AccountResponseUsage.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountUpdateRequest.md b/sdks/python/docs/AccountUpdateRequest.md index 5ef47ebd9..cddccf437 100644 --- a/sdks/python/docs/AccountUpdateRequest.md +++ b/sdks/python/docs/AccountUpdateRequest.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountVerifyRequest.md b/sdks/python/docs/AccountVerifyRequest.md index 9dc6f46d5..477b47f9a 100644 --- a/sdks/python/docs/AccountVerifyRequest.md +++ b/sdks/python/docs/AccountVerifyRequest.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountVerifyResponse.md b/sdks/python/docs/AccountVerifyResponse.md index 2f0c5416b..46194d739 100644 --- a/sdks/python/docs/AccountVerifyResponse.md +++ b/sdks/python/docs/AccountVerifyResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/AccountVerifyResponseAccount.md b/sdks/python/docs/AccountVerifyResponseAccount.md index 9c4abee31..b2f7d7142 100644 --- a/sdks/python/docs/AccountVerifyResponseAccount.md +++ b/sdks/python/docs/AccountVerifyResponseAccount.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppApi.md b/sdks/python/docs/ApiAppApi.md index 9b982da37..2ee0a39e0 100644 --- a/sdks/python/docs/ApiAppApi.md +++ b/sdks/python/docs/ApiAppApi.md @@ -24,23 +24,24 @@ Creates a new API App. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - oauth = models.SubOAuth( callback_url="https://example.com/oauth", - scopes=["basic_account_info" "request_signature"], + scopes=[ + "basic_account_info", + "request_signature", + ], ) white_labeling_options = models.SubWhiteLabelingOptions( @@ -48,21 +49,24 @@ with ApiClient(configuration) as api_client: primary_button_text_color="#ffffff", ) - custom_logo_file = open("./CustomLogoFile.png", "rb") - - data = models.ApiAppCreateRequest( + api_app_create_request = models.ApiAppCreateRequest( name="My Production App", - domains=["example.com"], + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), oauth=oauth, white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, ) try: - response = api_app_api.api_app_create(data) + response = api.ApiAppApi(api_client).api_app_create( + api_app_create_request=api_app_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ApiAppApi#api_app_create: %s\n" % e) ``` ``` @@ -107,24 +111,24 @@ Deletes an API App. Can only be invoked for apps you own. * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import ApiClient, ApiException, Configuration, apis +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - try: - api_app_api.api_app_delete(client_id) + api.ApiAppApi(api_client).api_app_delete( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ApiAppApi#api_app_delete: %s\n" % e) ``` ``` @@ -169,27 +173,26 @@ Returns an object with information about an API App. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - try: - response = api_app_api.api_app_get(client_id) + response = api.ApiAppApi(api_client).api_app_get( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ApiAppApi#api_app_get: %s\n" % e) ``` ``` @@ -234,31 +237,27 @@ Returns a list of API Apps that are accessible by you. If you are on a team with * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) - - page = 1 - page_size = 2 - try: - response = api_app_api.api_app_list( - page=page, - page_size=page_size, + response = api.ApiAppApi(api_client).api_app_list( + page=1, + page_size=20, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ApiAppApi#api_app_list: %s\n" % e) ``` ``` @@ -304,41 +303,51 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - api_app_api = apis.ApiAppApi(api_client) + oauth = models.SubOAuth( + callback_url="https://example.com/oauth", + scopes=[ + "basic_account_info", + "request_signature", + ], + ) white_labeling_options = models.SubWhiteLabelingOptions( primary_button_color="#00b3e6", primary_button_text_color="#ffffff", ) - custom_logo_file = open("./CustomLogoFile.png", "rb") - - data = models.ApiAppUpdateRequest( + api_app_update_request = models.ApiAppUpdateRequest( + callback_url="https://example.com/dropboxsign", name="New Name", - callback_url="http://example.com/dropboxsign", + domains=[ + "example.com", + ], + custom_logo_file=open("CustomLogoFile.png", "rb").read(), + oauth=oauth, white_labeling_options=white_labeling_options, - custom_logo_file=custom_logo_file, ) - client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - try: - response = api_app_api.api_app_update(client_id, data) + response = api.ApiAppApi(api_client).api_app_update( + client_id="0dd3b823a682527788c4e40cb7b6f7e9", + api_app_update_request=api_app_update_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ApiAppApi#api_app_update: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/ApiAppCreateRequest.md b/sdks/python/docs/ApiAppCreateRequest.md index 9cac62afc..206b7539a 100644 --- a/sdks/python/docs/ApiAppCreateRequest.md +++ b/sdks/python/docs/ApiAppCreateRequest.md @@ -15,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppGetResponse.md b/sdks/python/docs/ApiAppGetResponse.md index 7d45c86fe..d94e9df43 100644 --- a/sdks/python/docs/ApiAppGetResponse.md +++ b/sdks/python/docs/ApiAppGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppListResponse.md b/sdks/python/docs/ApiAppListResponse.md index b41af4e62..71bdba50e 100644 --- a/sdks/python/docs/ApiAppListResponse.md +++ b/sdks/python/docs/ApiAppListResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppResponse.md b/sdks/python/docs/ApiAppResponse.md index ae25a38c4..88660ac54 100644 --- a/sdks/python/docs/ApiAppResponse.md +++ b/sdks/python/docs/ApiAppResponse.md @@ -18,3 +18,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppResponseOAuth.md b/sdks/python/docs/ApiAppResponseOAuth.md index 0c18e5f1e..58a6a1e16 100644 --- a/sdks/python/docs/ApiAppResponseOAuth.md +++ b/sdks/python/docs/ApiAppResponseOAuth.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppResponseOptions.md b/sdks/python/docs/ApiAppResponseOptions.md index 42f8144e5..a96d6de0b 100644 --- a/sdks/python/docs/ApiAppResponseOptions.md +++ b/sdks/python/docs/ApiAppResponseOptions.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppResponseOwnerAccount.md b/sdks/python/docs/ApiAppResponseOwnerAccount.md index 9b8e22f08..b1cd337a1 100644 --- a/sdks/python/docs/ApiAppResponseOwnerAccount.md +++ b/sdks/python/docs/ApiAppResponseOwnerAccount.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md index 375c8f2cf..ae742c2e9 100644 --- a/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md +++ b/sdks/python/docs/ApiAppResponseWhiteLabelingOptions.md @@ -22,3 +22,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ApiAppUpdateRequest.md b/sdks/python/docs/ApiAppUpdateRequest.md index 6e3238a61..58a3f8a18 100644 --- a/sdks/python/docs/ApiAppUpdateRequest.md +++ b/sdks/python/docs/ApiAppUpdateRequest.md @@ -15,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/BulkSendJobApi.md b/sdks/python/docs/BulkSendJobApi.md index cfff86e43..0e045f5ff 100644 --- a/sdks/python/docs/BulkSendJobApi.md +++ b/sdks/python/docs/BulkSendJobApi.md @@ -21,27 +21,28 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - try: - response = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) + response = api.BulkSendJobApi(api_client).bulk_send_job_get( + bulk_send_job_id="6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", + page=1, + page_size=20, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling BulkSendJobApi#bulk_send_job_get: %s\n" % e) ``` ``` @@ -88,31 +89,27 @@ Returns a list of BulkSendJob that you can access. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - bulk_send_job_api = apis.BulkSendJobApi(api_client) - - page = 1 - page_size = 20 - try: - response = bulk_send_job_api.bulk_send_job_list( - page=page, - page_size=page_size, + response = api.BulkSendJobApi(api_client).bulk_send_job_list( + page=1, + page_size=20, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling BulkSendJobApi#bulk_send_job_list: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/BulkSendJobGetResponse.md b/sdks/python/docs/BulkSendJobGetResponse.md index a39bcb8bb..8f141cb2c 100644 --- a/sdks/python/docs/BulkSendJobGetResponse.md +++ b/sdks/python/docs/BulkSendJobGetResponse.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md index 9314ae4a6..b697653fd 100644 --- a/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md +++ b/sdks/python/docs/BulkSendJobGetResponseSignatureRequests.md @@ -33,3 +33,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/BulkSendJobListResponse.md b/sdks/python/docs/BulkSendJobListResponse.md index 24c7abc17..2767d7101 100644 --- a/sdks/python/docs/BulkSendJobListResponse.md +++ b/sdks/python/docs/BulkSendJobListResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/BulkSendJobResponse.md b/sdks/python/docs/BulkSendJobResponse.md index 19e770fee..11a6322c2 100644 --- a/sdks/python/docs/BulkSendJobResponse.md +++ b/sdks/python/docs/BulkSendJobResponse.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/BulkSendJobSendResponse.md b/sdks/python/docs/BulkSendJobSendResponse.md index cf31a577a..a40845451 100644 --- a/sdks/python/docs/BulkSendJobSendResponse.md +++ b/sdks/python/docs/BulkSendJobSendResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EmbeddedApi.md b/sdks/python/docs/EmbeddedApi.md index 9de8a573e..9bf1d9dbc 100644 --- a/sdks/python/docs/EmbeddedApi.md +++ b/sdks/python/docs/EmbeddedApi.md @@ -21,32 +21,36 @@ Retrieves an embedded object containing a template url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) + merge_fields = [] - data = models.EmbeddedEditUrlRequest( - cc_roles=[""], - merge_fields=[], + embedded_edit_url_request = models.EmbeddedEditUrlRequest( + cc_roles=[ + "", + ], + merge_fields=merge_fields, ) - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - response = embedded_api.embedded_edit_url(template_id, data) + response = api.EmbeddedApi(api_client).embedded_edit_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + embedded_edit_url_request=embedded_edit_url_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling EmbeddedApi#embedded_edit_url: %s\n" % e) ``` ``` @@ -92,27 +96,26 @@ Retrieves an embedded object containing a signature url that can be opened in an * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - embedded_api = apis.EmbeddedApi(api_client) - - signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - try: - response = embedded_api.embedded_sign_url(signature_id) + response = api.EmbeddedApi(api_client).embedded_sign_url( + signature_id="50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling EmbeddedApi#embedded_sign_url: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/EmbeddedEditUrlRequest.md b/sdks/python/docs/EmbeddedEditUrlRequest.md index 6382a52ea..603d65bcf 100644 --- a/sdks/python/docs/EmbeddedEditUrlRequest.md +++ b/sdks/python/docs/EmbeddedEditUrlRequest.md @@ -18,3 +18,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EmbeddedEditUrlResponse.md b/sdks/python/docs/EmbeddedEditUrlResponse.md index e1f57817d..7cf3c1bac 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponse.md +++ b/sdks/python/docs/EmbeddedEditUrlResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md index ae396873f..f5e819aa7 100644 --- a/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedEditUrlResponseEmbedded.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EmbeddedSignUrlResponse.md b/sdks/python/docs/EmbeddedSignUrlResponse.md index af38fc763..e91d0759a 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponse.md +++ b/sdks/python/docs/EmbeddedSignUrlResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md index 71373c8e0..bf6fdbdae 100644 --- a/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md +++ b/sdks/python/docs/EmbeddedSignUrlResponseEmbedded.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ErrorResponse.md b/sdks/python/docs/ErrorResponse.md index dc83b8f7c..2f15b49a0 100644 --- a/sdks/python/docs/ErrorResponse.md +++ b/sdks/python/docs/ErrorResponse.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ErrorResponseError.md b/sdks/python/docs/ErrorResponseError.md index 9b0589046..f6052d69f 100644 --- a/sdks/python/docs/ErrorResponseError.md +++ b/sdks/python/docs/ErrorResponseError.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EventCallbackRequest.md b/sdks/python/docs/EventCallbackRequest.md index 857fac582..dd9655bf1 100644 --- a/sdks/python/docs/EventCallbackRequest.md +++ b/sdks/python/docs/EventCallbackRequest.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EventCallbackRequestEvent.md b/sdks/python/docs/EventCallbackRequestEvent.md index 6eadfcdeb..2675bbf3c 100644 --- a/sdks/python/docs/EventCallbackRequestEvent.md +++ b/sdks/python/docs/EventCallbackRequestEvent.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/EventCallbackRequestEventMetadata.md b/sdks/python/docs/EventCallbackRequestEventMetadata.md index d510eaeb4..35f31bb43 100644 --- a/sdks/python/docs/EventCallbackRequestEventMetadata.md +++ b/sdks/python/docs/EventCallbackRequestEventMetadata.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxApi.md b/sdks/python/docs/FaxApi.md index a0b2cbd12..431d0ca9f 100644 --- a/sdks/python/docs/FaxApi.md +++ b/sdks/python/docs/FaxApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- |[```fax_delete```](FaxApi.md#fax_delete) | ```DELETE /fax/{fax_id}``` | Delete Fax| -|[```fax_files```](FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | List Fax Files| +|[```fax_files```](FaxApi.md#fax_files) | ```GET /fax/files/{fax_id}``` | Download Fax Files| |[```fax_get```](FaxApi.md#fax_get) | ```GET /fax/{fax_id}``` | Get Fax| |[```fax_list```](FaxApi.md#fax_list) | ```GET /fax/list``` | Lists Faxes| |[```fax_send```](FaxApi.md#fax_send) | ```POST /fax/send``` | Send Fax| @@ -16,29 +16,30 @@ Method | HTTP request | Description Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - try: - fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") + api.FaxApi(api_client).fax_delete( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxApi#fax_delete: %s\n" % e) ``` ``` @@ -73,34 +74,34 @@ void (empty response body) # ```fax_files``` > ```io.IOBase fax_files(fax_id)``` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = fax_api.fax_files(fax_id) - open("file_response.pdf", "wb").write(response.read()) + response = api.FaxApi(api_client).fax_files( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + + open("./file_response", "wb").write(response.read()) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxApi#fax_files: %s\n" % e) ``` ``` @@ -137,32 +138,32 @@ with ApiClient(configuration) as api_client: Get Fax -Returns information about fax +Returns information about a Fax ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = fax_api.fax_get(fax_id) + response = api.FaxApi(api_client).fax_get( + fax_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxApi#fax_get: %s\n" % e) ``` ``` @@ -199,36 +200,33 @@ with ApiClient(configuration) as api_client: Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - page = 1 - page_size = 2 - try: - response = fax_api.fax_list( - page=page, - page_size=page_size, + response = api.FaxApi(api_client).fax_list( + page=1, + page_size=20, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxApi#fax_list: %s\n" % e) ``` ``` @@ -236,8 +234,8 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **int** | Page | [optional][default to 1] | -| `page_size` | **int** | Page size | [optional][default to 20] | +| `page` | **int** | Which page number of the Fax List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -266,41 +264,45 @@ with ApiClient(configuration) as api_client: Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_api = apis.FaxApi(api_client) - - data = models.FaxSendRequest( - files=[open("example_signature_request.pdf", "rb")], - test_mode=True, + fax_send_request = models.FaxSendRequest( recipient="16690000001", sender="16690000000", + test_mode=True, cover_page_to="Jill Fax", - cover_page_message="I'm sending you a fax!", cover_page_from="Faxer Faxerson", + cover_page_message="I'm sending you a fax!", title="This is what the fax is about!", + files=[ + open("./example_fax.pdf", "rb").read(), + ], ) try: - response = fax_api.fax_send(data) + response = api.FaxApi(api_client).fax_send( + fax_send_request=fax_send_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxApi#fax_send: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/FaxGetResponse.md b/sdks/python/docs/FaxGetResponse.md index 02b92d68d..094dc616c 100644 --- a/sdks/python/docs/FaxGetResponse.md +++ b/sdks/python/docs/FaxGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineAddUserRequest.md b/sdks/python/docs/FaxLineAddUserRequest.md index 9d2c5e199..71ba11c4b 100644 --- a/sdks/python/docs/FaxLineAddUserRequest.md +++ b/sdks/python/docs/FaxLineAddUserRequest.md @@ -5,9 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | +| `number`*_required_ | ```str``` | The Fax Line number | | | `account_id` | ```str``` | Account ID | | | `email_address` | ```str``` | Email address | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineApi.md b/sdks/python/docs/FaxLineApi.md index 27ec4d08b..4f1b2a4a4 100644 --- a/sdks/python/docs/FaxLineApi.md +++ b/sdks/python/docs/FaxLineApi.md @@ -25,28 +25,30 @@ Grants a user access to the specified Fax Line. * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineAddUserRequest( + fax_line_add_user_request = models.FaxLineAddUserRequest( number="[FAX_NUMBER]", email_address="member@dropboxsign.com", ) try: - response = fax_line_api.fax_line_add_user(data) + response = api.FaxLineApi(api_client).fax_line_add_user( + fax_line_add_user_request=fax_line_add_user_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_add_user: %s\n" % e) ``` ``` @@ -83,30 +85,32 @@ with ApiClient(configuration) as api_client: Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - try: - response = fax_line_api.fax_line_area_code_get("US", "CA") + response = api.FaxLineApi(api_client).fax_line_area_code_get( + country="US", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_area_code_get: %s\n" % e) ``` ``` @@ -114,10 +118,10 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `country` | **str** | Filter area codes by country. | | -| `state` | **str** | Filter area codes by state. | [optional] | -| `province` | **str** | Filter area codes by province. | [optional] | -| `city` | **str** | Filter area codes by city. | [optional] | +| `country` | **str** | Filter area codes by country | | +| `state` | **str** | Filter area codes by state | [optional] | +| `province` | **str** | Filter area codes by province | [optional] | +| `city` | **str** | Filter area codes by city | [optional] | ### Return type @@ -146,35 +150,37 @@ with ApiClient(configuration) as api_client: Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineCreateRequest( + fax_line_create_request = models.FaxLineCreateRequest( area_code=209, country="US", ) try: - response = fax_line_api.fax_line_create(data) + response = api.FaxLineApi(api_client).fax_line_create( + fax_line_create_request=fax_line_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_create: %s\n" % e) ``` ``` @@ -218,26 +224,27 @@ Deletes the specified Fax Line from the subscription. * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineDeleteRequest( + fax_line_delete_request = models.FaxLineDeleteRequest( number="[FAX_NUMBER]", ) try: - fax_line_api.fax_line_delete(data) + api.FaxLineApi(api_client).fax_line_delete( + fax_line_delete_request=fax_line_delete_request, + ) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_delete: %s\n" % e) ``` ``` @@ -281,23 +288,25 @@ Returns the properties and settings of a Fax Line. * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - try: - response = fax_line_api.fax_line_get("[FAX_NUMBER]") + response = api.FaxLineApi(api_client).fax_line_get( + number="123-123-1234", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_get: %s\n" % e) ``` ``` @@ -305,7 +314,7 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `number` | **str** | The Fax Line number. | | +| `number` | **str** | The Fax Line number | | ### Return type @@ -341,23 +350,27 @@ Returns the properties and settings of multiple Fax Lines. * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - try: - response = fax_line_api.fax_line_list() + response = api.FaxLineApi(api_client).fax_line_list( + account_id="ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page=1, + page_size=20, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_list: %s\n" % e) ``` ``` @@ -366,9 +379,9 @@ with ApiClient(configuration) as api_client: | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `account_id` | **str** | Account ID | [optional] | -| `page` | **int** | Page | [optional][default to 1] | -| `page_size` | **int** | Page size | [optional][default to 20] | -| `show_team_lines` | **bool** | Show team lines | [optional] | +| `page` | **int** | Which page number of the Fax Line List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **int** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `show_team_lines` | **bool** | Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -397,35 +410,37 @@ with ApiClient(configuration) as api_client: Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: - fax_line_api = apis.FaxLineApi(api_client) - - data = models.FaxLineRemoveUserRequest( + fax_line_remove_user_request = models.FaxLineRemoveUserRequest( number="[FAX_NUMBER]", email_address="member@dropboxsign.com", ) try: - response = fax_line_api.fax_line_remove_user(data) + response = api.FaxLineApi(api_client).fax_line_remove_user( + fax_line_remove_user_request=fax_line_remove_user_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling FaxLineApi#fax_line_remove_user: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md index 6ad763ece..3bb66b2db 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetCountryEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md index 71e241199..a5d0565be 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineAreaCodeGetResponse.md b/sdks/python/docs/FaxLineAreaCodeGetResponse.md index b7fc28ce7..f3ce2076b 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetResponse.md +++ b/sdks/python/docs/FaxLineAreaCodeGetResponse.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md index d62ba3abc..36b555f0d 100644 --- a/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md +++ b/sdks/python/docs/FaxLineAreaCodeGetStateEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineCreateRequest.md b/sdks/python/docs/FaxLineCreateRequest.md index b6b33b3ac..f28c43af7 100644 --- a/sdks/python/docs/FaxLineCreateRequest.md +++ b/sdks/python/docs/FaxLineCreateRequest.md @@ -5,10 +5,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `area_code`*_required_ | ```int``` | Area code | | -| `country`*_required_ | ```str``` | Country | | -| `city` | ```str``` | City | | -| `account_id` | ```str``` | Account ID | | +| `area_code`*_required_ | ```int``` | Area code of the new Fax Line | | +| `country`*_required_ | ```str``` | Country of the area code | | +| `city` | ```str``` | City of the area code | | +| `account_id` | ```str``` | Account ID of the account that will be assigned this new Fax Line | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineDeleteRequest.md b/sdks/python/docs/FaxLineDeleteRequest.md index ad6985a8e..b8e760760 100644 --- a/sdks/python/docs/FaxLineDeleteRequest.md +++ b/sdks/python/docs/FaxLineDeleteRequest.md @@ -5,7 +5,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | +| `number`*_required_ | ```str``` | The Fax Line number | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineListResponse.md b/sdks/python/docs/FaxLineListResponse.md index 7510777c0..bcea9547d 100644 --- a/sdks/python/docs/FaxLineListResponse.md +++ b/sdks/python/docs/FaxLineListResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineRemoveUserRequest.md b/sdks/python/docs/FaxLineRemoveUserRequest.md index 561ddea6d..2abb5201a 100644 --- a/sdks/python/docs/FaxLineRemoveUserRequest.md +++ b/sdks/python/docs/FaxLineRemoveUserRequest.md @@ -5,9 +5,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `number`*_required_ | ```str``` | The Fax Line number. | | -| `account_id` | ```str``` | Account ID | | -| `email_address` | ```str``` | Email address | | +| `number`*_required_ | ```str``` | The Fax Line number | | +| `account_id` | ```str``` | Account ID of the user to remove access | | +| `email_address` | ```str``` | Email address of the user to remove access | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineResponse.md b/sdks/python/docs/FaxLineResponse.md index d96759130..e16ea9415 100644 --- a/sdks/python/docs/FaxLineResponse.md +++ b/sdks/python/docs/FaxLineResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxLineResponseFaxLine.md b/sdks/python/docs/FaxLineResponseFaxLine.md index f3e14c0f7..426f94f65 100644 --- a/sdks/python/docs/FaxLineResponseFaxLine.md +++ b/sdks/python/docs/FaxLineResponseFaxLine.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxListResponse.md b/sdks/python/docs/FaxListResponse.md index e57c1881e..9d2eb82f6 100644 --- a/sdks/python/docs/FaxListResponse.md +++ b/sdks/python/docs/FaxListResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxResponse.md b/sdks/python/docs/FaxResponse.md index f8bc78c95..81070c5aa 100644 --- a/sdks/python/docs/FaxResponse.md +++ b/sdks/python/docs/FaxResponse.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxResponseTransmission.md b/sdks/python/docs/FaxResponseTransmission.md index fb60d8b5e..61263d698 100644 --- a/sdks/python/docs/FaxResponseTransmission.md +++ b/sdks/python/docs/FaxResponseTransmission.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FaxSendRequest.md b/sdks/python/docs/FaxSendRequest.md index cdb4f49a0..5f19b7374 100644 --- a/sdks/python/docs/FaxSendRequest.md +++ b/sdks/python/docs/FaxSendRequest.md @@ -5,15 +5,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -| `recipient`*_required_ | ```str``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```str``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```str``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```List[io.IOBase]``` | Fax File to Send | | -| `file_urls` | ```List[str]``` | Fax File URL to Send | | +| `files` | ```List[io.IOBase]``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```List[str]``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `test_mode` | ```bool``` | API Test Mode Setting | [default to False] | -| `cover_page_to` | ```str``` | Fax Cover Page for Recipient | | -| `cover_page_from` | ```str``` | Fax Cover Page for Sender | | +| `cover_page_to` | ```str``` | Fax cover page recipient information | | +| `cover_page_from` | ```str``` | Fax cover page sender information | | | `cover_page_message` | ```str``` | Fax Cover Page Message | | | `title` | ```str``` | Fax Title | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FileResponse.md b/sdks/python/docs/FileResponse.md index db7181024..93eb0b683 100644 --- a/sdks/python/docs/FileResponse.md +++ b/sdks/python/docs/FileResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/FileResponseDataUri.md b/sdks/python/docs/FileResponseDataUri.md index aae7f445b..fa83a3d4c 100644 --- a/sdks/python/docs/FileResponseDataUri.md +++ b/sdks/python/docs/FileResponseDataUri.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ListInfoResponse.md b/sdks/python/docs/ListInfoResponse.md index 57a30754e..5a5fd3257 100644 --- a/sdks/python/docs/ListInfoResponse.md +++ b/sdks/python/docs/ListInfoResponse.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/OAuthApi.md b/sdks/python/docs/OAuthApi.md index b26775683..21bd2df27 100644 --- a/sdks/python/docs/OAuthApi.md +++ b/sdks/python/docs/OAuthApi.md @@ -19,27 +19,31 @@ Once you have retrieved the code from the user callback, you will need to exchan ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration() with ApiClient(configuration) as api_client: - oauth_api = apis.OAuthApi(api_client) - - data = models.OAuthTokenGenerateRequest( - state="900e06e2", - code="1b0d28d90c86c141", + o_auth_token_generate_request = models.OAuthTokenGenerateRequest( client_id="cc91c61d00f8bb2ece1428035716b", client_secret="1d14434088507ffa390e6f5528465", + code="1b0d28d90c86c141", + state="900e06e2", + grant_type="authorization_code", ) try: - response = oauth_api.oauth_token_generate(data) + response = api.OAuthApi(api_client).oauth_token_generate( + o_auth_token_generate_request=o_auth_token_generate_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling OAuthApi#oauth_token_generate: %s\n" % e) ``` ``` @@ -82,24 +86,28 @@ Access tokens are only valid for a given period of time (typically one hour) for ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration() with ApiClient(configuration) as api_client: - oauth_api = apis.OAuthApi(api_client) - - data = models.OAuthTokenRefreshRequest( + o_auth_token_refresh_request = models.OAuthTokenRefreshRequest( + grant_type="refresh_token", refresh_token="hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3", ) try: - response = oauth_api.oauth_token_refresh(data) + response = api.OAuthApi(api_client).oauth_token_refresh( + o_auth_token_refresh_request=o_auth_token_refresh_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling OAuthApi#oauth_token_refresh: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/OAuthTokenGenerateRequest.md b/sdks/python/docs/OAuthTokenGenerateRequest.md index 9e53f7996..e2f1ab207 100644 --- a/sdks/python/docs/OAuthTokenGenerateRequest.md +++ b/sdks/python/docs/OAuthTokenGenerateRequest.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/OAuthTokenRefreshRequest.md b/sdks/python/docs/OAuthTokenRefreshRequest.md index 87662c9e1..3dd28092c 100644 --- a/sdks/python/docs/OAuthTokenRefreshRequest.md +++ b/sdks/python/docs/OAuthTokenRefreshRequest.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/OAuthTokenResponse.md b/sdks/python/docs/OAuthTokenResponse.md index a05a77d8e..5bea2b69d 100644 --- a/sdks/python/docs/OAuthTokenResponse.md +++ b/sdks/python/docs/OAuthTokenResponse.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ReportApi.md b/sdks/python/docs/ReportApi.md index 022e0c32b..0ddd8c376 100644 --- a/sdks/python/docs/ReportApi.md +++ b/sdks/python/docs/ReportApi.md @@ -12,38 +12,43 @@ Method | HTTP request | Description Create Report -Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. +Request the creation of one or more report(s). + +When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - report_api = apis.ReportApi(api_client) - - data = models.ReportCreateRequest( + report_create_request = models.ReportCreateRequest( start_date="09/01/2020", end_date="09/01/2020", - report_type=["user_activity" "document_status"], + report_type=[ + "user_activity", + "document_status", + ], ) try: - response = report_api.report_create(data) + response = api.ReportApi(api_client).report_create( + report_create_request=report_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling ReportApi#report_create: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/ReportCreateRequest.md b/sdks/python/docs/ReportCreateRequest.md index c14641c66..7485256cb 100644 --- a/sdks/python/docs/ReportCreateRequest.md +++ b/sdks/python/docs/ReportCreateRequest.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ReportCreateResponse.md b/sdks/python/docs/ReportCreateResponse.md index 2ffc8dcc9..46f850877 100644 --- a/sdks/python/docs/ReportCreateResponse.md +++ b/sdks/python/docs/ReportCreateResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/ReportResponse.md b/sdks/python/docs/ReportResponse.md index 381f19abb..2215e1f1a 100644 --- a/sdks/python/docs/ReportResponse.md +++ b/sdks/python/docs/ReportResponse.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestApi.md b/sdks/python/docs/SignatureRequestApi.md index 2db45f1a5..5bae70801 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ Method | HTTP request | Description |[```signature_request_cancel```](SignatureRequestApi.md#signature_request_cancel) | ```POST /signature_request/cancel/{signature_request_id}``` | Cancel Incomplete Signature Request| |[```signature_request_create_embedded```](SignatureRequestApi.md#signature_request_create_embedded) | ```POST /signature_request/create_embedded``` | Create Embedded Signature Request| |[```signature_request_create_embedded_with_template```](SignatureRequestApi.md#signature_request_create_embedded_with_template) | ```POST /signature_request/create_embedded_with_template``` | Create Embedded Signature Request with Template| +|[```signature_request_edit```](SignatureRequestApi.md#signature_request_edit) | ```PUT /signature_request/edit/{signature_request_id}``` | Edit Signature Request| +|[```signature_request_edit_embedded```](SignatureRequestApi.md#signature_request_edit_embedded) | ```PUT /signature_request/edit_embedded/{signature_request_id}``` | Edit Embedded Signature Request| +|[```signature_request_edit_embedded_with_template```](SignatureRequestApi.md#signature_request_edit_embedded_with_template) | ```PUT /signature_request/edit_embedded_with_template/{signature_request_id}``` | Edit Embedded Signature Request with Template| +|[```signature_request_edit_with_template```](SignatureRequestApi.md#signature_request_edit_with_template) | ```PUT /signature_request/edit_with_template/{signature_request_id}``` | Edit Signature Request With Template| |[```signature_request_files```](SignatureRequestApi.md#signature_request_files) | ```GET /signature_request/files/{signature_request_id}``` | Download Files| |[```signature_request_files_as_data_uri```](SignatureRequestApi.md#signature_request_files_as_data_uri) | ```GET /signature_request/files_as_data_uri/{signature_request_id}``` | Download Files as Data Uri| |[```signature_request_files_as_file_url```](SignatureRequestApi.md#signature_request_files_as_file_url) | ```GET /signature_request/files_as_file_url/{signature_request_id}``` | Download Files as File Url| @@ -27,85 +31,117 @@ Method | HTTP request | Description Embedded Bulk Send with Template -Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. +Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +**NOTE:** Only available for Standard plan and higher. ### Example * Basic Authentication (api_key): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", ) - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( name="company", value="ABC Corp", ) - signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], - ) + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", + name="George", + email_address="george@example.com", + pin="d79a3td", ) - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + + signer_list_1 = models.SubBulkSignerList( + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, ) signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, ) - cc_1 = models.SubCC( + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( role="Accounting", email_address="accounting@example.com", ) - data = models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( - client_id="1a659d9ad95bccd307ecad78d72192f8", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], - test_mode=True, + ccs = [ + ccs_1, + ] + + signature_request_bulk_create_embedded_with_template_request = ( + models.SignatureRequestBulkCreateEmbeddedWithTemplateRequest( + client_id="1a659d9ad95bccd307ecad78d72192f8", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) ) try: - response = ( - signature_request_api.signature_request_bulk_create_embedded_with_template( - data - ) + response = api.SignatureRequestApi( + api_client + ).signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: %s\n" + % e + ) ``` ``` @@ -142,7 +178,9 @@ with ApiClient(configuration) as api_client: Bulk Send with Template -Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. +Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. + +**NOTE:** Only available for Standard plan and higher. ### Example @@ -150,73 +188,517 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) + signer_list_2_custom_fields_1 = models.SubBulkSignerListCustomField( + name="company", + value="123 LLC", + ) + + signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, + ] - signer_list_1_signer = models.SubSignatureRequestTemplateSigner( + signer_list_2_signers_1 = models.SubSignatureRequestTemplateSigner( role="Client", - name="George", - email_address="george@example.com", - pin="d79a3td", + name="Mary", + email_address="mary@example.com", + pin="gd9as5b", ) - signer_list_1_custom_fields = models.SubBulkSignerListCustomField( + signer_list_2_signers = [ + signer_list_2_signers_1, + ] + + signer_list_1_custom_fields_1 = models.SubBulkSignerListCustomField( name="company", value="ABC Corp", ) + signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, + ] + + signer_list_1_signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + pin="d79a3td", + ) + + signer_list_1_signers = [ + signer_list_1_signers_1, + ] + signer_list_1 = models.SubBulkSignerList( - signers=[signer_list_1_signer], - custom_fields=[signer_list_1_custom_fields], + custom_fields=signer_list_1_custom_fields, + signers=signer_list_1_signers, + ) + + signer_list_2 = models.SubBulkSignerList( + custom_fields=signer_list_2_custom_fields, + signers=signer_list_2_signers, + ) + + signer_list = [ + signer_list_1, + signer_list_2, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + signature_request_bulk_send_with_template_request = ( + models.SignatureRequestBulkSendWithTemplateRequest( + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signer_list=signer_list, + ccs=ccs, + ) + ) + + try: + response = api.SignatureRequestApi( + api_client + ).signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, + ) + + pprint(response) + except ApiException as e: + print( + "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: %s\n" + % e + ) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_bulk_send_with_template_request` | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md) | | | + +### Return type + +[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```signature_request_cancel``` +> ```signature_request_cancel(signature_request_id)``` + +Cancel Incomplete Signature Request + +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. + +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. + +**NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + try: + api.SignatureRequestApi(api_client).signature_request_cancel( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + except ApiException as e: + print( + "Exception when calling SignatureRequestApi#signature_request_cancel: %s\n" + % e + ) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_id` | **str** | The id of the incomplete SignatureRequest to cancel. | | + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```signature_request_create_embedded``` +> ```SignatureRequestGetResponse signature_request_create_embedded(signature_request_create_embedded_request)``` + +Create Embedded Signature Request + +Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_create_embedded_request = models.SignatureRequestCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) + + try: + response = api.SignatureRequestApi( + api_client + ).signature_request_create_embedded( + signature_request_create_embedded_request=signature_request_create_embedded_request, + ) + + pprint(response) + except ApiException as e: + print( + "Exception when calling SignatureRequestApi#signature_request_create_embedded: %s\n" + % e + ) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_create_embedded_request` | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```signature_request_create_embedded_with_template``` +> ```SignatureRequestGetResponse signature_request_create_embedded_with_template(signature_request_create_embedded_with_template_request)``` + +Create Embedded Signature Request with Template + +Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, ) - signer_list_2_signer = models.SubSignatureRequestTemplateSigner( + signers_1 = models.SubSignatureRequestTemplateSigner( role="Client", - name="Mary", - email_address="mary@example.com", - pin="gd9as5b", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_create_embedded_with_template_request = ( + models.SignatureRequestCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) + ) + + try: + response = api.SignatureRequestApi( + api_client + ).signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, + ) + + pprint(response) + except ApiException as e: + print( + "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: %s\n" + % e + ) + +``` +``` + +### Parameters +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_create_embedded_with_template_request` | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### 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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# ```signature_request_edit``` +> ```SignatureRequestGetResponse signature_request_edit(signature_request_id, signature_request_edit_request)``` + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +* Basic Authentication (api_key): +* Bearer (JWT) Authentication (oauth2): + +```python +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models + +configuration = Configuration( + username="YOUR_API_KEY", + # access_token="YOUR_ACCESS_TOKEN", +) + +with ApiClient(configuration) as api_client: + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", ) - signer_list_2_custom_fields = models.SubBulkSignerListCustomField( - name="company", - value="123 LLC", + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, ) - signer_list_2 = models.SubBulkSignerList( - signers=[signer_list_2_signer], - custom_fields=[signer_list_2_custom_fields], + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, ) - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, ) - data = models.SignatureRequestBulkSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signer_list=[signer_list_1, signer_list_2], - ccs=[cc_1], + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_request = models.SignatureRequestEditRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads( + """ + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """ + ), + field_options=field_options, + signing_options=signing_options, + signers=signers, ) try: - response = signature_request_api.signature_request_bulk_send_with_template(data) + response = api.SignatureRequestApi(api_client).signature_request_edit( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_request=signature_request_edit_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_edit: %s\n" + % e + ) ``` ``` @@ -224,11 +706,12 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `signature_request_bulk_send_with_template_request` | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md) | | | +| `signature_request_id` | **str** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_request` | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md) | | | ### Return type -[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) ### Authorization @@ -248,12 +731,12 @@ with ApiClient(configuration) as api_client: [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# ```signature_request_cancel``` -> ```signature_request_cancel(signature_request_id)``` +# ```signature_request_edit_embedded``` +> ```SignatureRequestGetResponse signature_request_edit_embedded(signature_request_id, signature_request_edit_embedded_request)``` -Cancel Incomplete Signature Request +Edit Embedded Signature Request -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. 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. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### Example @@ -261,24 +744,72 @@ Cancels an incomplete signature request. This action is **not reversible**. The * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import ApiClient, ApiException, Configuration, apis +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) + + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, + ) + + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" + signers = [ + signers_1, + signers_2, + ] + + signature_request_edit_embedded_request = models.SignatureRequestEditEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", + subject="The NDA we talked about", + test_mode=True, + title="NDA with Acme Co.", + cc_email_addresses=[ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signing_options=signing_options, + signers=signers, + ) try: - signature_request_api.signature_request_cancel(signature_request_id) + response = api.SignatureRequestApi(api_client).signature_request_edit_embedded( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + ) + + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_edit_embedded: %s\n" + % e + ) ``` ``` @@ -286,11 +817,12 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `signature_request_id` | **str** | The id of the incomplete SignatureRequest to cancel. | | +| `signature_request_id` | **str** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_embedded_request` | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md) | | | ### Return type -void (empty response body) +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) ### Authorization @@ -298,7 +830,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json, multipart/form-data - **Accept**: application/json ### HTTP response details @@ -310,12 +842,12 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# ```signature_request_create_embedded``` -> ```SignatureRequestGetResponse signature_request_create_embedded(signature_request_create_embedded_request)``` +# ```signature_request_edit_embedded_with_template``` +> ```SignatureRequestGetResponse signature_request_edit_embedded_with_template(signature_request_id, signature_request_edit_embedded_with_template_request)``` -Create Embedded Signature Request +Edit Embedded Signature Request with Template -Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. ### Example @@ -323,57 +855,64 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - signing_options = models.SubSigningOptions( + default_type="draw", draw=True, + phone=False, type=True, upload=True, - phone=True, - default_type="draw", ) - data = models.SignatureRequestCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - title="NDA with Acme Co.", - subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"], - files=[open("example_signature_request.pdf", "rb")], - signing_options=signing_options, - test_mode=True, + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + signature_request_edit_embedded_with_template_request = ( + models.SignatureRequestEditEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + template_ids=[ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ) ) try: - response = signature_request_api.signature_request_create_embedded(data) + response = api.SignatureRequestApi( + api_client + ).signature_request_edit_embedded_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: %s\n" + % e + ) ``` ``` @@ -381,7 +920,8 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `signature_request_create_embedded_request` | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md) | | | +| `signature_request_id` | **str** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_embedded_with_template_request` | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md) | | | ### Return type @@ -405,12 +945,14 @@ with ApiClient(configuration) as api_client: [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# ```signature_request_create_embedded_with_template``` -> ```SignatureRequestGetResponse signature_request_create_embedded_with_template(signature_request_create_embedded_with_template_request)``` +# ```signature_request_edit_with_template``` +> ```SignatureRequestGetResponse signature_request_edit_with_template(signature_request_id, signature_request_edit_with_template_request)``` -Create Embedded Signature Request with Template +Edit Signature Request With Template -Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + +**NOTE:** Edit and resend will not deduct your signature request quota. ### Example @@ -418,51 +960,85 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestTemplateSigner( - role="Client", - email_address="jack@example.com", - name="Jack", - ) - signing_options = models.SubSigningOptions( + default_type="draw", draw=True, + phone=False, type=True, upload=True, - phone=True, - default_type="draw", ) - data = models.SignatureRequestCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - signing_options=signing_options, - test_mode=True, + signers_1 = models.SubSignatureRequestTemplateSigner( + role="Client", + name="George", + email_address="george@example.com", + ) + + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@example.com", + ) + + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( + name="Cost", + editor="Client", + required=True, + value="$20,000", + ) + + custom_fields = [ + custom_fields_1, + ] + + signature_request_edit_with_template_request = ( + models.SignatureRequestEditWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) ) try: - response = ( - signature_request_api.signature_request_create_embedded_with_template(data) + response = api.SignatureRequestApi( + api_client + ).signature_request_edit_with_template( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_edit_with_template_request=signature_request_edit_with_template_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_edit_with_template: %s\n" + % e + ) ``` ``` @@ -470,7 +1046,8 @@ with ApiClient(configuration) as api_client: ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `signature_request_create_embedded_with_template_request` | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md) | | | +| `signature_request_id` | **str** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_with_template_request` | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md) | | | ### Return type @@ -499,7 +1076,9 @@ with ApiClient(configuration) as api_client: Download Files -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + +If the files are currently being prepared, a status code of `409` will be returned instead. ### Example @@ -507,29 +1086,30 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = signature_request_api.signature_request_files( - signature_request_id, file_type="pdf" + response = api.SignatureRequestApi(api_client).signature_request_files( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + file_type="pdf", ) - open("file_response.pdf", "wb").write(response.read()) + + open("./file_response", "wb").write(response.read()) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_files: %s\n" + % e + ) ``` ``` @@ -567,7 +1147,9 @@ with ApiClient(configuration) as api_client: Download Files as Data Uri -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. ### Example @@ -575,29 +1157,31 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = signature_request_api.signature_request_files_as_data_uri( - signature_request_id + response = api.SignatureRequestApi( + api_client + ).signature_request_files_as_data_uri( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: %s\n" + % e + ) ``` ``` @@ -634,7 +1218,9 @@ with ApiClient(configuration) as api_client: Download Files as File Url -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. ### Example @@ -642,29 +1228,32 @@ Obtain a copy of the current documents specified by the `signature_request_id` p * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = signature_request_api.signature_request_files_as_file_url( - signature_request_id + response = api.SignatureRequestApi( + api_client + ).signature_request_files_as_file_url( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + force_download=1, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_files_as_file_url: %s\n" + % e + ) ``` ``` @@ -710,27 +1299,28 @@ Returns the status of the SignatureRequest specified by the `signature_request_i * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - try: - response = signature_request_api.signature_request_get(signature_request_id) + response = api.SignatureRequestApi(api_client).signature_request_get( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_get: %s\n" % e + ) ``` ``` @@ -767,7 +1357,9 @@ with ApiClient(configuration) as api_client: List Signature Requests -Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. +Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + +Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. ### Example @@ -775,31 +1367,30 @@ Returns a list of SignatureRequests that you can access. This includes Signature * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - account_id = None - page = 1 - try: - response = signature_request_api.signature_request_list( - account_id=account_id, - page=page, + response = api.SignatureRequestApi(api_client).signature_request_list( + page=1, + page_size=20, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_list: %s\n" + % e + ) ``` ``` @@ -847,29 +1438,29 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - try: - response = signature_request_api.signature_request_release_hold( - signature_request_id + response = api.SignatureRequestApi(api_client).signature_request_release_hold( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_release_hold: %s\n" + % e + ) ``` ``` @@ -906,7 +1497,9 @@ with ApiClient(configuration) as api_client: Send Request Reminder -Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. +Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + +**NOTE:** This action can **not** be used with embedded signature requests. ### Example @@ -914,33 +1507,34 @@ Sends an email to the signer reminding them to sign the signature request. You c * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestRemindRequest( + signature_request_remind_request = models.SignatureRequestRemindRequest( email_address="john@example.com", ) - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - try: - response = signature_request_api.signature_request_remind( - signature_request_id, data + response = api.SignatureRequestApi(api_client).signature_request_remind( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_remind_request=signature_request_remind_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_remind: %s\n" + % e + ) ``` ``` @@ -978,31 +1572,37 @@ with ApiClient(configuration) as api_client: Remove Signature Request Access -Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. +Removes your access to a completed signature request. This action is **not reversible**. + +The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + +Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. ### Example * Basic Authentication (api_key): ```python -from dropbox_sign import ApiClient, ApiException, Configuration, apis +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 - # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - try: - signature_request_api.signature_request_remove(signature_request_id) + api.SignatureRequestApi(api_client).signature_request_remove( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + ) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_remove: %s\n" + % e + ) ``` ``` @@ -1047,68 +1647,83 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - signer_1 = models.SubSignatureRequestSigner( - email_address="jack@example.com", - name="Jack", - order=0, - ) - - signer_2 = models.SubSignatureRequestSigner( - email_address="jill@example.com", - name="Jill", - order=1, + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", ) signing_options = models.SubSigningOptions( + default_type="draw", draw=True, + phone=False, type=True, upload=True, - phone=True, - default_type="draw", ) - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", + signers_1 = models.SubSignatureRequestSigner( + name="Jack", + email_address="jack@example.com", + order=0, ) - data = models.SignatureRequestSendRequest( - title="NDA with Acme Co.", + signers_2 = models.SubSignatureRequestSigner( + name="Jill", + email_address="jill@example.com", + order=1, + ) + + signers = [ + signers_1, + signers_2, + ] + + signature_request_send_request = models.SignatureRequestSendRequest( + message="Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions.", subject="The NDA we talked about", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], + test_mode=True, + title="NDA with Acme Co.", cc_email_addresses=[ "lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com", ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + metadata=json.loads( + """ + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """ + ), field_options=field_options, - test_mode=True, + signing_options=signing_options, + signers=signers, ) try: - response = signature_request_api.signature_request_send(data) + response = api.SignatureRequestApi(api_client).signature_request_send( + signature_request_send_request=signature_request_send_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_send: %s\n" + % e + ) ``` ``` @@ -1153,62 +1768,84 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) + signing_options = models.SubSigningOptions( + default_type="draw", + draw=True, + phone=False, + type=True, + upload=True, + ) - signer_1 = models.SubSignatureRequestTemplateSigner( + signers_1 = models.SubSignatureRequestTemplateSigner( role="Client", - email_address="george@example.com", name="George", + email_address="george@example.com", ) - cc_1 = models.SubCC( + signers = [ + signers_1, + ] + + ccs_1 = models.SubCC( role="Accounting", email_address="accounting@example.com", ) - custom_field_1 = models.SubCustomField( + ccs = [ + ccs_1, + ] + + custom_fields_1 = models.SubCustomField( name="Cost", - value="$20,000", editor="Client", required=True, + value="$20,000", ) - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - data = models.SignatureRequestSendWithTemplateRequest( - template_ids=["c26b8a16784a872da37ea946b9ddec7c1e11dff6"], - subject="Purchase Order", - message="Glad we could come to an agreement.", - signers=[signer_1], - ccs=[cc_1], - custom_fields=[custom_field_1], - signing_options=signing_options, - test_mode=True, + custom_fields = [ + custom_fields_1, + ] + + signature_request_send_with_template_request = ( + models.SignatureRequestSendWithTemplateRequest( + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + message="Glad we could come to an agreement.", + subject="Purchase Order", + test_mode=True, + signing_options=signing_options, + signers=signers, + ccs=ccs, + custom_fields=custom_fields, + ) ) try: - response = signature_request_api.signature_request_send_with_template(data) + response = api.SignatureRequestApi( + api_client + ).signature_request_send_with_template( + signature_request_send_with_template_request=signature_request_send_with_template_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_send_with_template: %s\n" + % e + ) ``` ``` @@ -1245,7 +1882,11 @@ with ApiClient(configuration) as api_client: Update Signature Request -Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. +Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + +Updating the email address of a signer will generate a new `signature_id` value. + +**NOTE:** This action cannot be performed on a signature request with an appended signature page. ### Example @@ -1253,34 +1894,35 @@ Updates the email address and/or the name for a given signer on a signature requ * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - signature_request_api = apis.SignatureRequestApi(api_client) - - data = models.SignatureRequestUpdateRequest( + signature_request_update_request = models.SignatureRequestUpdateRequest( + signature_id="2f9781e1a8e2045224d808c153c2e1d3df6f8f2f", email_address="john@example.com", - signature_id="78caf2a1d01cd39cea2bc1cbb340dac3", ) - signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - try: - response = signature_request_api.signature_request_update( - signature_request_id, data + response = api.SignatureRequestApi(api_client).signature_request_update( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + signature_request_update_request=signature_request_update_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling SignatureRequestApi#signature_request_update: %s\n" + % e + ) ``` ``` diff --git a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index 1448d24df..d09fa3c05 100644 --- a/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -21,3 +21,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md index 6031e08ee..0780a3cea 100644 --- a/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -21,3 +21,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md index 98e708332..9f2fe0584 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedRequest.md @@ -32,3 +32,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md index f3e8acaa5..261759720 100644 --- a/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -23,3 +23,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/python/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..5165d1da6 --- /dev/null +++ b/sdks/python/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,35 @@ +# SignatureRequestEditEmbeddedRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List[io.IOBase]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```List[str]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to False] | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to False] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/python/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..c0dcf6fd1 --- /dev/null +++ b/sdks/python/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,26 @@ +# SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```str``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List[io.IOBase]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```List[str]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to False] | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/SignatureRequestEditRequest.md b/sdks/python/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..b4d9783d6 --- /dev/null +++ b/sdks/python/docs/SignatureRequestEditRequest.md @@ -0,0 +1,36 @@ +# SignatureRequestEditRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```List[io.IOBase]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```List[str]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List[SubSignatureRequestSigner]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```List[SubSignatureRequestGroupedSigners]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [default to False] | +| `attachments` | [```List[SubAttachment]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```List[str]``` | The email addresses that should be CCed. | | +| `client_id` | ```str``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```List[SubFormFieldGroup]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```List[SubFormFieldRule]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```List[SubFormFieldsPerDocumentBase]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to False] | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to False] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/python/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..47b6af51b --- /dev/null +++ b/sdks/python/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,27 @@ +# SignatureRequestEditWithTemplateRequest + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```List[str]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List[SubSignatureRequestTemplateSigner]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to False] | +| `ccs` | [```List[SubCC]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```str``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```List[SubCustomField]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List[io.IOBase]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```List[str]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to False] | +| `message` | ```str``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Dict[str, object]``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```str``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```str``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to False] | +| `title` | ```str``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/SignatureRequestGetResponse.md b/sdks/python/docs/SignatureRequestGetResponse.md index a0ee83f2d..a464459e9 100644 --- a/sdks/python/docs/SignatureRequestGetResponse.md +++ b/sdks/python/docs/SignatureRequestGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestListResponse.md b/sdks/python/docs/SignatureRequestListResponse.md index 532cf61fd..1bd179bad 100644 --- a/sdks/python/docs/SignatureRequestListResponse.md +++ b/sdks/python/docs/SignatureRequestListResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestRemindRequest.md b/sdks/python/docs/SignatureRequestRemindRequest.md index c885130ef..eebce01ce 100644 --- a/sdks/python/docs/SignatureRequestRemindRequest.md +++ b/sdks/python/docs/SignatureRequestRemindRequest.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponse.md b/sdks/python/docs/SignatureRequestResponse.md index 552f80e02..92a517b3f 100644 --- a/sdks/python/docs/SignatureRequestResponse.md +++ b/sdks/python/docs/SignatureRequestResponse.md @@ -33,3 +33,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseAttachment.md b/sdks/python/docs/SignatureRequestResponseAttachment.md index a602ec03d..753b0a473 100644 --- a/sdks/python/docs/SignatureRequestResponseAttachment.md +++ b/sdks/python/docs/SignatureRequestResponseAttachment.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md index 75339e02f..915e6f6ed 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldBase.md @@ -16,3 +16,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md index d3f9dbc70..fff258579 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldCheckbox.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md index 34222b32e..fee080e57 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldText.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldText.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md index debe8e40c..644955bf8 100644 --- a/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md +++ b/sdks/python/docs/SignatureRequestResponseCustomFieldTypeEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataBase.md b/sdks/python/docs/SignatureRequestResponseDataBase.md index a657e3c87..e4bf79185 100644 --- a/sdks/python/docs/SignatureRequestResponseDataBase.md +++ b/sdks/python/docs/SignatureRequestResponseDataBase.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md b/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md index 102414ea4..af254fec0 100644 --- a/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md +++ b/sdks/python/docs/SignatureRequestResponseDataTypeEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md index f52a4be3a..9fe6c8319 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckbox.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md index c7ad20c87..0a4c036ae 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueCheckboxMerge.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md index d72ecc9b2..d8d9b405b 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDateSigned.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md index 9eef3d02e..c588b0c0f 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueDropdown.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md index 425498be7..a3420974d 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueInitials.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueInitials.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md index 615a86d76..53c6b68db 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueRadio.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueRadio.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md index a50bcc538..bb2603144 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueSignature.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueSignature.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueText.md b/sdks/python/docs/SignatureRequestResponseDataValueText.md index 4b380507f..c56a9075c 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueText.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueText.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md index f3e90ba7d..90c9819c1 100644 --- a/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md +++ b/sdks/python/docs/SignatureRequestResponseDataValueTextMerge.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestResponseSignatures.md b/sdks/python/docs/SignatureRequestResponseSignatures.md index 8125332ed..fd0ad98af 100644 --- a/sdks/python/docs/SignatureRequestResponseSignatures.md +++ b/sdks/python/docs/SignatureRequestResponseSignatures.md @@ -27,3 +27,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestSendRequest.md b/sdks/python/docs/SignatureRequestSendRequest.md index beb3ae0f4..54e5d9d4c 100644 --- a/sdks/python/docs/SignatureRequestSendRequest.md +++ b/sdks/python/docs/SignatureRequestSendRequest.md @@ -34,3 +34,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md index d06589006..0278d63a8 100644 --- a/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md +++ b/sdks/python/docs/SignatureRequestSendWithTemplateRequest.md @@ -25,3 +25,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SignatureRequestUpdateRequest.md b/sdks/python/docs/SignatureRequestUpdateRequest.md index 10ada0f0a..23675309b 100644 --- a/sdks/python/docs/SignatureRequestUpdateRequest.md +++ b/sdks/python/docs/SignatureRequestUpdateRequest.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubAttachment.md b/sdks/python/docs/SubAttachment.md index 273066666..a8172758e 100644 --- a/sdks/python/docs/SubAttachment.md +++ b/sdks/python/docs/SubAttachment.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubBulkSignerList.md b/sdks/python/docs/SubBulkSignerList.md index 4079ca132..21df799f7 100644 --- a/sdks/python/docs/SubBulkSignerList.md +++ b/sdks/python/docs/SubBulkSignerList.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubBulkSignerListCustomField.md b/sdks/python/docs/SubBulkSignerListCustomField.md index 6ff5de065..160180c2a 100644 --- a/sdks/python/docs/SubBulkSignerListCustomField.md +++ b/sdks/python/docs/SubBulkSignerListCustomField.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubCC.md b/sdks/python/docs/SubCC.md index 0a9267dfb..7caebd33b 100644 --- a/sdks/python/docs/SubCC.md +++ b/sdks/python/docs/SubCC.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubCustomField.md b/sdks/python/docs/SubCustomField.md index 7aff76896..bd7fea5b3 100644 --- a/sdks/python/docs/SubCustomField.md +++ b/sdks/python/docs/SubCustomField.md @@ -16,3 +16,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubEditorOptions.md b/sdks/python/docs/SubEditorOptions.md index 4ee12c25c..81e617bfa 100644 --- a/sdks/python/docs/SubEditorOptions.md +++ b/sdks/python/docs/SubEditorOptions.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFieldOptions.md b/sdks/python/docs/SubFieldOptions.md index 3d40efd8d..48bedb1f4 100644 --- a/sdks/python/docs/SubFieldOptions.md +++ b/sdks/python/docs/SubFieldOptions.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldGroup.md b/sdks/python/docs/SubFormFieldGroup.md index af8de77e3..4e9f630e3 100644 --- a/sdks/python/docs/SubFormFieldGroup.md +++ b/sdks/python/docs/SubFormFieldGroup.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldRule.md b/sdks/python/docs/SubFormFieldRule.md index 1e4658e86..2db7e90f2 100644 --- a/sdks/python/docs/SubFormFieldRule.md +++ b/sdks/python/docs/SubFormFieldRule.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldRuleAction.md b/sdks/python/docs/SubFormFieldRuleAction.md index 6d38e07af..5c53f585a 100644 --- a/sdks/python/docs/SubFormFieldRuleAction.md +++ b/sdks/python/docs/SubFormFieldRuleAction.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldRuleTrigger.md b/sdks/python/docs/SubFormFieldRuleTrigger.md index 0ff0bbf26..bda6d91ae 100644 --- a/sdks/python/docs/SubFormFieldRuleTrigger.md +++ b/sdks/python/docs/SubFormFieldRuleTrigger.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentBase.md b/sdks/python/docs/SubFormFieldsPerDocumentBase.md index 12da98a0d..fcd075f4c 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentBase.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentBase.md @@ -32,3 +32,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md index ac3ac20a5..2ccf4c346 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckbox.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md index 70ddec82f..b07f40b48 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentCheckboxMerge.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md index 894e416a1..5824322c9 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDateSigned.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md index b2ad0d63d..aecb75576 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentDropdown.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md b/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md index 30e438940..a92e3e2f3 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentFontEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md index 821d474da..ae3b59d31 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentHyperlink.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md index 978db25a4..dc0d77ed0 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentInitials.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentInitials.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md index 96789cb51..6ee33dc9b 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentRadio.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentRadio.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md index b1fb9969e..d93dbf7f9 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentSignature.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentSignature.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentText.md b/sdks/python/docs/SubFormFieldsPerDocumentText.md index 0456d7b99..f851ec317 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentText.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentText.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md index 5670ce99e..fe812d863 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentTextMerge.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md b/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md index e2f8ca561..37bac7dd0 100644 --- a/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md +++ b/sdks/python/docs/SubFormFieldsPerDocumentTypeEnum.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubMergeField.md b/sdks/python/docs/SubMergeField.md index 9066c079d..be4dfd7cf 100644 --- a/sdks/python/docs/SubMergeField.md +++ b/sdks/python/docs/SubMergeField.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubOAuth.md b/sdks/python/docs/SubOAuth.md index 524b04f8b..f1d04905a 100644 --- a/sdks/python/docs/SubOAuth.md +++ b/sdks/python/docs/SubOAuth.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubOptions.md b/sdks/python/docs/SubOptions.md index 62ff1a98b..871dc60b6 100644 --- a/sdks/python/docs/SubOptions.md +++ b/sdks/python/docs/SubOptions.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubSignatureRequestGroupedSigners.md b/sdks/python/docs/SubSignatureRequestGroupedSigners.md index 179f27bc0..0c03df8d4 100644 --- a/sdks/python/docs/SubSignatureRequestGroupedSigners.md +++ b/sdks/python/docs/SubSignatureRequestGroupedSigners.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubSignatureRequestSigner.md b/sdks/python/docs/SubSignatureRequestSigner.md index 0a122bcfb..4af8f72e0 100644 --- a/sdks/python/docs/SubSignatureRequestSigner.md +++ b/sdks/python/docs/SubSignatureRequestSigner.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubSignatureRequestTemplateSigner.md b/sdks/python/docs/SubSignatureRequestTemplateSigner.md index d1ca992d5..392204b1c 100644 --- a/sdks/python/docs/SubSignatureRequestTemplateSigner.md +++ b/sdks/python/docs/SubSignatureRequestTemplateSigner.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubSigningOptions.md b/sdks/python/docs/SubSigningOptions.md index a060bd1d6..9584478ec 100644 --- a/sdks/python/docs/SubSigningOptions.md +++ b/sdks/python/docs/SubSigningOptions.md @@ -15,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubTeamResponse.md b/sdks/python/docs/SubTeamResponse.md index 5c655b187..750829a35 100644 --- a/sdks/python/docs/SubTeamResponse.md +++ b/sdks/python/docs/SubTeamResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubTemplateRole.md b/sdks/python/docs/SubTemplateRole.md index 09d0d74ff..30a6deb41 100644 --- a/sdks/python/docs/SubTemplateRole.md +++ b/sdks/python/docs/SubTemplateRole.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubUnclaimedDraftSigner.md b/sdks/python/docs/SubUnclaimedDraftSigner.md index a542cecc7..636ccf6b9 100644 --- a/sdks/python/docs/SubUnclaimedDraftSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftSigner.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md index 481850b20..80634e817 100644 --- a/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md +++ b/sdks/python/docs/SubUnclaimedDraftTemplateSigner.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/SubWhiteLabelingOptions.md b/sdks/python/docs/SubWhiteLabelingOptions.md index f911527c3..7baf3600c 100644 --- a/sdks/python/docs/SubWhiteLabelingOptions.md +++ b/sdks/python/docs/SubWhiteLabelingOptions.md @@ -25,3 +25,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamAddMemberRequest.md b/sdks/python/docs/TeamAddMemberRequest.md index 8b3120ff9..a40c8b178 100644 --- a/sdks/python/docs/TeamAddMemberRequest.md +++ b/sdks/python/docs/TeamAddMemberRequest.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamApi.md b/sdks/python/docs/TeamApi.md index 34b61523a..e61896a51 100644 --- a/sdks/python/docs/TeamApi.md +++ b/sdks/python/docs/TeamApi.md @@ -29,29 +29,31 @@ Invites a user (specified using the `email_address` parameter) to your Team. If * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamAddMemberRequest( + team_add_member_request = models.TeamAddMemberRequest( email_address="george@example.com", ) try: - response = team_api.team_add_member(data) + response = api.TeamApi(api_client).team_add_member( + team_add_member_request=team_add_member_request, + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_add_member: %s\n" % e) ``` ``` @@ -97,29 +99,30 @@ Creates a new Team and makes you a member. You must not currently belong to a Te * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamCreateRequest( + team_create_request = models.TeamCreateRequest( name="New Team Name", ) try: - response = team_api.team_create(data) + response = api.TeamApi(api_client).team_create( + team_create_request=team_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_create: %s\n" % e) ``` ``` @@ -164,22 +167,22 @@ Deletes your Team. Can only be invoked when you have a Team with only one member * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import ApiClient, ApiException, Configuration, apis +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - try: - team_api.team_delete() + api.TeamApi(api_client).team_delete() except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_delete: %s\n" % e) ``` ``` @@ -214,7 +217,7 @@ void (empty response body) Get Team -Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. +Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned. ### Example @@ -222,25 +225,24 @@ Returns information about your Team as well as a list of its members. If you do * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - try: - response = team_api.team_get() + response = api.TeamApi(api_client).team_get() + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_get: %s\n" % e) ``` ``` @@ -283,25 +285,26 @@ Provides information about a team. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - try: - response = team_api.team_info() + response = api.TeamApi(api_client).team_info( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_info: %s\n" % e) ``` ``` @@ -346,27 +349,24 @@ Provides a list of team invites (and their roles). * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - email_address = "user@dropboxsign.com" - try: - response = team_api.team_invites(email_address=email_address) + response = api.TeamApi(api_client).team_invites() + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_invites: %s\n" % e) ``` ``` @@ -411,27 +411,28 @@ Provides a paginated list of members (and their roles) that belong to a given te * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - try: - response = team_api.team_members(team_id) + response = api.TeamApi(api_client).team_members( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_members: %s\n" % e) ``` ``` @@ -478,30 +479,31 @@ Removes the provided user Account from your Team. If the Account had an outstand * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamRemoveMemberRequest( + team_remove_member_request = models.TeamRemoveMemberRequest( email_address="teammate@dropboxsign.com", new_owner_email_address="new_teammate@dropboxsign.com", ) try: - response = team_api.team_remove_member(data) + response = api.TeamApi(api_client).team_remove_member( + team_remove_member_request=team_remove_member_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_remove_member: %s\n" % e) ``` ``` @@ -546,27 +548,28 @@ Provides a paginated list of sub teams that belong to a given team. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - try: - response = team_api.team_sub_teams(team_id) + response = api.TeamApi(api_client).team_sub_teams( + team_id="4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + page=1, + page_size=20, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_sub_teams: %s\n" % e) ``` ``` @@ -613,29 +616,30 @@ Updates the name of your Team. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - team_api = apis.TeamApi(api_client) - - data = models.TeamUpdateRequest( + team_update_request = models.TeamUpdateRequest( name="New Team Name", ) try: - response = team_api.team_update(data) + response = api.TeamApi(api_client).team_update( + team_update_request=team_update_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TeamApi#team_update: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/TeamCreateRequest.md b/sdks/python/docs/TeamCreateRequest.md index 41d0b75f3..8491afc10 100644 --- a/sdks/python/docs/TeamCreateRequest.md +++ b/sdks/python/docs/TeamCreateRequest.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamGetInfoResponse.md b/sdks/python/docs/TeamGetInfoResponse.md index b7c0dad0d..b57b05c46 100644 --- a/sdks/python/docs/TeamGetInfoResponse.md +++ b/sdks/python/docs/TeamGetInfoResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamGetResponse.md b/sdks/python/docs/TeamGetResponse.md index 9443320b5..d7977adac 100644 --- a/sdks/python/docs/TeamGetResponse.md +++ b/sdks/python/docs/TeamGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamInfoResponse.md b/sdks/python/docs/TeamInfoResponse.md index 832a13027..ee8991007 100644 --- a/sdks/python/docs/TeamInfoResponse.md +++ b/sdks/python/docs/TeamInfoResponse.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamInviteResponse.md b/sdks/python/docs/TeamInviteResponse.md index 8e6e284c2..24b95e3f3 100644 --- a/sdks/python/docs/TeamInviteResponse.md +++ b/sdks/python/docs/TeamInviteResponse.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamInvitesResponse.md b/sdks/python/docs/TeamInvitesResponse.md index 2b8097dca..477ab3be9 100644 --- a/sdks/python/docs/TeamInvitesResponse.md +++ b/sdks/python/docs/TeamInvitesResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamMemberResponse.md b/sdks/python/docs/TeamMemberResponse.md index 0bb958d08..64fea4347 100644 --- a/sdks/python/docs/TeamMemberResponse.md +++ b/sdks/python/docs/TeamMemberResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamMembersResponse.md b/sdks/python/docs/TeamMembersResponse.md index 1d04f6711..f44ca73cd 100644 --- a/sdks/python/docs/TeamMembersResponse.md +++ b/sdks/python/docs/TeamMembersResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamParentResponse.md b/sdks/python/docs/TeamParentResponse.md index ef6e9fb95..ba3f06dd2 100644 --- a/sdks/python/docs/TeamParentResponse.md +++ b/sdks/python/docs/TeamParentResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamRemoveMemberRequest.md b/sdks/python/docs/TeamRemoveMemberRequest.md index 1f9445fcc..8369af840 100644 --- a/sdks/python/docs/TeamRemoveMemberRequest.md +++ b/sdks/python/docs/TeamRemoveMemberRequest.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamResponse.md b/sdks/python/docs/TeamResponse.md index 150fd646e..f8b211bdf 100644 --- a/sdks/python/docs/TeamResponse.md +++ b/sdks/python/docs/TeamResponse.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamSubTeamsResponse.md b/sdks/python/docs/TeamSubTeamsResponse.md index 549f85004..91a3ef494 100644 --- a/sdks/python/docs/TeamSubTeamsResponse.md +++ b/sdks/python/docs/TeamSubTeamsResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TeamUpdateRequest.md b/sdks/python/docs/TeamUpdateRequest.md index 086b33d87..d99b6a5ec 100644 --- a/sdks/python/docs/TeamUpdateRequest.md +++ b/sdks/python/docs/TeamUpdateRequest.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateAddUserRequest.md b/sdks/python/docs/TemplateAddUserRequest.md index a8ee5eb21..08a2ac117 100644 --- a/sdks/python/docs/TemplateAddUserRequest.md +++ b/sdks/python/docs/TemplateAddUserRequest.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index 153be9c2e..5ff5a44c8 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -30,31 +30,31 @@ Gives the specified Account access to the specified Template. The specified Acco * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateAddUserRequest( + template_add_user_request = models.TemplateAddUserRequest( email_address="george@dropboxsign.com", ) - template_id = "f57db65d3f933b5316d398057a36176831451a35" - try: - response = template_api.template_add_user(template_id, data) + response = api.TemplateApi(api_client).template_add_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_add_user_request=template_add_user_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_add_user: %s\n" % e) ``` ``` @@ -100,62 +100,113 @@ Creates a template that can then be used. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", + ) - role_1 = models.SubTemplateRole( + signer_roles_1 = models.SubTemplateRole( name="Client", order=0, ) - role_2 = models.SubTemplateRole( + signer_roles_2 = models.SubTemplateRole( name="Witness", order=1, ) - merge_field_1 = models.SubMergeField( + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + form_fields_per_document_1 = models.SubFormFieldsPerDocumentText( + document_index=0, + api_id="uniqueIdHere_1", + type="text", + required=True, + signer="1", + width=100, + height=16, + x=112, + y=328, + name="", + page=1, + placeholder="", + validation_type="numbers_only", + ) + + form_fields_per_document_2 = models.SubFormFieldsPerDocumentSignature( + document_index=0, + api_id="uniqueIdHere_2", + type="signature", + required=True, + signer="0", + width=120, + height=30, + x=530, + y=415, + name="", + page=1, + ) + + form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, + ] + + merge_fields_1 = models.SubMergeField( name="Full Name", type="text", ) - merge_field_2 = models.SubMergeField( + merge_fields_2 = models.SubMergeField( name="Is Registered?", type="checkbox", ) - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] - data = models.TemplateCreateRequest( + template_create_request = models.TemplateCreateRequest( client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, + subject="Please sign this document", test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + signer_roles=signer_roles, + form_fields_per_document=form_fields_per_document, + merge_fields=merge_fields, ) try: - response = template_api.template_create(data) + response = api.TemplateApi(api_client).template_create( + template_create_request=template_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_create: %s\n" % e) ``` ``` @@ -200,62 +251,80 @@ The first step in an embedded template workflow. Creates a draft template that c * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - role_1 = models.SubTemplateRole( - name="Client", - order=0, - ) - - role_2 = models.SubTemplateRole( - name="Witness", - order=1, + field_options = models.SubFieldOptions( + date_format="DD - MM - YYYY", ) - merge_field_1 = models.SubMergeField( + merge_fields_1 = models.SubMergeField( name="Full Name", type="text", ) - merge_field_2 = models.SubMergeField( + merge_fields_2 = models.SubMergeField( name="Is Registered?", type="checkbox", ) - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", + merge_fields = [ + merge_fields_1, + merge_fields_2, + ] + + signer_roles_1 = models.SubTemplateRole( + name="Client", + order=0, ) - data = models.TemplateCreateEmbeddedDraftRequest( + signer_roles_2 = models.SubTemplateRole( + name="Witness", + order=1, + ) + + signer_roles = [ + signer_roles_1, + signer_roles_2, + ] + + template_create_embedded_draft_request = models.TemplateCreateEmbeddedDraftRequest( client_id="37dee8d8440c66d54cfa05d92c160882", - files=[open("example_signature_request.pdf", "rb")], - title="Test Template", - subject="Please sign this document", message="For your approval", - signer_roles=[role_1, role_2], - cc_roles=["Manager"], - merge_fields=[merge_field_1, merge_field_2], - field_options=field_options, + subject="Please sign this document", test_mode=True, + title="Test Template", + cc_roles=[ + "Manager", + ], + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + field_options=field_options, + merge_fields=merge_fields, + signer_roles=signer_roles, ) try: - response = template_api.template_create_embedded_draft(data) + response = api.TemplateApi(api_client).template_create_embedded_draft( + template_create_embedded_draft_request=template_create_embedded_draft_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling TemplateApi#template_create_embedded_draft: %s\n" + % e + ) ``` ``` @@ -300,24 +369,24 @@ Completely deletes the template specified from the account. * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import ApiClient, ApiException, Configuration, apis +import json +from datetime import date, datetime +from pprint import pprint + +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - template_api.template_delete(template_id) + api.TemplateApi(api_client).template_delete( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_delete: %s\n" % e) ``` ``` @@ -354,7 +423,9 @@ void (empty response body) Get Template Files -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. ### Example @@ -362,27 +433,26 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - response = template_api.template_files(template_id, file_type="pdf") - open("file_response.pdf", "wb").write(response.read()) + response = api.TemplateApi(api_client).template_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + + open("./file_response", "wb").write(response.read()) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_files: %s\n" % e) ``` ``` @@ -420,7 +490,9 @@ with ApiClient(configuration) as api_client: Get Template Files as Data Uri -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. ### Example @@ -428,27 +500,26 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - response = template_api.template_files_as_data_uri(template_id) + response = api.TemplateApi(api_client).template_files_as_data_uri( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_files_as_data_uri: %s\n" % e) ``` ``` @@ -485,7 +556,9 @@ with ApiClient(configuration) as api_client: Get Template Files as File Url -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. ### Example @@ -493,27 +566,27 @@ Obtain a copy of the current documents specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - response = template_api.template_files_as_file_url(template_id) + response = api.TemplateApi(api_client).template_files_as_file_url( + template_id="f57db65d3f933b5316d398057a36176831451a35", + force_download=1, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_files_as_file_url: %s\n" % e) ``` ``` @@ -559,27 +632,26 @@ Returns the Template specified by the `template_id` parameter. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - template_id = "f57db65d3f933b5316d398057a36176831451a35" - try: - response = template_api.template_get(template_id) + response = api.TemplateApi(api_client).template_get( + template_id="f57db65d3f933b5316d398057a36176831451a35", + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_get: %s\n" % e) ``` ``` @@ -616,7 +688,9 @@ with ApiClient(configuration) as api_client: List Templates -Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. +Returns a list of the Templates that are accessible by you. + +Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. ### Example @@ -624,29 +698,27 @@ Returns a list of the Templates that are accessible by you. Take a look at our * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - account_id = "f57db65d3f933b5316d398057a36176831451a35" - try: - response = template_api.template_list( - account_id=account_id, + response = api.TemplateApi(api_client).template_list( + page=1, + page_size=20, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_list: %s\n" % e) ``` ``` @@ -694,31 +766,31 @@ Removes the specified Account's access to the specified Template. * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateRemoveUserRequest( + template_remove_user_request = models.TemplateRemoveUserRequest( email_address="george@dropboxsign.com", ) - template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - try: - response = template_api.template_remove_user(template_id, data) + response = api.TemplateApi(api_client).template_remove_user( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_remove_user_request=template_remove_user_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_remove_user: %s\n" % e) ``` ``` @@ -756,7 +828,18 @@ with ApiClient(configuration) as api_client: Update Template Files -Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). +Overlays a new file with the overlay of an existing template. The new file(s) must: + +1. have the same or higher page count +2. the same orientation as the file(s) being replaced. + +This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + +Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + +It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. 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 and retry the request if necessary. + +If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). ### Example @@ -764,31 +847,33 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - template_api = apis.TemplateApi(api_client) - - data = models.TemplateUpdateFilesRequest( - files=[open("example_signature_request.pdf", "rb")], + template_update_files_request = models.TemplateUpdateFilesRequest( + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], ) - template_id = "5de8179668f2033afac48da1868d0093bf133266" - try: - response = template_api.template_update_files(template_id, data) + response = api.TemplateApi(api_client).template_update_files( + template_id="f57db65d3f933b5316d398057a36176831451a35", + template_update_files_request=template_update_files_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print("Exception when calling TemplateApi#template_update_files: %s\n" % e) ``` ``` diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md index 2f257373d..c63d97184 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftRequest.md @@ -33,3 +33,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md index d0bfc7799..ecf1a4357 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md index 56b48ec48..045277287 100644 --- a/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateCreateRequest.md b/sdks/python/docs/TemplateCreateRequest.md index ec9fb40ea..a5341c381 100644 --- a/sdks/python/docs/TemplateCreateRequest.md +++ b/sdks/python/docs/TemplateCreateRequest.md @@ -26,3 +26,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateCreateResponse.md b/sdks/python/docs/TemplateCreateResponse.md index 466455c86..c87b262a5 100644 --- a/sdks/python/docs/TemplateCreateResponse.md +++ b/sdks/python/docs/TemplateCreateResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateCreateResponseTemplate.md b/sdks/python/docs/TemplateCreateResponseTemplate.md index 1c3d76f37..21d6307c7 100644 --- a/sdks/python/docs/TemplateCreateResponseTemplate.md +++ b/sdks/python/docs/TemplateCreateResponseTemplate.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateEditResponse.md b/sdks/python/docs/TemplateEditResponse.md index acc73fbf7..2384cb094 100644 --- a/sdks/python/docs/TemplateEditResponse.md +++ b/sdks/python/docs/TemplateEditResponse.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateGetResponse.md b/sdks/python/docs/TemplateGetResponse.md index 05a0b2407..c208fbbef 100644 --- a/sdks/python/docs/TemplateGetResponse.md +++ b/sdks/python/docs/TemplateGetResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateListResponse.md b/sdks/python/docs/TemplateListResponse.md index 60fb194da..1c3f0b8f5 100644 --- a/sdks/python/docs/TemplateListResponse.md +++ b/sdks/python/docs/TemplateListResponse.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateRemoveUserRequest.md b/sdks/python/docs/TemplateRemoveUserRequest.md index 36b2de004..c151a0bef 100644 --- a/sdks/python/docs/TemplateRemoveUserRequest.md +++ b/sdks/python/docs/TemplateRemoveUserRequest.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponse.md b/sdks/python/docs/TemplateResponse.md index 01220c998..0eb88aa1b 100644 --- a/sdks/python/docs/TemplateResponse.md +++ b/sdks/python/docs/TemplateResponse.md @@ -24,3 +24,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseAccount.md b/sdks/python/docs/TemplateResponseAccount.md index 7668fc726..e991a4092 100644 --- a/sdks/python/docs/TemplateResponseAccount.md +++ b/sdks/python/docs/TemplateResponseAccount.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseAccountQuota.md b/sdks/python/docs/TemplateResponseAccountQuota.md index 7e83dcc11..1af33065a 100644 --- a/sdks/python/docs/TemplateResponseAccountQuota.md +++ b/sdks/python/docs/TemplateResponseAccountQuota.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseCCRole.md b/sdks/python/docs/TemplateResponseCCRole.md index 1aa9fa707..68b6feafe 100644 --- a/sdks/python/docs/TemplateResponseCCRole.md +++ b/sdks/python/docs/TemplateResponseCCRole.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocument.md b/sdks/python/docs/TemplateResponseDocument.md index 8071995b9..7e16172f3 100644 --- a/sdks/python/docs/TemplateResponseDocument.md +++ b/sdks/python/docs/TemplateResponseDocument.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md index 83354a3f4..577319835 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldBase.md @@ -18,3 +18,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md index 0bbf24c50..121a63e86 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldCheckbox.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md index 474097e03..72b1d3edf 100644 --- a/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentCustomFieldText.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md index 29a19c7cf..ec90f2362 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroup.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroup.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md index 3f0a44f1a..c23407f0e 100644 --- a/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md +++ b/sdks/python/docs/TemplateResponseDocumentFieldGroupRule.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md index a0c465ca8..32e2d5dd9 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldBase.md @@ -17,3 +17,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md index 1a2167a2e..946f83a2e 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md index a9add1a93..9ab442e73 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md index 40d2cf2c0..2a472ec24 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md index ec6a6e4fa..c85e5e56e 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md index 77acaa80b..a186404fa 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldInitials.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md index 9db9a8d03..67e78b5c9 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldRadio.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md index adce267f0..1540a03b3 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldSignature.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md index 9e6604250..8d52035f9 100644 --- a/sdks/python/docs/TemplateResponseDocumentFormFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentFormFieldText.md @@ -15,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md index a7347b687..bbeb828e4 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldBase.md @@ -18,3 +18,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md index a1acbb17c..1b2931db6 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldCheckbox.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md index 62c4b1e7d..b03c2f7b0 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDateSigned.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md index 302afcf69..13d21c1c9 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldDropdown.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md index 52e93c2ef..76e556a1a 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldHyperlink.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md index 227f77c7b..11746ca49 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldInitials.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md index 8002b86de..484053c8e 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldRadio.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md index 443328009..18682b350 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldSignature.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md index 1988dc85f..36887588d 100644 --- a/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md +++ b/sdks/python/docs/TemplateResponseDocumentStaticFieldText.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md index f50991c74..231267889 100644 --- a/sdks/python/docs/TemplateResponseFieldAvgTextLength.md +++ b/sdks/python/docs/TemplateResponseFieldAvgTextLength.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateResponseSignerRole.md b/sdks/python/docs/TemplateResponseSignerRole.md index 7a65a361d..060870d39 100644 --- a/sdks/python/docs/TemplateResponseSignerRole.md +++ b/sdks/python/docs/TemplateResponseSignerRole.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateUpdateFilesRequest.md b/sdks/python/docs/TemplateUpdateFilesRequest.md index 7122faddb..feb241954 100644 --- a/sdks/python/docs/TemplateUpdateFilesRequest.md +++ b/sdks/python/docs/TemplateUpdateFilesRequest.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateUpdateFilesResponse.md b/sdks/python/docs/TemplateUpdateFilesResponse.md index 75af64c6d..37178d484 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponse.md +++ b/sdks/python/docs/TemplateUpdateFilesResponse.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md index 27ea3171f..4c9521e46 100644 --- a/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md +++ b/sdks/python/docs/TemplateUpdateFilesResponseTemplate.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftApi.md b/sdks/python/docs/UnclaimedDraftApi.md index 4ed79a34d..62c15dc8e 100644 --- a/sdks/python/docs/UnclaimedDraftApi.md +++ b/sdks/python/docs/UnclaimedDraftApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description Create Unclaimed Draft -Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. +Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. ### Example @@ -23,68 +23,47 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - signer_1 = models.SubUnclaimedDraftSigner( - email_address="jack@example.com", + signers_1 = models.SubUnclaimedDraftSigner( name="Jack", + email_address="jack@example.com", order=0, ) - signer_2 = models.SubUnclaimedDraftSigner( - email_address="jill@example.com", - name="Jill", - order=1, - ) - - signing_options = models.SubSigningOptions( - draw=True, - type=True, - upload=True, - phone=False, - default_type="draw", - ) - - field_options = models.SubFieldOptions( - date_format="DD - MM - YYYY", - ) + signers = [ + signers_1, + ] - data = models.UnclaimedDraftCreateRequest( - subject="The NDA we talked about", + unclaimed_draft_create_request = models.UnclaimedDraftCreateRequest( type="request_signature", - message="Please sign this NDA and then we can discuss more. Let me know if you have any questions.", - signers=[signer_1, signer_2], - cc_email_addresses=[ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", - ], - files=[open("example_signature_request.pdf", "rb")], - metadata={ - "custom_id": 1234, - "custom_text": "NDA #9", - }, - signing_options=signing_options, - field_options=field_options, test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + signers=signers, ) try: - response = unclaimed_draft_api.unclaimed_draft_create(data) + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create( + unclaimed_draft_create_request=unclaimed_draft_create_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: %s\n" % e + ) ``` ``` @@ -121,7 +100,9 @@ with ApiClient(configuration) as api_client: Create Embedded Unclaimed Draft -Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. +Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. ### Example @@ -129,32 +110,40 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftCreateEmbeddedRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - files=[open("example_signature_request.pdf", "rb")], - requester_email_address="jack@dropboxsign.com", - test_mode=True, + unclaimed_draft_create_embedded_request = ( + models.UnclaimedDraftCreateEmbeddedRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + test_mode=True, + files=[ + open("./example_signature_request.pdf", "rb").read(), + ], + ) ) try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded(data) + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, + ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: %s\n" + % e + ) ``` ``` @@ -191,7 +180,9 @@ with ApiClient(configuration) as api_client: Create Embedded Unclaimed Draft with Template -Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. +Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. ### Example @@ -199,47 +190,63 @@ Creates a new Draft with a previously saved template(s) that can be claimed and * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) + ccs_1 = models.SubCC( + role="Accounting", + email_address="accounting@dropboxsign.com", + ) + + ccs = [ + ccs_1, + ] - signer_1 = models.SubUnclaimedDraftTemplateSigner( + signers_1 = models.SubUnclaimedDraftTemplateSigner( role="Client", name="George", email_address="george@example.com", ) - cc_1 = models.SubCC( - role="Accounting", - email_address="accounting@example.com", - ) - - data = models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - template_ids=["61a832ff0d8423f91d503e76bfbcc750f7417c78"], - requester_email_address="jack@dropboxsign.com", - signers=[signer_1], - ccs=[cc_1], - test_mode=True, + signers = [ + signers_1, + ] + + unclaimed_draft_create_embedded_with_template_request = ( + models.UnclaimedDraftCreateEmbeddedWithTemplateRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + requester_email_address="jack@dropboxsign.com", + template_ids=[ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", + ], + test_mode=False, + ccs=ccs, + signers=signers, + ) ) try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template( - data + response = api.UnclaimedDraftApi( + api_client + ).unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: %s\n" + % e + ) ``` ``` @@ -276,7 +283,9 @@ with ApiClient(configuration) as api_client: Edit and Resend Unclaimed Draft -Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. +Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. ### Example @@ -284,34 +293,35 @@ Creates a new signature request from an embedded request that can be edited prio * Bearer (JWT) Authentication (oauth2): ```python +import json +from datetime import date, datetime from pprint import pprint -from dropbox_sign import ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( - # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: - unclaimed_draft_api = apis.UnclaimedDraftApi(api_client) - - data = models.UnclaimedDraftEditAndResendRequest( - client_id="ec64a202072370a737edf4a0eb7f4437", - test_mode=True, + unclaimed_draft_edit_and_resend_request = models.UnclaimedDraftEditAndResendRequest( + client_id="b6b8e7deaf8f0b95c029dca049356d4a2cf9710a", + test_mode=False, ) - signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" - try: - response = unclaimed_draft_api.unclaimed_draft_edit_and_resend( - signature_request_id, data + response = api.UnclaimedDraftApi(api_client).unclaimed_draft_edit_and_resend( + signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", + unclaimed_draft_edit_and_resend_request=unclaimed_draft_edit_and_resend_request, ) + pprint(response) except ApiException as e: - print("Exception when calling Dropbox Sign API: %s\n" % e) + print( + "Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: %s\n" + % e + ) ``` ``` diff --git a/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md index bc81c3c4a..49704d25b 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedRequest.md @@ -44,3 +44,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md index ef959b997..88a201846 100644 --- a/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -38,3 +38,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftCreateRequest.md b/sdks/python/docs/UnclaimedDraftCreateRequest.md index 61471fcf0..2d84e6ea7 100644 --- a/sdks/python/docs/UnclaimedDraftCreateRequest.md +++ b/sdks/python/docs/UnclaimedDraftCreateRequest.md @@ -32,3 +32,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftCreateResponse.md b/sdks/python/docs/UnclaimedDraftCreateResponse.md index bfb420cdd..41fbc8371 100644 --- a/sdks/python/docs/UnclaimedDraftCreateResponse.md +++ b/sdks/python/docs/UnclaimedDraftCreateResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md index d13a104a7..4782fa45a 100644 --- a/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md +++ b/sdks/python/docs/UnclaimedDraftEditAndResendRequest.md @@ -16,3 +16,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/UnclaimedDraftResponse.md b/sdks/python/docs/UnclaimedDraftResponse.md index 2a3e4f967..561d632e2 100644 --- a/sdks/python/docs/UnclaimedDraftResponse.md +++ b/sdks/python/docs/UnclaimedDraftResponse.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/docs/WarningResponse.md b/sdks/python/docs/WarningResponse.md index 3de57d0fc..c015bda8b 100644 --- a/sdks/python/docs/WarningResponse.md +++ b/sdks/python/docs/WarningResponse.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index 2192ae233..5e9303979 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -3,19 +3,19 @@ # flake8: noqa """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 -__version__ = "1.8-dev" +__version__ = "1.9.0-dev" # import apis into sdk package from dropbox_sign.apis import * @@ -125,6 +125,18 @@ from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( SignatureRequestCreateEmbeddedWithTemplateRequest, ) +from dropbox_sign.models.signature_request_edit_embedded_request import ( + SignatureRequestEditEmbeddedRequest, +) +from dropbox_sign.models.signature_request_edit_embedded_with_template_request import ( + SignatureRequestEditEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_edit_request import ( + SignatureRequestEditRequest, +) +from dropbox_sign.models.signature_request_edit_with_template_request import ( + SignatureRequestEditWithTemplateRequest, +) from dropbox_sign.models.signature_request_get_response import ( SignatureRequestGetResponse, ) diff --git a/sdks/python/dropbox_sign/api/account_api.py b/sdks/python/dropbox_sign/api/account_api.py index b3e5ce952..c326dc17a 100644 --- a/sdks/python/dropbox_sign/api/account_api.py +++ b/sdks/python/dropbox_sign/api/account_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -253,7 +253,9 @@ def _account_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -571,7 +573,9 @@ def _account_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -820,7 +824,9 @@ def _account_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1095,7 +1101,9 @@ def _account_verify_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/api_app_api.py b/sdks/python/dropbox_sign/api/api_app_api.py index 93752b164..45ce475e3 100644 --- a/sdks/python/dropbox_sign/api/api_app_api.py +++ b/sdks/python/dropbox_sign/api/api_app_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -251,7 +251,9 @@ def _api_app_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -532,7 +534,9 @@ def _api_app_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -781,7 +785,9 @@ def _api_app_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1067,7 +1073,9 @@ def _api_app_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1335,7 +1343,9 @@ def _api_app_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/bulk_send_job_api.py b/sdks/python/dropbox_sign/api/bulk_send_job_api.py index e53401b86..eb0b4bc3f 100644 --- a/sdks/python/dropbox_sign/api/bulk_send_job_api.py +++ b/sdks/python/dropbox_sign/api/bulk_send_job_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -311,7 +311,9 @@ def _bulk_send_job_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -605,7 +607,9 @@ def _bulk_send_job_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdks/python/dropbox_sign/api/embedded_api.py b/sdks/python/dropbox_sign/api/embedded_api.py index fcb839f34..450099e61 100644 --- a/sdks/python/dropbox_sign/api/embedded_api.py +++ b/sdks/python/dropbox_sign/api/embedded_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -268,7 +268,9 @@ def _embedded_edit_url_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -554,7 +556,9 @@ def _embedded_sign_url_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdks/python/dropbox_sign/api/fax_api.py b/sdks/python/dropbox_sign/api/fax_api.py index 3e49a160a..abf615a7f 100644 --- a/sdks/python/dropbox_sign/api/fax_api.py +++ b/sdks/python/dropbox_sign/api/fax_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictBytes, StrictStr -from typing import Optional, Union +from typing import Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.fax_get_response import FaxGetResponse from dropbox_sign.models.fax_list_response import FaxListResponse @@ -60,7 +60,7 @@ def fax_delete( ) -> None: """Delete Fax - Deletes the specified Fax from the system. + Deletes the specified Fax from the system :param fax_id: Fax ID (required) :type fax_id: str @@ -125,7 +125,7 @@ def fax_delete_with_http_info( ) -> ApiResponse[None]: """Delete Fax - Deletes the specified Fax from the system. + Deletes the specified Fax from the system :param fax_id: Fax ID (required) :type fax_id: str @@ -190,7 +190,7 @@ def fax_delete_without_preload_content( ) -> RESTResponseType: """Delete Fax - Deletes the specified Fax from the system. + Deletes the specified Fax from the system :param fax_id: Fax ID (required) :type fax_id: str @@ -250,7 +250,9 @@ def _fax_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -301,9 +303,9 @@ def fax_files( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> io.IOBase: - """List Fax Files + """Download Fax Files - Returns list of fax files + Downloads files associated with a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -366,9 +368,9 @@ def fax_files_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[io.IOBase]: - """List Fax Files + """Download Fax Files - Returns list of fax files + Downloads files associated with a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -431,9 +433,9 @@ def fax_files_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Fax Files + """Download Fax Files - Returns list of fax files + Downloads files associated with a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -493,7 +495,9 @@ def _fax_files_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -546,7 +550,7 @@ def fax_get( ) -> FaxGetResponse: """Get Fax - Returns information about fax + Returns information about a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -611,7 +615,7 @@ def fax_get_with_http_info( ) -> ApiResponse[FaxGetResponse]: """Get Fax - Returns information about fax + Returns information about a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -676,7 +680,7 @@ def fax_get_without_preload_content( ) -> RESTResponseType: """Get Fax - Returns information about fax + Returns information about a Fax :param fax_id: Fax ID (required) :type fax_id: str @@ -736,7 +740,9 @@ def _fax_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -776,11 +782,15 @@ def fax_list( self, page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=1)]], - Field(description="Page"), + Field( + description="Which page number of the Fax List to return. Defaults to `1`." + ), ] = None, page_size: Annotated[ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], - Field(description="Page size"), + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, _request_timeout: Union[ None, @@ -796,11 +806,11 @@ def fax_list( ) -> FaxListResponse: """Lists Faxes - Returns properties of multiple faxes + Returns properties of multiple Faxes - :param page: Page + :param page: Which page number of the Fax List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -851,11 +861,15 @@ def fax_list_with_http_info( self, page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=1)]], - Field(description="Page"), + Field( + description="Which page number of the Fax List to return. Defaults to `1`." + ), ] = None, page_size: Annotated[ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], - Field(description="Page size"), + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, _request_timeout: Union[ None, @@ -871,11 +885,11 @@ def fax_list_with_http_info( ) -> ApiResponse[FaxListResponse]: """Lists Faxes - Returns properties of multiple faxes + Returns properties of multiple Faxes - :param page: Page + :param page: Which page number of the Fax List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -926,11 +940,15 @@ def fax_list_without_preload_content( self, page: Annotated[ Optional[Annotated[int, Field(strict=True, ge=1)]], - Field(description="Page"), + Field( + description="Which page number of the Fax List to return. Defaults to `1`." + ), ] = None, page_size: Annotated[ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], - Field(description="Page size"), + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, _request_timeout: Union[ None, @@ -946,11 +964,11 @@ def fax_list_without_preload_content( ) -> RESTResponseType: """Lists Faxes - Returns properties of multiple faxes + Returns properties of multiple Faxes - :param page: Page + :param page: Which page number of the Fax List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1010,7 +1028,9 @@ def _fax_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1069,7 +1089,7 @@ def fax_send( ) -> FaxGetResponse: """Send Fax - Action to prepare and send a fax + Creates and sends a new Fax with the submitted file(s) :param fax_send_request: (required) :type fax_send_request: FaxSendRequest @@ -1134,7 +1154,7 @@ def fax_send_with_http_info( ) -> ApiResponse[FaxGetResponse]: """Send Fax - Action to prepare and send a fax + Creates and sends a new Fax with the submitted file(s) :param fax_send_request: (required) :type fax_send_request: FaxSendRequest @@ -1199,7 +1219,7 @@ def fax_send_without_preload_content( ) -> RESTResponseType: """Send Fax - Action to prepare and send a fax + Creates and sends a new Fax with the submitted file(s) :param fax_send_request: (required) :type fax_send_request: FaxSendRequest @@ -1259,7 +1279,9 @@ def _fax_send_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/fax_line_api.py b/sdks/python/dropbox_sign/api/fax_line_api.py index 2fbb5ac99..c3ceff110 100644 --- a/sdks/python/dropbox_sign/api/fax_line_api.py +++ b/sdks/python/dropbox_sign/api/fax_line_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -256,7 +256,9 @@ def _fax_line_add_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -327,16 +329,16 @@ def _fax_line_add_user_serialize( def fax_line_area_code_get( self, country: Annotated[ - StrictStr, Field(description="Filter area codes by country.") + StrictStr, Field(description="Filter area codes by country") ], state: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by state.") + Optional[StrictStr], Field(description="Filter area codes by state") ] = None, province: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by province.") + Optional[StrictStr], Field(description="Filter area codes by province") ] = None, city: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by city.") + Optional[StrictStr], Field(description="Filter area codes by city") ] = None, _request_timeout: Union[ None, @@ -352,15 +354,15 @@ def fax_line_area_code_get( ) -> FaxLineAreaCodeGetResponse: """Get Available Fax Line Area Codes - Returns a response with the area codes available for a given state/provice and city. + Returns a list of available area codes for a given state/province and city - :param country: Filter area codes by country. (required) + :param country: Filter area codes by country (required) :type country: str - :param state: Filter area codes by state. + :param state: Filter area codes by state :type state: str - :param province: Filter area codes by province. + :param province: Filter area codes by province :type province: str - :param city: Filter area codes by city. + :param city: Filter area codes by city :type city: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -412,16 +414,16 @@ def fax_line_area_code_get( def fax_line_area_code_get_with_http_info( self, country: Annotated[ - StrictStr, Field(description="Filter area codes by country.") + StrictStr, Field(description="Filter area codes by country") ], state: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by state.") + Optional[StrictStr], Field(description="Filter area codes by state") ] = None, province: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by province.") + Optional[StrictStr], Field(description="Filter area codes by province") ] = None, city: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by city.") + Optional[StrictStr], Field(description="Filter area codes by city") ] = None, _request_timeout: Union[ None, @@ -437,15 +439,15 @@ def fax_line_area_code_get_with_http_info( ) -> ApiResponse[FaxLineAreaCodeGetResponse]: """Get Available Fax Line Area Codes - Returns a response with the area codes available for a given state/provice and city. + Returns a list of available area codes for a given state/province and city - :param country: Filter area codes by country. (required) + :param country: Filter area codes by country (required) :type country: str - :param state: Filter area codes by state. + :param state: Filter area codes by state :type state: str - :param province: Filter area codes by province. + :param province: Filter area codes by province :type province: str - :param city: Filter area codes by city. + :param city: Filter area codes by city :type city: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -497,16 +499,16 @@ def fax_line_area_code_get_with_http_info( def fax_line_area_code_get_without_preload_content( self, country: Annotated[ - StrictStr, Field(description="Filter area codes by country.") + StrictStr, Field(description="Filter area codes by country") ], state: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by state.") + Optional[StrictStr], Field(description="Filter area codes by state") ] = None, province: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by province.") + Optional[StrictStr], Field(description="Filter area codes by province") ] = None, city: Annotated[ - Optional[StrictStr], Field(description="Filter area codes by city.") + Optional[StrictStr], Field(description="Filter area codes by city") ] = None, _request_timeout: Union[ None, @@ -522,15 +524,15 @@ def fax_line_area_code_get_without_preload_content( ) -> RESTResponseType: """Get Available Fax Line Area Codes - Returns a response with the area codes available for a given state/provice and city. + Returns a list of available area codes for a given state/province and city - :param country: Filter area codes by country. (required) + :param country: Filter area codes by country (required) :type country: str - :param state: Filter area codes by state. + :param state: Filter area codes by state :type state: str - :param province: Filter area codes by province. + :param province: Filter area codes by province :type province: str - :param city: Filter area codes by city. + :param city: Filter area codes by city :type city: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -594,7 +596,9 @@ def _fax_line_area_code_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -661,7 +665,7 @@ def fax_line_create( ) -> FaxLineResponse: """Purchase Fax Line - Purchases a new Fax Line. + Purchases a new Fax Line :param fax_line_create_request: (required) :type fax_line_create_request: FaxLineCreateRequest @@ -726,7 +730,7 @@ def fax_line_create_with_http_info( ) -> ApiResponse[FaxLineResponse]: """Purchase Fax Line - Purchases a new Fax Line. + Purchases a new Fax Line :param fax_line_create_request: (required) :type fax_line_create_request: FaxLineCreateRequest @@ -791,7 +795,7 @@ def fax_line_create_without_preload_content( ) -> RESTResponseType: """Purchase Fax Line - Purchases a new Fax Line. + Purchases a new Fax Line :param fax_line_create_request: (required) :type fax_line_create_request: FaxLineCreateRequest @@ -851,7 +855,9 @@ def _fax_line_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1126,7 +1132,9 @@ def _fax_line_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1196,7 +1204,7 @@ def _fax_line_delete_serialize( @validate_call def fax_line_get( self, - number: Annotated[StrictStr, Field(description="The Fax Line number.")], + number: Annotated[StrictStr, Field(description="The Fax Line number")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1213,7 +1221,7 @@ def fax_line_get( Returns the properties and settings of a Fax Line. - :param number: The Fax Line number. (required) + :param number: The Fax Line number (required) :type number: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1261,7 +1269,7 @@ def fax_line_get( @validate_call def fax_line_get_with_http_info( self, - number: Annotated[StrictStr, Field(description="The Fax Line number.")], + number: Annotated[StrictStr, Field(description="The Fax Line number")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1278,7 +1286,7 @@ def fax_line_get_with_http_info( Returns the properties and settings of a Fax Line. - :param number: The Fax Line number. (required) + :param number: The Fax Line number (required) :type number: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1326,7 +1334,7 @@ def fax_line_get_with_http_info( @validate_call def fax_line_get_without_preload_content( self, - number: Annotated[StrictStr, Field(description="The Fax Line number.")], + number: Annotated[StrictStr, Field(description="The Fax Line number")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1343,7 +1351,7 @@ def fax_line_get_without_preload_content( Returns the properties and settings of a Fax Line. - :param number: The Fax Line number. (required) + :param number: The Fax Line number (required) :type number: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1401,7 +1409,9 @@ def _fax_line_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1444,12 +1454,23 @@ def fax_line_list( account_id: Annotated[ Optional[StrictStr], Field(description="Account ID") ] = None, - page: Annotated[Optional[StrictInt], Field(description="Page")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Fax Line List to return. Defaults to `1`." + ), + ] = None, page_size: Annotated[ - Optional[StrictInt], Field(description="Page size") + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, show_team_lines: Annotated[ - Optional[StrictBool], Field(description="Show team lines") + Optional[StrictBool], + Field( + description="Include Fax Lines belonging to team members in the list" + ), ] = None, _request_timeout: Union[ None, @@ -1469,11 +1490,11 @@ def fax_line_list( :param account_id: Account ID :type account_id: str - :param page: Page + :param page: Which page number of the Fax Line List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int - :param show_team_lines: Show team lines + :param show_team_lines: Include Fax Lines belonging to team members in the list :type show_team_lines: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1527,12 +1548,23 @@ def fax_line_list_with_http_info( account_id: Annotated[ Optional[StrictStr], Field(description="Account ID") ] = None, - page: Annotated[Optional[StrictInt], Field(description="Page")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Fax Line List to return. Defaults to `1`." + ), + ] = None, page_size: Annotated[ - Optional[StrictInt], Field(description="Page size") + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, show_team_lines: Annotated[ - Optional[StrictBool], Field(description="Show team lines") + Optional[StrictBool], + Field( + description="Include Fax Lines belonging to team members in the list" + ), ] = None, _request_timeout: Union[ None, @@ -1552,11 +1584,11 @@ def fax_line_list_with_http_info( :param account_id: Account ID :type account_id: str - :param page: Page + :param page: Which page number of the Fax Line List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int - :param show_team_lines: Show team lines + :param show_team_lines: Include Fax Lines belonging to team members in the list :type show_team_lines: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1610,12 +1642,23 @@ def fax_line_list_without_preload_content( account_id: Annotated[ Optional[StrictStr], Field(description="Account ID") ] = None, - page: Annotated[Optional[StrictInt], Field(description="Page")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Fax Line List to return. Defaults to `1`." + ), + ] = None, page_size: Annotated[ - Optional[StrictInt], Field(description="Page size") + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), ] = None, show_team_lines: Annotated[ - Optional[StrictBool], Field(description="Show team lines") + Optional[StrictBool], + Field( + description="Include Fax Lines belonging to team members in the list" + ), ] = None, _request_timeout: Union[ None, @@ -1635,11 +1678,11 @@ def fax_line_list_without_preload_content( :param account_id: Account ID :type account_id: str - :param page: Page + :param page: Which page number of the Fax Line List to return. Defaults to `1`. :type page: int - :param page_size: Page size + :param page_size: Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. :type page_size: int - :param show_team_lines: Show team lines + :param show_team_lines: Include Fax Lines belonging to team members in the list :type show_team_lines: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1703,7 +1746,9 @@ def _fax_line_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1770,7 +1815,7 @@ def fax_line_remove_user( ) -> FaxLineResponse: """Remove Fax Line Access - Removes a user's access to the specified Fax Line. + Removes a user's access to the specified Fax Line :param fax_line_remove_user_request: (required) :type fax_line_remove_user_request: FaxLineRemoveUserRequest @@ -1835,7 +1880,7 @@ def fax_line_remove_user_with_http_info( ) -> ApiResponse[FaxLineResponse]: """Remove Fax Line Access - Removes a user's access to the specified Fax Line. + Removes a user's access to the specified Fax Line :param fax_line_remove_user_request: (required) :type fax_line_remove_user_request: FaxLineRemoveUserRequest @@ -1900,7 +1945,7 @@ def fax_line_remove_user_without_preload_content( ) -> RESTResponseType: """Remove Fax Line Access - Removes a user's access to the specified Fax Line. + Removes a user's access to the specified Fax Line :param fax_line_remove_user_request: (required) :type fax_line_remove_user_request: FaxLineRemoveUserRequest @@ -1960,7 +2005,9 @@ def _fax_line_remove_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index bedd1bfff..6ea59b559 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -248,7 +248,9 @@ def _oauth_token_generate_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -524,7 +526,9 @@ def _oauth_token_refresh_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/report_api.py b/sdks/python/dropbox_sign/api/report_api.py index a31ee01f5..f739dcba4 100644 --- a/sdks/python/dropbox_sign/api/report_api.py +++ b/sdks/python/dropbox_sign/api/report_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -246,7 +246,9 @@ def _report_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index f78d1a219..58af96100 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import Optional, Union +from typing import Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse from dropbox_sign.models.file_response import FileResponse @@ -35,6 +35,18 @@ from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( SignatureRequestCreateEmbeddedWithTemplateRequest, ) +from dropbox_sign.models.signature_request_edit_embedded_request import ( + SignatureRequestEditEmbeddedRequest, +) +from dropbox_sign.models.signature_request_edit_embedded_with_template_request import ( + SignatureRequestEditEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_edit_request import ( + SignatureRequestEditRequest, +) +from dropbox_sign.models.signature_request_edit_with_template_request import ( + SignatureRequestEditWithTemplateRequest, +) from dropbox_sign.models.signature_request_get_response import ( SignatureRequestGetResponse, ) @@ -280,7 +292,9 @@ def _signature_request_bulk_create_embedded_with_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -558,7 +572,9 @@ def _signature_request_bulk_send_with_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -845,7 +861,9 @@ def _signature_request_cancel_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1088,7 +1106,9 @@ def _signature_request_create_embedded_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1363,7 +1383,9 @@ def _signature_request_create_embedded_with_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1433,6 +1455,1204 @@ def _signature_request_create_embedded_with_template_serialize( _request_auth=_request_auth, ) + @validate_call + def signature_request_edit( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_request: SignatureRequestEditRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Edit Signature Request + + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_request: (required) + :type signature_request_edit_request: SignatureRequestEditRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_serialize( + signature_request_id=signature_request_id, + signature_request_edit_request=signature_request_edit_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def signature_request_edit_with_http_info( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_request: SignatureRequestEditRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Edit Signature Request + + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_request: (required) + :type signature_request_edit_request: SignatureRequestEditRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_serialize( + signature_request_id=signature_request_id, + signature_request_edit_request=signature_request_edit_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def signature_request_edit_without_preload_content( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_request: SignatureRequestEditRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Signature Request + + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_request: (required) + :type signature_request_edit_request: SignatureRequestEditRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_serialize( + signature_request_id=signature_request_id, + signature_request_edit_request=signature_request_edit_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _signature_request_edit_serialize( + self, + signature_request_id, + signature_request_edit_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_edit_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f"{param_name}[{index}]"] = item + else: + _files[param_name] = param_value + + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params["signature_request_id"] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if signature_request_edit_request is not None and has_files is False: + _body_params = signature_request_edit_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/signature_request/edit/{signature_request_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def signature_request_edit_embedded( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Edit Embedded Signature Request + + Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_request: (required) + :type signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def signature_request_edit_embedded_with_http_info( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Edit Embedded Signature Request + + Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_request: (required) + :type signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def signature_request_edit_embedded_without_preload_content( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Embedded Signature Request + + Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_request: (required) + :type signature_request_edit_embedded_request: SignatureRequestEditEmbeddedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_request=signature_request_edit_embedded_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _signature_request_edit_embedded_serialize( + self, + signature_request_id, + signature_request_edit_embedded_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_edit_embedded_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f"{param_name}[{index}]"] = item + else: + _files[param_name] = param_value + + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params["signature_request_id"] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if signature_request_edit_embedded_request is not None and has_files is False: + _body_params = signature_request_edit_embedded_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/signature_request/edit_embedded/{signature_request_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def signature_request_edit_embedded_with_template( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Edit Embedded Signature Request with Template + + Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_with_template_request: (required) + :type signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def signature_request_edit_embedded_with_template_with_http_info( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Edit Embedded Signature Request with Template + + Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_with_template_request: (required) + :type signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def signature_request_edit_embedded_with_template_without_preload_content( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Embedded Signature Request with Template + + Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_embedded_with_template_request: (required) + :type signature_request_edit_embedded_with_template_request: SignatureRequestEditEmbeddedWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_embedded_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_embedded_with_template_request=signature_request_edit_embedded_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _signature_request_edit_embedded_with_template_serialize( + self, + signature_request_id, + signature_request_edit_embedded_with_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_edit_embedded_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f"{param_name}[{index}]"] = item + else: + _files[param_name] = param_value + + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params["signature_request_id"] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if ( + signature_request_edit_embedded_with_template_request is not None + and has_files is False + ): + _body_params = signature_request_edit_embedded_with_template_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/signature_request/edit_embedded_with_template/{signature_request_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def signature_request_edit_with_template( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SignatureRequestGetResponse: + """Edit Signature Request With Template + + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_with_template_request: (required) + :type signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_with_template_request=signature_request_edit_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def signature_request_edit_with_template_with_http_info( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SignatureRequestGetResponse]: + """Edit Signature Request With Template + + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_with_template_request: (required) + :type signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_with_template_request=signature_request_edit_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def signature_request_edit_with_template_without_preload_content( + self, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to edit.") + ], + signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Signature Request With Template + + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + + :param signature_request_id: The id of the SignatureRequest to edit. (required) + :type signature_request_id: str + :param signature_request_edit_with_template_request: (required) + :type signature_request_edit_with_template_request: SignatureRequestEditWithTemplateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._signature_request_edit_with_template_serialize( + signature_request_id=signature_request_id, + signature_request_edit_with_template_request=signature_request_edit_with_template_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _signature_request_edit_with_template_serialize( + self, + signature_request_id, + signature_request_edit_with_template_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + has_files = False + body_param = signature_request_edit_with_template_request + excluded_json_fields = set([]) + for param_name, param_type in body_param.openapi_types().items(): + param_value = getattr(body_param, param_name) + if param_value is None: + continue + + if "io.IOBase" in param_type: + has_files = True + _content_type = "multipart/form-data" + excluded_json_fields.add(param_name) + + if isinstance(param_value, list): + for index, item in enumerate(param_value): + _files[f"{param_name}[{index}]"] = item + else: + _files[param_name] = param_value + + if has_files is True: + _form_params = body_param.to_json_form_params(excluded_json_fields) + + # process the path parameters + if signature_request_id is not None: + _path_params["signature_request_id"] = signature_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if ( + signature_request_edit_with_template_request is not None + and has_files is False + ): + _body_params = signature_request_edit_with_template_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["api_key", "oauth2"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/signature_request/edit_with_template/{signature_request_id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def signature_request_files( self, @@ -1675,7 +2895,9 @@ def _signature_request_files_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1928,7 +3150,9 @@ def _signature_request_files_as_data_uri_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2205,7 +3429,9 @@ def _signature_request_files_as_file_url_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2458,7 +3684,9 @@ def _signature_request_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2800,7 +4028,9 @@ def _signature_request_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3063,7 +4293,9 @@ def _signature_request_release_hold_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3328,7 +4560,9 @@ def _signature_request_remind_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -3611,7 +4845,9 @@ def _signature_request_remove_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3854,7 +5090,9 @@ def _signature_request_send_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -4129,7 +5367,9 @@ def _signature_request_send_with_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -4426,7 +5666,9 @@ def _signature_request_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/team_api.py b/sdks/python/dropbox_sign/api/team_api.py index 142d890c8..f59cf5eeb 100644 --- a/sdks/python/dropbox_sign/api/team_api.py +++ b/sdks/python/dropbox_sign/api/team_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -275,7 +275,9 @@ def _team_add_member_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -554,7 +556,9 @@ def _team_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -816,7 +820,9 @@ def _team_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1044,7 +1050,9 @@ def _team_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1291,7 +1299,9 @@ def _team_info_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1551,7 +1561,9 @@ def _team_invites_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1867,7 +1879,9 @@ def _team_members_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2118,7 +2132,9 @@ def _team_remove_member_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -2449,7 +2465,9 @@ def _team_sub_teams_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2700,7 +2718,9 @@ def _team_update_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index 87be9f0fd..3205675ea 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import Optional, Union +from typing import Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri @@ -287,7 +287,9 @@ def _template_add_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -564,7 +566,9 @@ def _template_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -839,7 +843,9 @@ def _template_create_embedded_draft_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1120,7 +1126,9 @@ def _template_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1397,7 +1405,9 @@ def _template_files_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1650,7 +1660,9 @@ def _template_files_as_data_uri_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1927,7 +1939,9 @@ def _template_files_as_file_url_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2180,7 +2194,9 @@ def _template_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2522,7 +2538,9 @@ def _template_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2807,7 +2825,9 @@ def _template_remove_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -3106,7 +3126,9 @@ def _template_update_files_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py index 620a71e90..4d4d74382 100644 --- a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py +++ b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import warnings @@ -261,7 +261,9 @@ def _unclaimed_draft_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -536,7 +538,9 @@ def _unclaimed_draft_create_embedded_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -811,7 +815,9 @@ def _unclaimed_draft_create_embedded_with_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False @@ -1111,7 +1117,9 @@ def _unclaimed_draft_edit_and_resend_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None has_files = False diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index 16e766078..800e07ad5 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -89,7 +89,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.8-dev/python" + self.user_agent = "OpenAPI-Generator/1.9.0-dev/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -398,12 +398,16 @@ def deserialize( data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match( + r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", + content_type, + re.IGNORECASE, + ): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException( @@ -507,7 +511,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -525,7 +529,21 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): + def files_parameters( + self, + files: Dict[ + str, + Union[ + str, + bytes, + List[str], + List[bytes], + Tuple[str, bytes, io.IOBase], + io.IOBase, + List[io.IOBase], + ], + ], + ): """Builds form parameters. :param files: File parameters. @@ -540,6 +558,12 @@ def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue elif isinstance(v, io.IOBase): filename = os.path.basename(v.name) filedata = v.read() diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index 016c4e591..7412dba20 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -1,27 +1,29 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import copy +import http.client as httplib import logging from logging import FileHandler import multiprocessing import sys -from typing import Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + import urllib3 -import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { "multipleOf", @@ -36,6 +38,107 @@ "minItems", } +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "api_key": BasicAuthSetting, + "oauth2": BearerFormatAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + class Configuration: """This class contains various settings of the API client. @@ -67,6 +170,8 @@ class Configuration: :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. :Example: @@ -86,25 +191,26 @@ class Configuration: """ - _default = None + _default: ClassVar[Optional[Self]] = None def __init__( self, - host=None, - api_key=None, - api_key_prefix=None, - username=None, - password=None, - access_token=None, - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, + host: Optional[str] = None, + api_key: Optional[Dict[str, str]] = None, + api_key_prefix: Optional[Dict[str, str]] = None, + username: Optional[str] = None, + password: Optional[str] = None, + access_token: Optional[str] = None, + server_index: Optional[int] = None, + server_variables: Optional[ServerVariablesT] = None, + server_operation_index: Optional[Dict[int, int]] = None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]] = None, + ignore_operation_servers: bool = False, + ssl_ca_cert: Optional[str] = None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, *, - debug: Optional[bool] = None + debug: Optional[bool] = None, ) -> None: """Constructor""" self._base_path = "https://api.hellosign.com/v3" if host is None else host @@ -179,6 +285,10 @@ def __init__( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ self.cert_file = None """client certificate file """ @@ -228,7 +338,7 @@ def __init__( """date format """ - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -242,11 +352,11 @@ def __deepcopy__(self, memo): result.debug = self.debug return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -257,7 +367,7 @@ def set_default(cls, default): cls._default = default @classmethod - def get_default_copy(cls): + def get_default_copy(cls) -> Self: """Deprecated. Please use `get_default` instead. Deprecated. Please use `get_default` instead. @@ -267,7 +377,7 @@ def get_default_copy(cls): return cls.get_default() @classmethod - def get_default(cls): + def get_default(cls) -> Self: """Return the default configuration. This method returns newly created, based on default constructor, @@ -277,11 +387,11 @@ def get_default(cls): :return: The configuration object. """ if cls._default is None: - cls._default = Configuration() + cls._default = cls() return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -293,7 +403,7 @@ def logger_file(self): return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -312,7 +422,7 @@ def logger_file(self, value): logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -321,7 +431,7 @@ def debug(self): return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -343,7 +453,7 @@ def debug(self, value): httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -354,7 +464,7 @@ def logger_format(self): return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -365,7 +475,9 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix( + self, identifier: str, alias: Optional[str] = None + ) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -384,7 +496,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -399,12 +513,12 @@ def get_basic_auth_token(self): "authorization" ) - def auth_settings(self): + def auth_settings(self) -> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} if self.username is not None: auth["api_key"] = { "type": "basic", @@ -422,7 +536,7 @@ def auth_settings(self): } return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -432,10 +546,12 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 3.0.0\n" - "SDK Version: 1.8-dev".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.9.0-dev".format( + env=sys.platform, pyversion=sys.version + ) ) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -447,7 +563,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -487,14 +608,14 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings( self.server_index, variables=self.server_variables ) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/sdks/python/dropbox_sign/exceptions.py b/sdks/python/dropbox_sign/exceptions.py index 43300ceac..4395d0c3d 100644 --- a/sdks/python/dropbox_sign/exceptions.py +++ b/sdks/python/dropbox_sign/exceptions.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 from typing import Any, Optional @@ -154,6 +154,15 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException( + http_resp=http_resp, body=body, data=data + ) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -190,6 +199,18 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index 97af4020e..fd5331ae1 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -2,15 +2,15 @@ # flake8: noqa """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -108,6 +108,18 @@ from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( SignatureRequestCreateEmbeddedWithTemplateRequest, ) +from dropbox_sign.models.signature_request_edit_embedded_request import ( + SignatureRequestEditEmbeddedRequest, +) +from dropbox_sign.models.signature_request_edit_embedded_with_template_request import ( + SignatureRequestEditEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_edit_request import ( + SignatureRequestEditRequest, +) +from dropbox_sign.models.signature_request_edit_with_template_request import ( + SignatureRequestEditWithTemplateRequest, +) from dropbox_sign.models.signature_request_get_response import ( SignatureRequestGetResponse, ) diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index eb0d37416..06eb22484 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountCreateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py index c1788e0e7..3bcabfd76 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.account_response import AccountResponse from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountCreateResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py index 1be99f48c..9a12adb80 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.account_response import AccountResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py index 8af0a6fb5..527377330 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.account_response_quotas import AccountResponseQuotas from dropbox_sign.models.account_response_usage import AccountResponseUsage -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index a58444549..d2b2ffbb0 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountResponseQuotas(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py index 8efc7a64b..6fc759346 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountResponseUsage(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py index 7b5c95ddf..a0cafd7c4 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountUpdateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py index a3a95c352..39804b0bc 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountVerifyRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py index c5f1960be..3b0ee8ddf 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ AccountVerifyResponseAccount, ) from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountVerifyResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/account_verify_response_account.py b/sdks/python/dropbox_sign/models/account_verify_response_account.py index 3724cd063..98f5fb302 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class AccountVerifyResponseAccount(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_create_request.py b/sdks/python/dropbox_sign/models/api_app_create_request.py index 4f7181b59..2e8e6a77b 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,16 +19,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_o_auth import SubOAuth from dropbox_sign.models.sub_options import SubOptions from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppCreateRequest(BaseModel): @@ -44,7 +44,9 @@ class ApiAppCreateRequest(BaseModel): default=None, description="The URL at which the ApiApp should receive event callbacks.", ) - custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + custom_logo_file: Optional[ + Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]] + ] = Field( default=None, description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)", ) diff --git a/sdks/python/dropbox_sign/models/api_app_get_response.py b/sdks/python/dropbox_sign/models/api_app_get_response.py index 5c03394e6..4337be1ee 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.api_app_response import ApiAppResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_list_response.py b/sdks/python/dropbox_sign/models/api_app_list_response.py index 748cc9365..98a950e09 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.api_app_response import ApiAppResponse from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py index a1f0bf157..ad4e87207 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -28,11 +28,11 @@ from dropbox_sign.models.api_app_response_white_labeling_options import ( ApiAppResponseWhiteLabelingOptions, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_response_o_auth.py b/sdks/python/dropbox_sign/models/api_app_response_o_auth.py index 981f94d9f..b078c1a71 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_o_auth.py +++ b/sdks/python/dropbox_sign/models/api_app_response_o_auth.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppResponseOAuth(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_response_options.py b/sdks/python/dropbox_sign/models/api_app_response_options.py index 751daf0de..ec34ed913 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppResponseOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_response_owner_account.py b/sdks/python/dropbox_sign/models/api_app_response_owner_account.py index c1ed456c8..d57994800 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_owner_account.py +++ b/sdks/python/dropbox_sign/models/api_app_response_owner_account.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppResponseOwnerAccount(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py b/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py index 734022f90..b5747219c 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppResponseWhiteLabelingOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/api_app_update_request.py b/sdks/python/dropbox_sign/models/api_app_update_request.py index e3f2a1abc..7e1f87206 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,16 +19,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_o_auth import SubOAuth from dropbox_sign.models.sub_options import SubOptions from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ApiAppUpdateRequest(BaseModel): @@ -40,7 +40,9 @@ class ApiAppUpdateRequest(BaseModel): default=None, description="The URL at which the API App should receive event callbacks.", ) - custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + custom_logo_file: Optional[ + Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]] + ] = Field( default=None, description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)", ) diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py index 749ba54b1..9461ccfa6 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -26,11 +26,11 @@ from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class BulkSendJobGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py b/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py index de4b9a20a..704089bef 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -32,11 +32,11 @@ from dropbox_sign.models.signature_request_response_signatures import ( SignatureRequestResponseSignatures, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class BulkSendJobGetResponseSignatureRequests(BaseModel): diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py index 91d471ccc..8f9791880 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class BulkSendJobListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_response.py index 0812cb85d..8d6eeeee0 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class BulkSendJobResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py index e340ab831..a2eca9737 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class BulkSendJobSendResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py index 525dfa828..849ebf426 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.sub_editor_options import SubEditorOptions from dropbox_sign.models.sub_merge_field import SubMergeField -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EmbeddedEditUrlRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py index 6c8ecc37a..653ca7c2c 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ EmbeddedEditUrlResponseEmbedded, ) from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EmbeddedEditUrlResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py b/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py index 3dfe4d2d2..67413cb9a 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EmbeddedEditUrlResponseEmbedded(BaseModel): diff --git a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py index ca92cdc23..f0e03a177 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ EmbeddedSignUrlResponseEmbedded, ) from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EmbeddedSignUrlResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py b/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py index 6de5a5b8e..dc7145702 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EmbeddedSignUrlResponseEmbedded(BaseModel): diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py index f85c24767..98c6e5a90 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List from dropbox_sign.models.error_response_error import ErrorResponseError -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ErrorResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index 6577b27e7..6991a0a27 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ErrorResponseError(BaseModel): diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py index 768983736..f8ac8473d 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ from dropbox_sign.models.event_callback_request_event import EventCallbackRequestEvent from dropbox_sign.models.signature_request_response import SignatureRequestResponse from dropbox_sign.models.template_response import TemplateResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EventCallbackRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/event_callback_request_event.py b/sdks/python/dropbox_sign/models/event_callback_request_event.py index 971fff98b..7f263da42 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.event_callback_request_event_metadata import ( EventCallbackRequestEventMetadata, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EventCallbackRequestEvent(BaseModel): diff --git a/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py b/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py index 572abb509..fee5309d9 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class EventCallbackRequestEventMetadata(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_get_response.py b/sdks/python/dropbox_sign/models/fax_get_response.py index 8c2b2249f..25bf9d2fd 100644 --- a/sdks/python/dropbox_sign/models/fax_get_response.py +++ b/sdks/python/dropbox_sign/models/fax_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.fax_response import FaxResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_line_add_user_request.py b/sdks/python/dropbox_sign/models/fax_line_add_user_request.py index aaa2b4763..7a7a92b60 100644 --- a/sdks/python/dropbox_sign/models/fax_line_add_user_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_add_user_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineAddUserRequest(BaseModel): @@ -32,7 +32,7 @@ class FaxLineAddUserRequest(BaseModel): FaxLineAddUserRequest """ # noqa: E501 - number: StrictStr = Field(description="The Fax Line number.") + number: StrictStr = Field(description="The Fax Line number") account_id: Optional[StrictStr] = Field(default=None, description="Account ID") email_address: Optional[StrictStr] = Field( default=None, description="Email address" diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py index 62b87eb08..94df88562 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py index cbe1eea81..e7994f3f5 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py index ac8722d39..4d41c9b56 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineAreaCodeGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py index 51f9da013..8cfe5ad2e 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/fax_line_create_request.py b/sdks/python/dropbox_sign/models/fax_line_create_request.py index 42e16de1a..7a8d88c34 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineCreateRequest(BaseModel): @@ -32,10 +32,13 @@ class FaxLineCreateRequest(BaseModel): FaxLineCreateRequest """ # noqa: E501 - area_code: StrictInt = Field(description="Area code") - country: StrictStr = Field(description="Country") - city: Optional[StrictStr] = Field(default=None, description="City") - account_id: Optional[StrictStr] = Field(default=None, description="Account ID") + area_code: StrictInt = Field(description="Area code of the new Fax Line") + country: StrictStr = Field(description="Country of the area code") + city: Optional[StrictStr] = Field(default=None, description="City of the area code") + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID of the account that will be assigned this new Fax Line", + ) __properties: ClassVar[List[str]] = ["area_code", "country", "city", "account_id"] @field_validator("country") diff --git a/sdks/python/dropbox_sign/models/fax_line_delete_request.py b/sdks/python/dropbox_sign/models/fax_line_delete_request.py index 7f5ebe5e7..9e966098b 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineDeleteRequest(BaseModel): @@ -32,7 +32,7 @@ class FaxLineDeleteRequest(BaseModel): FaxLineDeleteRequest """ # noqa: E501 - number: StrictStr = Field(description="The Fax Line number.") + number: StrictStr = Field(description="The Fax Line number") __properties: ClassVar[List[str]] = ["number"] model_config = ConfigDict( diff --git a/sdks/python/dropbox_sign/models/fax_line_list_response.py b/sdks/python/dropbox_sign/models/fax_line_list_response.py index 099c3cc55..07581a37e 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py b/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py index e36be3090..6021a0c84 100644 --- a/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineRemoveUserRequest(BaseModel): @@ -32,10 +32,12 @@ class FaxLineRemoveUserRequest(BaseModel): FaxLineRemoveUserRequest """ # noqa: E501 - number: StrictStr = Field(description="The Fax Line number.") - account_id: Optional[StrictStr] = Field(default=None, description="Account ID") + number: StrictStr = Field(description="The Fax Line number") + account_id: Optional[StrictStr] = Field( + default=None, description="Account ID of the user to remove access" + ) email_address: Optional[StrictStr] = Field( - default=None, description="Email address" + default=None, description="Email address of the user to remove access" ) __properties: ClassVar[List[str]] = ["number", "account_id", "email_address"] diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py index a719bc9fa..bb733f4da 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.fax_line_response_fax_line import FaxLineResponseFaxLine from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py b/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py index 7d89f44cc..8a0676cbe 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py +++ b/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.account_response import AccountResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxLineResponseFaxLine(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_list_response.py b/sdks/python/dropbox_sign/models/fax_list_response.py index b62b406e1..99140e3c0 100644 --- a/sdks/python/dropbox_sign/models/fax_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List from dropbox_sign.models.fax_response import FaxResponse from dropbox_sign.models.list_info_response import ListInfoResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_response.py b/sdks/python/dropbox_sign/models/fax_response.py index 976606e37..1648df8e2 100644 --- a/sdks/python/dropbox_sign/models/fax_response.py +++ b/sdks/python/dropbox_sign/models/fax_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.fax_response_transmission import FaxResponseTransmission -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_response_transmission.py b/sdks/python/dropbox_sign/models/fax_response_transmission.py index 28cf397a0..66c613dd2 100644 --- a/sdks/python/dropbox_sign/models/fax_response_transmission.py +++ b/sdks/python/dropbox_sign/models/fax_response_transmission.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxResponseTransmission(BaseModel): diff --git a/sdks/python/dropbox_sign/models/fax_send_request.py b/sdks/python/dropbox_sign/models/fax_send_request.py index 9fe6c54a3..c4f0af8c1 100644 --- a/sdks/python/dropbox_sign/models/fax_send_request.py +++ b/sdks/python/dropbox_sign/models/fax_send_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,12 +19,12 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FaxSendRequest(BaseModel): @@ -32,24 +32,30 @@ class FaxSendRequest(BaseModel): FaxSendRequest """ # noqa: E501 - recipient: StrictStr = Field(description="Fax Send To Recipient") + recipient: StrictStr = Field( + description="Recipient of the fax Can be a phone number in E.164 format or email address" + ) sender: Optional[StrictStr] = Field( default=None, description="Fax Send From Sender (used only with fax number)" ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( - default=None, description="Fax File to Send" + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both.", ) file_urls: Optional[List[StrictStr]] = Field( - default=None, description="Fax File URL to Send" + default=None, + description="Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both.", ) test_mode: Optional[StrictBool] = Field( default=False, description="API Test Mode Setting" ) cover_page_to: Optional[StrictStr] = Field( - default=None, description="Fax Cover Page for Recipient" + default=None, description="Fax cover page recipient information" ) cover_page_from: Optional[StrictStr] = Field( - default=None, description="Fax Cover Page for Sender" + default=None, description="Fax cover page sender information" ) cover_page_message: Optional[StrictStr] = Field( default=None, description="Fax Cover Page Message" diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py index e0479e3d6..434a4f1be 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FileResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/file_response_data_uri.py b/sdks/python/dropbox_sign/models/file_response_data_uri.py index c7c2e403f..da1384d66 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class FileResponseDataUri(BaseModel): diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py index b51627288..cdca4fa28 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ListInfoResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py b/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py index ff2aefb6b..06359f488 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class OAuthTokenGenerateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py b/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py index 573036386..025a5813b 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class OAuthTokenRefreshRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/o_auth_token_response.py b/sdks/python/dropbox_sign/models/o_auth_token_response.py index e42732a19..4b91161f4 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class OAuthTokenResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py index 4bed0f940..bdee2101e 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List from typing_extensions import Annotated -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ReportCreateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py index 6fc7ec8e0..3d781b9bd 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.report_response import ReportResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ReportCreateResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py index 2ed765c4a..f1fbe5148 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class ReportResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py index a3250eb3c..54fd997c1 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,16 +19,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): @@ -42,7 +42,9 @@ class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): client_id: StrictStr = Field( description="Client id of the app you're using to create this embedded signature request. Used for security purposes." ) - signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + signer_file: Optional[ + Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]] + ] = Field( default=None, description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py index 6c122576b..54cb9808f 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,16 +19,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestBulkSendWithTemplateRequest(BaseModel): @@ -39,7 +39,9 @@ class SignatureRequestBulkSendWithTemplateRequest(BaseModel): template_ids: List[StrictStr] = Field( description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." ) - signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + signer_file: Optional[ + Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]] + ] = Field( default=None, description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py b/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py index 8912b4560..72ef4be80 100644 --- a/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -27,7 +27,7 @@ StrictInt, StrictStr, ) -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_custom_field import SubCustomField @@ -42,11 +42,11 @@ ) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner from dropbox_sign.models.sub_signing_options import SubSigningOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestCreateEmbeddedRequest(BaseModel): @@ -57,7 +57,9 @@ class SignatureRequestCreateEmbeddedRequest(BaseModel): client_id: StrictStr = Field( description="Client id of the app you're using to create this embedded signature request. Used for security purposes." ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py index 2c7d080d7..07c2d0cfe 100644 --- a/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField @@ -27,11 +27,11 @@ SubSignatureRequestTemplateSigner, ) from dropbox_sign.models.sub_signing_options import SubSigningOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): @@ -60,7 +60,9 @@ class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): default=None, description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_edit_embedded_request.py b/sdks/python/dropbox_sign/models/signature_request_edit_embedded_request.py new file mode 100644 index 000000000..6e952ad78 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_edit_embedded_request.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, +) +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_attachment import SubAttachment +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_field_options import SubFieldOptions +from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup +from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) +from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SignatureRequestEditEmbeddedRequest(BaseModel): + """ + SignatureRequestEditEmbeddedRequest + """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app you're using to create this embedded signature request. Used for security purposes." + ) + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + signers: Optional[List[SubSignatureRequestSigner]] = Field( + default=None, + description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field( + default=None, + description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) + field_options: Optional[SubFieldOptions] = None + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_options: Optional[SubSigningOptions] = None + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "files", + "file_urls", + "signers", + "grouped_signers", + "allow_decline", + "allow_reassign", + "attachments", + "cc_email_addresses", + "custom_fields", + "field_options", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "message", + "metadata", + "signing_options", + "subject", + "test_mode", + "title", + "use_text_tags", + "populate_auto_fill_fields", + "expires_at", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestEditEmbeddedRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signers (list) + _items = [] + if self.signers: + for _item_signers in self.signers: + if _item_signers: + _items.append(_item_signers.to_dict()) + _dict["signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in grouped_signers (list) + _items = [] + if self.grouped_signers: + for _item_grouped_signers in self.grouped_signers: + if _item_grouped_signers: + _items.append(_item_grouped_signers.to_dict()) + _dict["grouped_signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict["attachments"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict["custom_fields"] = _items + # override the default output from pydantic by calling `to_dict()` of field_options + if self.field_options: + _dict["field_options"] = self.field_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) + _items = [] + if self.form_field_groups: + for _item_form_field_groups in self.form_field_groups: + if _item_form_field_groups: + _items.append(_item_form_field_groups.to_dict()) + _dict["form_field_groups"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) + _items = [] + if self.form_field_rules: + for _item_form_field_rules in self.form_field_rules: + if _item_form_field_rules: + _items.append(_item_form_field_rules.to_dict()) + _dict["form_field_rules"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) + _items = [] + if self.form_fields_per_document: + for _item_form_fields_per_document in self.form_fields_per_document: + if _item_form_fields_per_document: + _items.append(_item_form_fields_per_document.to_dict()) + _dict["form_fields_per_document"] = _items + # override the default output from pydantic by calling `to_dict()` of signing_options + if self.signing_options: + _dict["signing_options"] = self.signing_options.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestEditEmbeddedRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "signers": ( + [ + SubSignatureRequestSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "grouped_signers": ( + [ + SubSignatureRequestGroupedSigners.from_dict(_item) + for _item in obj["grouped_signers"] + ] + if obj.get("grouped_signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "client_id": "(str,)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "signers": "(List[SubSignatureRequestSigner],)", + "grouped_signers": "(List[SubSignatureRequestGroupedSigners],)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "custom_fields": "(List[SubCustomField],)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_text_tags": "(bool,)", + "populate_auto_fill_fields": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "files", + "file_urls", + "signers", + "grouped_signers", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + ] diff --git a/sdks/python/dropbox_sign/models/signature_request_edit_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_edit_embedded_with_template_request.py new file mode 100644 index 000000000..0061169bb --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_edit_embedded_with_template_request.py @@ -0,0 +1,290 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SignatureRequestEditEmbeddedWithTemplateRequest(BaseModel): + """ + SignatureRequestEditEmbeddedWithTemplateRequest + """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + client_id: StrictStr = Field( + description="Client id of the app you're using to create this embedded signature request. Used for security purposes." + ) + signers: List[SubSignatureRequestTemplateSigner] = Field( + description="Add Signers to your Templated-based Signature Request." + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", + ) + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_options: Optional[SubSigningOptions] = None + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "client_id", + "signers", + "allow_decline", + "ccs", + "custom_fields", + "files", + "file_urls", + "message", + "metadata", + "signing_options", + "subject", + "test_mode", + "title", + "populate_auto_fill_fields", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestEditEmbeddedWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signers (list) + _items = [] + if self.signers: + for _item_signers in self.signers: + if _item_signers: + _items.append(_item_signers.to_dict()) + _dict["signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) + _items = [] + if self.ccs: + for _item_ccs in self.ccs: + if _item_ccs: + _items.append(_item_ccs.to_dict()) + _dict["ccs"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict["custom_fields"] = _items + # override the default output from pydantic by calling `to_dict()` of signing_options + if self.signing_options: + _dict["signing_options"] = self.signing_options.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestEditEmbeddedWithTemplateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "client_id": obj.get("client_id"), + "signers": ( + [ + SubSignatureRequestTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "template_ids": "(List[str],)", + "client_id": "(str,)", + "signers": "(List[SubSignatureRequestTemplateSigner],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "custom_fields": "(List[SubCustomField],)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "populate_auto_fill_fields": "(bool,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "template_ids", + "signers", + "ccs", + "custom_fields", + "files", + "file_urls", + ] diff --git a/sdks/python/dropbox_sign/models/signature_request_edit_request.py b/sdks/python/dropbox_sign/models/signature_request_edit_request.py new file mode 100644 index 000000000..4bd18cf01 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_edit_request.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, +) +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_attachment import SubAttachment +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_field_options import SubFieldOptions +from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup +from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) +from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SignatureRequestEditRequest(BaseModel): + """ + SignatureRequestEditRequest + """ # noqa: E501 + + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + signers: Optional[List[SubSignatureRequestSigner]] = Field( + default=None, + description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field( + default=None, + description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) + field_options: Optional[SubFieldOptions] = None + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.", + ) + is_eid: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_options: Optional[SubSigningOptions] = None + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + __properties: ClassVar[List[str]] = [ + "files", + "file_urls", + "signers", + "grouped_signers", + "allow_decline", + "allow_reassign", + "attachments", + "cc_email_addresses", + "client_id", + "custom_fields", + "field_options", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "is_eid", + "message", + "metadata", + "signing_options", + "signing_redirect_url", + "subject", + "test_mode", + "title", + "use_text_tags", + "expires_at", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestEditRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signers (list) + _items = [] + if self.signers: + for _item_signers in self.signers: + if _item_signers: + _items.append(_item_signers.to_dict()) + _dict["signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in grouped_signers (list) + _items = [] + if self.grouped_signers: + for _item_grouped_signers in self.grouped_signers: + if _item_grouped_signers: + _items.append(_item_grouped_signers.to_dict()) + _dict["grouped_signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item_attachments in self.attachments: + if _item_attachments: + _items.append(_item_attachments.to_dict()) + _dict["attachments"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict["custom_fields"] = _items + # override the default output from pydantic by calling `to_dict()` of field_options + if self.field_options: + _dict["field_options"] = self.field_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) + _items = [] + if self.form_field_groups: + for _item_form_field_groups in self.form_field_groups: + if _item_form_field_groups: + _items.append(_item_form_field_groups.to_dict()) + _dict["form_field_groups"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) + _items = [] + if self.form_field_rules: + for _item_form_field_rules in self.form_field_rules: + if _item_form_field_rules: + _items.append(_item_form_field_rules.to_dict()) + _dict["form_field_rules"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) + _items = [] + if self.form_fields_per_document: + for _item_form_fields_per_document in self.form_fields_per_document: + if _item_form_fields_per_document: + _items.append(_item_form_fields_per_document.to_dict()) + _dict["form_fields_per_document"] = _items + # override the default output from pydantic by calling `to_dict()` of signing_options + if self.signing_options: + _dict["signing_options"] = self.signing_options.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestEditRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "signers": ( + [ + SubSignatureRequestSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "grouped_signers": ( + [ + SubSignatureRequestGroupedSigners.from_dict(_item) + for _item in obj["grouped_signers"] + ] + if obj.get("grouped_signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "signers": "(List[SubSignatureRequestSigner],)", + "grouped_signers": "(List[SubSignatureRequestGroupedSigners],)", + "allow_decline": "(bool,)", + "allow_reassign": "(bool,)", + "attachments": "(List[SubAttachment],)", + "cc_email_addresses": "(List[str],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "field_options": "(SubFieldOptions,)", + "form_field_groups": "(List[SubFormFieldGroup],)", + "form_field_rules": "(List[SubFormFieldRule],)", + "form_fields_per_document": "(List[SubFormFieldsPerDocumentBase],)", + "hide_text_tags": "(bool,)", + "is_eid": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + "use_text_tags": "(bool,)", + "expires_at": "(int,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "files", + "file_urls", + "signers", + "grouped_signers", + "attachments", + "cc_email_addresses", + "custom_fields", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + ] diff --git a/sdks/python/dropbox_sign/models/signature_request_edit_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_edit_with_template_request.py new file mode 100644 index 000000000..fedc9afd5 --- /dev/null +++ b/sdks/python/dropbox_sign/models/signature_request_edit_with_template_request.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from dropbox_sign.models.sub_cc import SubCC +from dropbox_sign.models.sub_custom_field import SubCustomField +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) +from dropbox_sign.models.sub_signing_options import SubSigningOptions +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SignatureRequestEditWithTemplateRequest(BaseModel): + """ """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + signers: List[SubSignatureRequestTemplateSigner] = Field( + description="Add Signers to your Templated-based Signature Request." + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", + ) + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + is_eid: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_options: Optional[SubSigningOptions] = None + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "signers", + "allow_decline", + "ccs", + "client_id", + "custom_fields", + "files", + "file_urls", + "is_eid", + "message", + "metadata", + "signing_options", + "signing_redirect_url", + "subject", + "test_mode", + "title", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SignatureRequestEditWithTemplateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in signers (list) + _items = [] + if self.signers: + for _item_signers in self.signers: + if _item_signers: + _items.append(_item_signers.to_dict()) + _dict["signers"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) + _items = [] + if self.ccs: + for _item_ccs in self.ccs: + if _item_ccs: + _items.append(_item_ccs.to_dict()) + _dict["ccs"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict["custom_fields"] = _items + # override the default output from pydantic by calling `to_dict()` of signing_options + if self.signing_options: + _dict["signing_options"] = self.signing_options.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SignatureRequestEditWithTemplateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "signers": ( + [ + SubSignatureRequestTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "template_ids": "(List[str],)", + "signers": "(List[SubSignatureRequestTemplateSigner],)", + "allow_decline": "(bool,)", + "ccs": "(List[SubCC],)", + "client_id": "(str,)", + "custom_fields": "(List[SubCustomField],)", + "files": "(List[io.IOBase],)", + "file_urls": "(List[str],)", + "is_eid": "(bool,)", + "message": "(str,)", + "metadata": "(Dict[str, object],)", + "signing_options": "(SubSigningOptions,)", + "signing_redirect_url": "(str,)", + "subject": "(str,)", + "test_mode": "(bool,)", + "title": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [ + "template_ids", + "signers", + "ccs", + "custom_fields", + "files", + "file_urls", + ] diff --git a/sdks/python/dropbox_sign/models/signature_request_get_response.py b/sdks/python/dropbox_sign/models/signature_request_get_response.py index 8a1c556f4..546c12ce3 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.signature_request_response import SignatureRequestResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_list_response.py b/sdks/python/dropbox_sign/models/signature_request_list_response.py index 02f8d7426..2df4cbfe3 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.signature_request_response import SignatureRequestResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_remind_request.py b/sdks/python/dropbox_sign/models/signature_request_remind_request.py index 21483ce2a..df37e043e 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestRemindRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py index e367012a3..7720256b8 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -32,11 +32,11 @@ from dropbox_sign.models.signature_request_response_signatures import ( SignatureRequestResponseSignatures, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py index a8f364ba7..30af75823 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseAttachment(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py index 03fd81e16..61ecdd69c 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py index 229a9f245..de55b64e5 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_custom_field_base import ( SignatureRequestResponseCustomFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseCustomFieldCheckbox( diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py index b4605b54f..48fa24f29 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_custom_field_base import ( SignatureRequestResponseCustomFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFieldBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py index db67d6872..8f715aea2 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_base.py b/sdks/python/dropbox_sign/models/signature_request_response_data_base.py index 1e72f17e7..374d2cc50 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_base.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py b/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py index edd8ac007..8c4d01dac 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py index 97dd0ebf9..4e258335d 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py index a48b3d07e..0a25a7ca7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py index b06f89be6..ac09c2600 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py index 94ea1c7f4..9eb735261 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py index f5a493c75..9a5f19055 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py index 8b531ece2..38b3cc04a 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py index 86461b32a..a928d102b 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py index df76cb604..7b5b782e5 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py index 15ffbb331..13b9591e9 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.signature_request_response_data_base import ( SignatureRequestResponseDataBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBase): diff --git a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py index 0a964e5f8..9b36e81f6 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestResponseSignatures(BaseModel): diff --git a/sdks/python/dropbox_sign/models/signature_request_send_request.py b/sdks/python/dropbox_sign/models/signature_request_send_request.py index 806a1def1..d1f7b7280 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -27,7 +27,7 @@ StrictInt, StrictStr, ) -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_custom_field import SubCustomField @@ -42,11 +42,11 @@ ) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner from dropbox_sign.models.sub_signing_options import SubSigningOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestSendRequest(BaseModel): @@ -54,7 +54,9 @@ class SignatureRequestSendRequest(BaseModel): SignatureRequestSendRequest """ # noqa: E501 - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py index 9c4045a3e..f09727801 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField @@ -27,11 +27,11 @@ SubSignatureRequestTemplateSigner, ) from dropbox_sign.models.sub_signing_options import SubSigningOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestSendWithTemplateRequest(BaseModel): @@ -59,7 +59,9 @@ class SignatureRequestSendWithTemplateRequest(BaseModel): default=None, description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/signature_request_update_request.py b/sdks/python/dropbox_sign/models/signature_request_update_request.py index 37c4e18b2..a5ec1ddc1 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SignatureRequestUpdateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py index a0c288d3a..82daeb1f5 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubAttachment(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py index d5d8edb45..899f57701 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -26,11 +26,11 @@ from dropbox_sign.models.sub_signature_request_template_signer import ( SubSignatureRequestTemplateSigner, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubBulkSignerList(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py index dbd925d79..0efdff283 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubBulkSignerListCustomField(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py index a0aa82906..fb14ef0c0 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubCC(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py index aa837bcdc..ec74927d1 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubCustomField(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py index 7e4315cbe..8693cfa02 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubEditorOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py index bd4ca3aa1..12336e67e 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFieldOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_form_field_group.py b/sdks/python/dropbox_sign/models/sub_form_field_group.py index 9a9964b90..a892d2147 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldGroup(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule.py b/sdks/python/dropbox_sign/models/sub_form_field_rule.py index 345122638..f09ac200c 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from typing_extensions import Annotated from dropbox_sign.models.sub_form_field_rule_action import SubFormFieldRuleAction from dropbox_sign.models.sub_form_field_rule_trigger import SubFormFieldRuleTrigger -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldRule(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py b/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py index 2e8eedfae..59be4336a 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -27,11 +27,11 @@ field_validator, ) from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldRuleAction(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py b/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py index 124a9212c..ff6c5beca 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldRuleTrigger(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py index 0f05fbeee..615f1089e 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py index f1765d128..90538984b 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py index 157a66f5c..aa947338f 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py index 298b43a5a..583a3a8e6 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentDateSigned(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py index 331b61720..c668c354e 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentDropdown(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py index 5244ac297..8865fdc9e 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py index f8c9d0c54..650d76679 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentHyperlink(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py index 8962b4cee..3383d7151 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py index 69407f506..a91bd8688 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py index e900a7500..11a056cb0 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py index b7f473dd3..c2e2c3ae4 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -30,11 +30,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentText(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py index 318deab88..990c2374a 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.sub_form_fields_per_document_base import ( SubFormFieldsPerDocumentBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubFormFieldsPerDocumentTextMerge(SubFormFieldsPerDocumentBase): diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py index e2ca1330f..e1d61ca05 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index dba544e80..e83058e97 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubMergeField(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py index 979d595aa..2c11784aa 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubOAuth(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py index bd4f00ae8..e7965f446 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py b/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py index 24671c921..a14f315f0 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubSignatureRequestGroupedSigners(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py index ac567d564..3337098c4 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubSignatureRequestSigner(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py b/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py index 44b6881d8..4d1e239ec 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubSignatureRequestTemplateSigner(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py index e6cd96000..717d3a8d7 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -27,11 +27,11 @@ field_validator, ) from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubSigningOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py index 98e55e192..5a3b7f74f 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubTeamResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py index 187fa77f9..fd407632c 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubTemplateRole(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py index fcc70e385..318fd8056 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubUnclaimedDraftSigner(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py index 2154537e8..a668e9fdc 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubUnclaimedDraftTemplateSigner(BaseModel): diff --git a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py index 218da2aea..9fe6f145c 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -27,11 +27,11 @@ field_validator, ) from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class SubWhiteLabelingOptions(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_add_member_request.py b/sdks/python/dropbox_sign/models/team_add_member_request.py index 275ccf00f..9fa1fbc88 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamAddMemberRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 0c0c696ad..94d38e66b 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamCreateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_get_info_response.py b/sdks/python/dropbox_sign/models/team_get_info_response.py index 3453baa20..e716e4daa 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.team_info_response import TeamInfoResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamGetInfoResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py index 65845b263..3c137e35a 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.team_response import TeamResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py index 4c6ae507f..b10d7cb82 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.team_parent_response import TeamParentResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamInfoResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py index fbc7d130a..0f377202b 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamInviteResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py index aa448daff..e6171e8fe 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.team_invite_response import TeamInviteResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamInvitesResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py index 0930eaa85..d59fc5d64 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamMemberResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py index f150d6ef4..73ed1c490 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.team_member_response import TeamMemberResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamMembersResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py index 633b10b61..2478765be 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamParentResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_remove_member_request.py b/sdks/python/dropbox_sign/models/team_remove_member_request.py index d21215dca..0df67abe9 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamRemoveMemberRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index 57bec3332..9f72e11fe 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.account_response import AccountResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_sub_teams_response.py b/sdks/python/dropbox_sign/models/team_sub_teams_response.py index 6d6b76c23..15e0a30c6 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.sub_team_response import SubTeamResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamSubTeamsResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py index e7bdb4307..9c4b17e55 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TeamUpdateRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_add_user_request.py b/sdks/python/dropbox_sign/models/template_add_user_request.py index 34c4ed62d..2e4447115 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateAddUserRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py index 983d872f7..808ba1ce8 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_editor_options import SubEditorOptions @@ -31,11 +31,11 @@ ) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_template_role import SubTemplateRole -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateEmbeddedDraftRequest(BaseModel): @@ -46,7 +46,9 @@ class TemplateCreateEmbeddedDraftRequest(BaseModel): client_id: StrictStr = Field( description="Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app." ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py index 5e728e79d..fb9a0eb9a 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ TemplateCreateEmbeddedDraftResponseTemplate, ) from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateEmbeddedDraftResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py index be23c205a..3016dce2e 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py index fa6df563c..532027646 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_field_options import SubFieldOptions @@ -30,11 +30,11 @@ ) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_template_role import SubTemplateRole -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateRequest(BaseModel): @@ -48,7 +48,9 @@ class TemplateCreateRequest(BaseModel): signer_roles: List[SubTemplateRole] = Field( description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template." ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index a42054f3c..bc5f6c6a2 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -24,11 +24,11 @@ TemplateCreateResponseTemplate, ) from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_create_response_template.py b/sdks/python/dropbox_sign/models/template_create_response_template.py index e4f253ef0..25d9bd7bd 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateCreateResponseTemplate(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py index 05b99f4c3..198813848 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateEditResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py index a32292b4f..10d714c52 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.template_response import TemplateResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateGetResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py index 5deebe214..5ccaba716 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.template_response import TemplateResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateListResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_remove_user_request.py b/sdks/python/dropbox_sign/models/template_remove_user_request.py index 565c47e32..44ddbf42e 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateRemoveUserRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index 01f36b353..667465fff 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -33,11 +33,11 @@ TemplateResponseDocumentFormFieldBase, ) from dropbox_sign.models.template_response_signer_role import TemplateResponseSignerRole -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index 71358ff84..d29db33d0 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_account_quota import ( TemplateResponseAccountQuota, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseAccount(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_account_quota.py b/sdks/python/dropbox_sign/models/template_response_account_quota.py index 6c03effe9..e4fa3668b 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseAccountQuota(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_cc_role.py b/sdks/python/dropbox_sign/models/template_response_cc_role.py index 8c005227d..89a3b4c88 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseCCRole(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py index 56e887bd0..d2f0cafb6 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -32,11 +32,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocument(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py index a7d2fa60c..6c6a35b7e 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py index 4edf644c2..35e391517 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_custom_field_base import ( TemplateResponseDocumentCustomFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentCustomFieldCheckbox( diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py index 760dd57a4..09a85e20f 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -26,11 +26,11 @@ from dropbox_sign.models.template_response_field_avg_text_length import ( TemplateResponseFieldAvgTextLength, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_field_group.py b/sdks/python/dropbox_sign/models/template_response_document_field_group.py index 201bd139e..8f3bc1a16 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_field_group.py +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_field_group_rule import ( TemplateResponseDocumentFieldGroupRule, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFieldGroup(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py b/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py index e5ade9d4e..17d81cbd9 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFieldGroupRule(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py index 62f6d5f5b..6f8777a3b 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py index 29c4ff1e8..d81d6572a 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py index 9b466fa1c..8ee5fe31b 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldDateSigned( diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py index 65b253c5d..2b30ae4c5 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py index 90f0c1f25..0102248d3 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -26,11 +26,11 @@ from dropbox_sign.models.template_response_field_avg_text_length import ( TemplateResponseFieldAvgTextLength, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py index bc8512b4f..64321add8 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py index 7e76f9e27..0f0c3443a 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py index 7e742cebe..c509f92ce 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_form_field_base import ( TemplateResponseDocumentFormFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py index c04d1b550..e6800d2ed 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -33,11 +33,11 @@ from dropbox_sign.models.template_response_field_avg_text_length import ( TemplateResponseFieldAvgTextLength, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py index 4c16302d2..d9735c703 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union from typing import TYPE_CHECKING diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py index ea1c2b787..0afba0d9f 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldCheckbox( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py index 3a9bf86e0..0b232a6c9 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldDateSigned( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py index 8444e77d8..7ac71ec4e 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldDropdown( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py index 43106f1b1..bdd27c9d2 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldHyperlink( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py index 884425354..bd755ee8e 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldInitials( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py index e0701f1cc..a78d5b803 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py index dbd12110f..c0ff8eee6 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldSignature( diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py index 7fe3d5925..03a3a4831 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_response_document_static_field_base import ( TemplateResponseDocumentStaticFieldBase, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFieldBase): diff --git a/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py b/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py index b3b5d4aff..1936e75ee 100644 --- a/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py +++ b/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseFieldAvgTextLength(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_response_signer_role.py b/sdks/python/dropbox_sign/models/template_response_signer_role.py index aab8250c4..2cada158d 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateResponseSignerRole(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_update_files_request.py b/sdks/python/dropbox_sign/models/template_update_files_request.py index e8d3f22cd..18612ddbf 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,13 +19,13 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateUpdateFilesRequest(BaseModel): @@ -37,7 +37,9 @@ class TemplateUpdateFilesRequest(BaseModel): default=None, description="Client id of the app you're using to update this template.", ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/template_update_files_response.py b/sdks/python/dropbox_sign/models/template_update_files_response.py index d2c07763a..67b1d3b68 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -23,11 +23,11 @@ from dropbox_sign.models.template_update_files_response_template import ( TemplateUpdateFilesResponseTemplate, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateUpdateFilesResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/template_update_files_response_template.py b/sdks/python/dropbox_sign/models/template_update_files_response_template.py index a8fb50fa3..2a8cd11ad 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response_template.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response_template.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class TemplateUpdateFilesResponseTemplate(BaseModel): diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py index 33b165023..53527e34c 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -28,7 +28,7 @@ StrictStr, field_validator, ) -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_custom_field import SubCustomField @@ -41,11 +41,11 @@ ) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftCreateEmbeddedRequest(BaseModel): @@ -57,7 +57,9 @@ class UnclaimedDraftCreateEmbeddedRequest(BaseModel): requester_email_address: StrictStr = Field( description="The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`." ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py index a09307d19..3ab702393 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField @@ -29,11 +29,11 @@ from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( SubUnclaimedDraftTemplateSigner, ) -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): @@ -68,7 +68,9 @@ class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): ) editor_options: Optional[SubEditorOptions] = None field_options: Optional[SubFieldOptions] = None - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py index 2833e239b..49a7aeec3 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -28,7 +28,7 @@ StrictStr, field_validator, ) -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_custom_field import SubCustomField @@ -40,11 +40,11 @@ ) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftCreateRequest(BaseModel): @@ -53,7 +53,9 @@ class UnclaimedDraftCreateRequest(BaseModel): type: StrictStr = Field( description="The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional." ) - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + files: Optional[ + List[Union[StrictBytes, StrictStr, io.IOBase, Tuple[StrictStr, StrictBytes, io.IOBase]]] + ] = Field( default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", ) diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py index 11ae0d902..085e5b907 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -22,11 +22,11 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.unclaimed_draft_response import UnclaimedDraftResponse from dropbox_sign.models.warning_response import WarningResponse -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftCreateResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py index 4b84d1031..38903beef 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.sub_editor_options import SubEditorOptions -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftEditAndResendRequest(BaseModel): diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py index 1cd950950..51fdcfa9b 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class UnclaimedDraftResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py index f5aa1277d..d2a26d5c3 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from typing import Optional, Set, Tuple +from typing import Optional, Set from typing_extensions import Self +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union class WarningResponse(BaseModel): diff --git a/sdks/python/dropbox_sign/rest.py b/sdks/python/dropbox_sign/rest.py index b369c3fde..4aaa80dbe 100644 --- a/sdks/python/dropbox_sign/rest.py +++ b/sdks/python/dropbox_sign/rest.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Dropbox Sign API +Dropbox Sign API - Dropbox Sign v3 API +Dropbox Sign v3 API - The version of the OpenAPI document: 3.0.0 - Contact: apisupport@hellosign.com - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -77,6 +77,7 @@ def __init__(self, configuration) -> None: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args["assert_hostname"] = configuration.assert_hostname @@ -212,7 +213,9 @@ def request( headers=headers, preload_content=False, ) - elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): + elif headers["Content-Type"].startswith("text/") and isinstance( + body, bool + ): request_body = "true" if body else "false" r = self.pool_manager.request( method, diff --git a/sdks/python/openapi-config.yaml b/sdks/python/openapi-config.yaml index 6f67258bc..891c500d1 100644 --- a/sdks/python/openapi-config.yaml +++ b/sdks/python/openapi-config.yaml @@ -2,10 +2,10 @@ generatorName: python typeMappings: "bytearray": "io.IOBase" additionalProperties: - generatorLanguageVersion: ">=3.7" + generatorLanguageVersion: ">=3.8" packageName: dropbox_sign projectName: dropbox-sign - packageVersion: 1.8-dev + packageVersion: 1.9.0-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true packageAuthor: Dropbox Sign API Team @@ -13,6 +13,9 @@ additionalProperties: infoName: Official Python SDK for the Dropbox Sign API useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.propertyNamingConvention: snake_case + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-__init__apis.mustache: templateType: SupportingFiles diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index 4821351a9..eac8984d0 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dropbox_sign" -version = "1.8-dev" +version = "1.9.0-dev" description = "Dropbox Sign API" authors = ["Official Python SDK for the Dropbox Sign API "] license = "MIT" @@ -10,19 +10,20 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Dropbox Sign API"] include = ["dropbox_sign/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" +urllib3 = ">= 1.25.3, < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" [tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" [build-system] @@ -48,7 +49,7 @@ warn_unused_ignores = true ## Getting these passing should be easy strict_equality = true -strict_concatenate = true +extra_checks = true ## Strongly recommend enabling this one as soon as you can check_untyped_defs = true @@ -69,3 +70,20 @@ disallow_any_generics = true # ### This one can be tricky to get passing if you use a lot of untyped libraries #warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "dropbox_sign.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/sdks/python/requirements.txt b/sdks/python/requirements.txt index cc85509ec..67f7f68df 100644 --- a/sdks/python/requirements.txt +++ b/sdks/python/requirements.txt @@ -1,5 +1,4 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/sdks/python/run-build b/sdks/python/run-build index bfa300872..179dec428 100755 --- a/sdks/python/run-build +++ b/sdks/python/run-build @@ -18,7 +18,7 @@ rm -f "${DIR}/dropbox_sign/models/"*.py docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 2018e9639..0a67c6226 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -23,11 +23,11 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "dropbox-sign" -VERSION = "1.8-dev" -PYTHON_REQUIRES = ">=3.7" +VERSION = "1.9.0-dev" +PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", ] diff --git a/sdks/python/templates/README.mustache b/sdks/python/templates/README.mustache index 5fe4264f5..bcbbacfdf 100644 --- a/sdks/python/templates/README.mustache +++ b/sdks/python/templates/README.mustache @@ -111,6 +111,7 @@ import {{{packageName}}} {{^useCustomTemplateCode}} ### Tests + Execute `pytest` to run the tests. {{/useCustomTemplateCode}} diff --git a/sdks/python/templates/README_onlypackage.mustache b/sdks/python/templates/README_onlypackage.mustache index ae547b1e6..2b8bd82e1 100644 --- a/sdks/python/templates/README_onlypackage.mustache +++ b/sdks/python/templates/README_onlypackage.mustache @@ -26,15 +26,21 @@ This python library package is generated without supporting files like setup.py To be able to use it, you will need these dependencies in your own package that uses this library: -* urllib3 >= 1.25.3 -* python-dateutil +* urllib3 >= 1.25.3, < 3.0.0 +* python-dateutil >= 2.8.2 {{#asyncio}} -* aiohttp +* aiohttp >= 3.8.4 +* aiohttp-retry >= 2.8.3 {{/asyncio}} {{#tornado}} -* tornado>=4.2,<5 +* tornado >= 4.2, < 5 {{/tornado}} -* pydantic +{{#hasHttpSignatureMethods}} +* pem >= 19.3.0 +* pycryptodome >= 3.9.0 +{{/hasHttpSignatureMethods}} +* pydantic >= 2 +* typing-extensions >= 4.7.1 ## Getting Started diff --git a/sdks/python/templates/api.mustache b/sdks/python/templates/api.mustache index 3a3c7cd29..f723aea42 100644 --- a/sdks/python/templates/api.mustache +++ b/sdks/python/templates/api.mustache @@ -104,7 +104,9 @@ class {{classname}}: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None {{#useCustomTemplateCode}} @@ -199,6 +201,9 @@ class {{classname}}: if isinstance({{paramName}}, str): with open({{paramName}}, "rb") as _fp: _body_params = _fp.read() + elif isinstance({{paramName}}, tuple): + # drop the filename from the tuple + _body_params = {{paramName}}[1] else: _body_params = {{paramName}} {{/isBinary}} diff --git a/sdks/python/templates/api_client.mustache b/sdks/python/templates/api_client.mustache index 69e75c9db..1ecc9b787 100644 --- a/sdks/python/templates/api_client.mustache +++ b/sdks/python/templates/api_client.mustache @@ -415,12 +415,12 @@ class ApiClient: data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): data = response_text else: raise ApiException( @@ -528,7 +528,7 @@ class ApiClient: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -546,12 +546,15 @@ class ApiClient: return "&".join(["=".join(map(str, item)) for item in new_params]) + def files_parameters( + self, {{^useCustomTemplateCode}} - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} - def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes, io.IOBase], io.IOBase, List[io.IOBase]]], {{/useCustomTemplateCode}} + ): """Builds form parameters. :param files: File parameters. @@ -566,6 +569,12 @@ class ApiClient: elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue {{#useCustomTemplateCode}} elif isinstance(v, io.IOBase): filename = os.path.basename(v.name) diff --git a/sdks/python/templates/api_doc.mustache b/sdks/python/templates/api_doc.mustache index ac6d3f8f2..b4e3ef55b 100644 --- a/sdks/python/templates/api_doc.mustache +++ b/sdks/python/templates/api_doc.mustache @@ -31,10 +31,14 @@ Method | HTTP request | Description > ```{{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}})``` {{/useCustomTemplateCode}} -{{{summary}}}{{#notes}} +{{#summary}} +{{{summary}}} -{{{.}}}{{/notes}} +{{/summary}} +{{#unescapedNotes}} +{{{.}}} +{{/unescapedNotes}} ### Example {{#hasAuthMethods}} diff --git a/sdks/python/templates/api_test.mustache b/sdks/python/templates/api_test.mustache index 5354d3cba..9d11c83f7 100644 --- a/sdks/python/templates/api_test.mustache +++ b/sdks/python/templates/api_test.mustache @@ -7,17 +7,31 @@ import unittest from {{apiPackage}}.{{classFilename}} import {{classname}} -class {{#operations}}Test{{classname}}(unittest.TestCase): +class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/asyncio}}TestCase): """{{classname}} unit test stubs""" + {{#asyncio}} + async def asyncSetUp(self) -> None: + self.api = {{classname}}() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + {{/asyncio}} + {{^asyncio}} def setUp(self) -> None: self.api = {{classname}}() def tearDown(self) -> None: pass + {{/asyncio}} {{#operation}} + {{#asyncio}} + async def test_{{operationId}}(self) -> None: + {{/asyncio}} + {{^asyncio}} def test_{{operationId}}(self) -> None: + {{/asyncio}} """Test case for {{{operationId}}} {{#summary}} diff --git a/sdks/python/templates/asyncio/rest.mustache b/sdks/python/templates/asyncio/rest.mustache index c3f864368..937e76ed5 100644 --- a/sdks/python/templates/asyncio/rest.mustache +++ b/sdks/python/templates/asyncio/rest.mustache @@ -44,51 +44,32 @@ class RESTClientObject: def __init__(self, configuration) -> None: # maxsize is number of requests to host that are allowed in parallel - maxsize = configuration.connection_pool_maxsize + self.maxsize = configuration.connection_pool_maxsize - ssl_context = ssl.create_default_context( - cafile=configuration.ssl_ca_cert + self.ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert, + cadata=configuration.ca_cert_data, ) if configuration.cert_file: - ssl_context.load_cert_chain( + self.ssl_context.load_cert_chain( configuration.cert_file, keyfile=configuration.key_file ) if not configuration.verify_ssl: - ssl_context.check_hostname = False - ssl_context.verify_mode = ssl.CERT_NONE - - connector = aiohttp.TCPConnector( - limit=maxsize, - ssl=ssl_context - ) + self.ssl_context.check_hostname = False + self.ssl_context.verify_mode = ssl.CERT_NONE self.proxy = configuration.proxy self.proxy_headers = configuration.proxy_headers - # https pool manager - self.pool_manager = aiohttp.ClientSession( - connector=connector, - trust_env=True - ) + self.retries = configuration.retries - retries = configuration.retries - self.retry_client: Optional[aiohttp_retry.RetryClient] - if retries is not None: - self.retry_client = aiohttp_retry.RetryClient( - client_session=self.pool_manager, - retry_options=aiohttp_retry.ExponentialRetry( - attempts=retries, - factor=2.0, - start_timeout=0.1, - max_timeout=120.0 - ) - ) - else: - self.retry_client = None + self.pool_manager: Optional[aiohttp.ClientSession] = None + self.retry_client: Optional[aiohttp_retry.RetryClient] = None - async def close(self): - await self.pool_manager.close() + async def close(self) -> None: + if self.pool_manager: + await self.pool_manager.close() if self.retry_client is not None: await self.retry_client.close() @@ -174,6 +155,11 @@ class RESTClientObject: content_type=v[2] ) else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) data.add_field(k, v) args["data"] = data @@ -190,16 +176,28 @@ class RESTClientObject: raise ApiException(status=0, reason=msg) pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient] - if self.retry_client is not None and method in ALLOW_RETRY_METHODS: + + # https pool manager + if self.pool_manager is None: + self.pool_manager = aiohttp.ClientSession( + connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context), + trust_env=True, + ) + pool_manager = self.pool_manager + + if self.retries is not None and method in ALLOW_RETRY_METHODS: + if self.retry_client is None: + self.retry_client = aiohttp_retry.RetryClient( + client_session=self.pool_manager, + retry_options=aiohttp_retry.ExponentialRetry( + attempts=self.retries, + factor=2.0, + start_timeout=0.1, + max_timeout=120.0 + ) + ) pool_manager = self.retry_client - else: - pool_manager = self.pool_manager r = await pool_manager.request(**args) return RESTResponse(r) - - - - - diff --git a/sdks/python/templates/configuration.mustache b/sdks/python/templates/configuration.mustache index 798fc0efb..9dfedc794 100644 --- a/sdks/python/templates/configuration.mustache +++ b/sdks/python/templates/configuration.mustache @@ -3,16 +3,21 @@ {{>partial_header}} import copy +import http.client as httplib import logging from logging import FileHandler {{^asyncio}} import multiprocessing {{/asyncio}} import sys -from typing import Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + import urllib3 -import http.client as httplib +{{#hasHttpSignatureMethods}} +from {{packageName}}.signing import HttpSigningConfiguration +{{/hasHttpSignatureMethods}} JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -20,6 +25,130 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { 'minLength', 'pattern', 'maxItems', 'minItems' } +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { +{{#authMethods}} +{{#isOAuth}} + "{{name}}": OAuth2AuthSetting, +{{/isOAuth}} +{{#isApiKey}} + "{{name}}": APIKeyAuthSetting, +{{/isApiKey}} +{{#isBasic}} + {{#isBasicBasic}} + "{{name}}": BasicAuthSetting, + {{/isBasicBasic}} + {{#isBasicBearer}} + {{#bearerFormat}} + "{{name}}": BearerFormatAuthSetting, + {{/bearerFormat}} + {{^bearerFormat}} + "{{name}}": BearerAuthSetting, + {{/bearerFormat}} + {{/isBasicBearer}} + {{#isHttpSignature}} + "{{name}}": HTTPSignatureAuthSetting, + {{/isHttpSignature}} +{{/isBasic}} +{{/authMethods}} + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + class Configuration: """This class contains various settings of the API client. @@ -54,6 +183,8 @@ class Configuration: :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. {{#hasAuthMethods}} :Example: @@ -145,23 +276,30 @@ conf = {{{packageName}}}.Configuration( {{/hasAuthMethods}} """ - _default = None + _default: ClassVar[Optional[Self]] = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, {{#hasHttpSignatureMethods}} - signing_info=None, + signing_info: Optional[HttpSigningConfiguration]=None, {{/hasHttpSignatureMethods}} - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: """Constructor """ self._base_path = "{{{basePath}}}" if host is None else host @@ -248,6 +386,10 @@ conf = {{{packageName}}}.Configuration( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ self.cert_file = None """client certificate file """ @@ -305,7 +447,7 @@ conf = {{{packageName}}}.Configuration( """date format """ - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -319,7 +461,7 @@ conf = {{{packageName}}}.Configuration( result.debug = self.debug return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) {{#hasHttpSignatureMethods}} if name == "signing_info" and value is not None: @@ -329,7 +471,7 @@ conf = {{{packageName}}}.Configuration( {{/hasHttpSignatureMethods}} @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -340,7 +482,7 @@ conf = {{{packageName}}}.Configuration( cls._default = default @classmethod - def get_default_copy(cls): + def get_default_copy(cls) -> Self: """Deprecated. Please use `get_default` instead. Deprecated. Please use `get_default` instead. @@ -350,7 +492,7 @@ conf = {{{packageName}}}.Configuration( return cls.get_default() @classmethod - def get_default(cls): + def get_default(cls) -> Self: """Return the default configuration. This method returns newly created, based on default constructor, @@ -360,11 +502,11 @@ conf = {{{packageName}}}.Configuration( :return: The configuration object. """ if cls._default is None: - cls._default = Configuration() + cls._default = cls() return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -376,7 +518,7 @@ conf = {{{packageName}}}.Configuration( return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -395,7 +537,7 @@ conf = {{{packageName}}}.Configuration( logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -404,7 +546,7 @@ conf = {{{packageName}}}.Configuration( return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -426,7 +568,7 @@ conf = {{{packageName}}}.Configuration( httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -437,7 +579,7 @@ conf = {{{packageName}}}.Configuration( return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -448,7 +590,7 @@ conf = {{{packageName}}}.Configuration( self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -465,7 +607,9 @@ conf = {{{packageName}}}.Configuration( else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -480,12 +624,12 @@ conf = {{{packageName}}}.Configuration( basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self): + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} {{#authMethods}} {{#isApiKey}} if '{{name}}' in self.api_key{{#vendorExtensions.x-auth-id-alias}} or '{{.}}' in self.api_key{{/vendorExtensions.x-auth-id-alias}}: @@ -548,7 +692,7 @@ conf = {{{packageName}}}.Configuration( {{/authMethods}} return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -557,15 +701,10 @@ conf = {{{packageName}}}.Configuration( "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: {{version}}\n"\ -{{^useCustomTemplateCode}} "SDK Package Version: {{packageVersion}}".\ -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - "SDK Version: {{packageVersion}}".\ -{{/useCustomTemplateCode}} format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -600,7 +739,12 @@ conf = {{{packageName}}}.Configuration( {{/servers}} ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -640,12 +784,12 @@ conf = {{{packageName}}}.Configuration( return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/sdks/python/templates/exceptions.mustache b/sdks/python/templates/exceptions.mustache index 65781d4c2..00157e3dd 100644 --- a/sdks/python/templates/exceptions.mustache +++ b/sdks/python/templates/exceptions.mustache @@ -148,6 +148,13 @@ class ApiException(OpenApiException): if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -186,6 +193,16 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/sdks/python/templates/github-workflow.mustache b/sdks/python/templates/github-workflow.mustache index 868124c0b..82ff5e8f1 100644 --- a/sdks/python/templates/github-workflow.mustache +++ b/sdks/python/templates/github-workflow.mustache @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -25,15 +25,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + pip install -r requirements.txt + pip install -r test-requirements.txt - name: Test with pytest run: | - pytest + pytest --cov=<%packageName%> diff --git a/sdks/python/templates/gitlab-ci.mustache b/sdks/python/templates/gitlab-ci.mustache index 8a6130a2f..10c70f616 100644 --- a/sdks/python/templates/gitlab-ci.mustache +++ b/sdks/python/templates/gitlab-ci.mustache @@ -14,9 +14,6 @@ stages: - pip install -r test-requirements.txt - pytest --cov={{{packageName}}} -pytest-3.7: - extends: .pytest - image: python:3.7-alpine pytest-3.8: extends: .pytest image: python:3.8-alpine @@ -29,3 +26,6 @@ pytest-3.10: pytest-3.11: extends: .pytest image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine diff --git a/sdks/python/templates/model_doc.mustache b/sdks/python/templates/model_doc.mustache index a63aea6a0..5b130c259 100644 --- a/sdks/python/templates/model_doc.mustache +++ b/sdks/python/templates/model_doc.mustache @@ -53,4 +53,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) {{/useCustomTemplateCode}} -{{/model}}{{/models}} \ No newline at end of file +{{/model}}{{/models}} diff --git a/sdks/python/templates/model_generic.mustache b/sdks/python/templates/model_generic.mustache index 6ffec5380..919bcd1f5 100644 --- a/sdks/python/templates/model_generic.mustache +++ b/sdks/python/templates/model_generic.mustache @@ -9,17 +9,12 @@ import json {{#vendorExtensions.x-py-model-imports}} {{{.}}} {{/vendorExtensions.x-py-model-imports}} -{{^useCustomTemplateCode}} from typing import Optional, Set -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -from typing import Optional, Set, Tuple -{{/useCustomTemplateCode}} from typing_extensions import Self {{#useCustomTemplateCode}} +from typing import Tuple, Union import io from pydantic import StrictBool -from typing import Union {{/useCustomTemplateCode}} {{#hasChildren}} @@ -28,7 +23,7 @@ from typing import Union from typing import TYPE_CHECKING if TYPE_CHECKING: {{#mappedModels}} - from {{packageName}}.models.{{model.classVarName}} import {{modelName}} + from {{packageName}}.models.{{model.classFilename}} import {{modelName}} {{/mappedModels}} {{/discriminator}} @@ -88,15 +83,22 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/isNullable}} {{/required}} + {{#isContainer}} {{#isArray}} for i in value: if i not in set([{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]): raise ValueError("each list item must be one of ({{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}})") {{/isArray}} - {{^isArray}} + {{#isMap}} + for i in value.values(): + if i not in set([{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]): + raise ValueError("dict values must be one of enum values ({{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}})") + {{/isMap}} + {{/isContainer}} + {{^isContainer}} if value not in set([{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}]): raise ValueError("must be one of enum values ({{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}})") - {{/isArray}} + {{/isContainer}} return value {{/isEnum}} {{/vars}} @@ -159,12 +161,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} """Create an instance of {{{classname}}} from a JSON string""" return cls.from_dict(json.loads(json_str)) -{{^useCustomTemplateCode}} - def to_dict(self) -> Dict[str, Any]: -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: -{{/useCustomTemplateCode}} + def to_dict(self{{#useCustomTemplateCode}}, excluded_fields: Set[str] = None{{/useCustomTemplateCode}}) -> Dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -294,7 +291,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} object_type = cls.get_discriminator_value(obj) {{#mappedModels}} if object_type == '{{{modelName}}}': - return import_module("{{packageName}}.models.{{model.classVarName}}").{{modelName}}.from_dict(obj) + return import_module("{{packageName}}.models.{{model.classFilename}}").{{modelName}}.from_dict(obj) {{/mappedModels}} raise ValueError("{{{classname}}} failed to lookup discriminator value from " + @@ -389,7 +386,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/items.isContainer}} {{/items.isEnumOrRef}} {{#items.isEnumOrRef}} - "{{{baseName}}}": dict((_k, _v) for _k, _v in obj.get("{{{baseName}}}").items()){{^-last}},{{/-last}} + "{{{baseName}}}": dict((_k, _v) for _k, _v in obj.get("{{{baseName}}}").items()) if obj.get("{{{baseName}}}") is not None else None{{^-last}},{{/-last}} {{/items.isEnumOrRef}} {{/items.isPrimitiveType}} {{#items.isPrimitiveType}} diff --git a/sdks/python/templates/pyproject.mustache b/sdks/python/templates/pyproject.mustache index 24030f9e9..8dab7dec7 100644 --- a/sdks/python/templates/pyproject.mustache +++ b/sdks/python/templates/pyproject.mustache @@ -5,35 +5,36 @@ description = "{{{appName}}}" authors = ["{{infoName}}{{^infoName}}OpenAPI Generator Community{{/infoName}} <{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}>"] license = "{{{licenseInfo}}}{{^licenseInfo}}NoLicense{{/licenseInfo}}" readme = "README.md" -repository = "https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}" +repository = "https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}" keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"] include = ["{{packageName}}/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" +urllib3 = ">= 1.25.3, < 3.0.0" +python-dateutil = ">= 2.8.2" {{#asyncio}} aiohttp = ">= 3.8.4" aiohttp-retry = ">= 2.8.3" {{/asyncio}} {{#tornado}} -tornado = ">=4.2,<5" +tornado = ">=4.2, <5" {{/tornado}} {{#hasHttpSignatureMethods}} pem = ">= 19.3.0" pycryptodome = ">= 3.9.0" {{/hasHttpSignatureMethods}} -pydantic = ">=2" -typing-extensions = ">=4.7.1" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" [tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" [build-system] @@ -59,7 +60,7 @@ warn_unused_ignores = true ## Getting these passing should be easy strict_equality = true -strict_concatenate = true +extra_checks = true ## Strongly recommend enabling this one as soon as you can check_untyped_defs = true @@ -80,3 +81,20 @@ disallow_any_generics = true # ### This one can be tricky to get passing if you use a lot of untyped libraries #warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "{{{packageName}}}.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/sdks/python/templates/requirements.mustache b/sdks/python/templates/requirements.mustache index 5412515b5..82746ec22 100644 --- a/sdks/python/templates/requirements.mustache +++ b/sdks/python/templates/requirements.mustache @@ -1,12 +1,15 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 2 -typing-extensions >= 4.7.1 +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 {{#asyncio}} -aiohttp >= 3.0.0 +aiohttp >= 3.8.4 aiohttp-retry >= 2.8.3 {{/asyncio}} +{{#tornado}} +tornado = ">= 4.2, < 5" +{{/tornado}} {{#hasHttpSignatureMethods}} +pem >= 19.3.0 pycryptodome >= 3.9.0 {{/hasHttpSignatureMethods}} +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/sdks/python/templates/rest.mustache b/sdks/python/templates/rest.mustache index 07aa7ee3f..f545066bb 100644 --- a/sdks/python/templates/rest.mustache +++ b/sdks/python/templates/rest.mustache @@ -66,6 +66,7 @@ class RESTClientObject: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args['assert_hostname'] = ( @@ -215,7 +216,7 @@ class RESTClientObject: headers=headers, preload_content=False ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, diff --git a/sdks/python/templates/setup.mustache b/sdks/python/templates/setup.mustache index ec5a2efff..be7880b0a 100644 --- a/sdks/python/templates/setup.mustache +++ b/sdks/python/templates/setup.mustache @@ -15,23 +15,20 @@ from pathlib import Path # http://pypi.python.org/pypi/setuptools NAME = "{{{projectName}}}" VERSION = "{{packageVersion}}" -PYTHON_REQUIRES = ">=3.7" -{{#apiInfo}} -{{#apis}} -{{#-last}} +PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", {{#asyncio}} - "aiohttp >= 3.0.0", + "aiohttp >= 3.8.4", "aiohttp-retry >= 2.8.3", {{/asyncio}} {{#tornado}} - "tornado>=4.2,<5", + "tornado>=4.2, < 5", {{/tornado}} {{#hasHttpSignatureMethods}} - "pem>=19.3.0", - "pycryptodome>=3.9.0", + "pem >= 19.3.0", + "pycryptodome >= 3.9.0", {{/hasHttpSignatureMethods}} "pydantic >= 2", "typing-extensions >= 4.7.1", @@ -60,9 +57,10 @@ setup( include_package_data=True, {{^useCustomTemplateCode}} {{#licenseInfo}}license="{{.}}", - {{/licenseInfo}}long_description="""\ - {{appDescription}} # noqa: E501 - """ + {{/licenseInfo}}long_description_content_type='text/markdown', + long_description="""\ + {{appDescription}} + """, # noqa: E501 {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} {{#licenseInfo}}license="{{.}}", @@ -71,6 +69,3 @@ setup( {{/useCustomTemplateCode}} package_data={"{{{packageName}}}": ["py.typed"]}, ) -{{/-last}} -{{/apis}} -{{/apiInfo}} diff --git a/sdks/python/templates/test-requirements.mustache b/sdks/python/templates/test-requirements.mustache index cbff657b6..9453a41d9 100644 --- a/sdks/python/templates/test-requirements.mustache +++ b/sdks/python/templates/test-requirements.mustache @@ -1,6 +1,9 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 -mypy>=1.4.1 -types-python-dateutil>=2.8.19 +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 +{{#useCustomTemplateCode}} black>=24.8.0 +{{/useCustomTemplateCode}} diff --git a/sdks/python/templates/travis.mustache b/sdks/python/templates/travis.mustache index 53cb57e84..155d9a763 100644 --- a/sdks/python/templates/travis.mustache +++ b/sdks/python/templates/travis.mustache @@ -1,13 +1,13 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch + #- "3.12-dev" # 3.12 development branch #- "nightly" # nightly build # command to install dependencies install: diff --git a/sdks/python/test-requirements.txt b/sdks/python/test-requirements.txt index cbff657b6..66589730f 100644 --- a/sdks/python/test-requirements.txt +++ b/sdks/python/test-requirements.txt @@ -1,6 +1,7 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 -mypy>=1.4.1 -types-python-dateutil>=2.8.19 +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 black>=24.8.0 diff --git a/sdks/ruby/.travis.yml b/sdks/ruby/.travis.yml index 9c71665a9..930fa651d 100644 --- a/sdks/ruby/.travis.yml +++ b/sdks/ruby/.travis.yml @@ -8,4 +8,4 @@ script: - bundle install --path vendor/bundle - bundle exec rspec - gem build dropbox-sign.gemspec - - gem install ./dropbox-sign-1.8-dev.gem + - gem install ./dropbox-sign-1.8.1-dev.gem diff --git a/sdks/ruby/Gemfile.lock b/sdks/ruby/Gemfile.lock index 46f2f4262..c5eb62d9f 100644 --- a/sdks/ruby/Gemfile.lock +++ b/sdks/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dropbox-sign (1.8.pre.dev) + dropbox-sign (1.8.1.pre.dev) typhoeus (~> 1.0, >= 1.0.1) GEM @@ -13,10 +13,10 @@ GEM diff-lcs (1.5.1) ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.17.0-aarch64-linux-gnu) - ffi (1.17.0-arm64-darwin) - ffi (1.17.0-x86_64-darwin) - ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) json (2.7.2) json_spec (1.1.5) multi_json (~> 1.0) diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index a30ca97c0..0a8dd3562 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -25,8 +25,8 @@ directory that corresponds to the file you want updated. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 3.0.0 -- Package version: 1.8-dev -- Generator version: 7.8.0 +- Package version: 1.8.1-dev +- Generator version: 7.12.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -47,15 +47,15 @@ gem build dropbox-sign.gemspec Then install the gem locally: ```shell -gem install ./dropbox-sign-1.8-dev.gem +gem install ./dropbox-sign-1.8.1-dev.gem ``` -(for development, run `gem install --dev ./dropbox-sign-1.8-dev.gem` to install the development dependencies) +(for development, run `gem install --dev ./dropbox-sign-1.8.1-dev.gem` to install the development dependencies) Finally add this to the Gemfile: - gem 'dropbox-sign', '~> 1.8-dev' + gem 'dropbox-sign', '~> 1.8.1-dev' ### Install from Git @@ -77,26 +77,25 @@ Please follow the [installation](#installation) procedure and then run the follo ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountCreateRequest.new -data.email_address = "newuser@dropboxsign.com" +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" begin - result = account_api.account_create(data) - p result + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling AccountApi#account_create: #{e}" end ``` @@ -122,7 +121,7 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::EmbeddedApi* | [**embedded_edit_url**](docs/EmbeddedApi.md#embedded_edit_url) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL | |*Dropbox::Sign::EmbeddedApi* | [**embedded_sign_url**](docs/EmbeddedApi.md#embedded_sign_url) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL | |*Dropbox::Sign::FaxApi* | [**fax_delete**](docs/FaxApi.md#fax_delete) | **DELETE** /fax/{fax_id} | Delete Fax | -|*Dropbox::Sign::FaxApi* | [**fax_files**](docs/FaxApi.md#fax_files) | **GET** /fax/files/{fax_id} | List Fax Files | +|*Dropbox::Sign::FaxApi* | [**fax_files**](docs/FaxApi.md#fax_files) | **GET** /fax/files/{fax_id} | Download Fax Files | |*Dropbox::Sign::FaxApi* | [**fax_get**](docs/FaxApi.md#fax_get) | **GET** /fax/{fax_id} | Get Fax | |*Dropbox::Sign::FaxApi* | [**fax_list**](docs/FaxApi.md#fax_list) | **GET** /fax/list | Lists Faxes | |*Dropbox::Sign::FaxApi* | [**fax_send**](docs/FaxApi.md#fax_send) | **POST** /fax/send | Send Fax | @@ -141,6 +140,10 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_cancel**](docs/SignatureRequestApi.md#signature_request_cancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_create_embedded**](docs/SignatureRequestApi.md#signature_request_create_embedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_create_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_create_embedded_with_template) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +|*Dropbox::Sign::SignatureRequestApi* | [**signature_request_edit**](docs/SignatureRequestApi.md#signature_request_edit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +|*Dropbox::Sign::SignatureRequestApi* | [**signature_request_edit_embedded**](docs/SignatureRequestApi.md#signature_request_edit_embedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +|*Dropbox::Sign::SignatureRequestApi* | [**signature_request_edit_embedded_with_template**](docs/SignatureRequestApi.md#signature_request_edit_embedded_with_template) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +|*Dropbox::Sign::SignatureRequestApi* | [**signature_request_edit_with_template**](docs/SignatureRequestApi.md#signature_request_edit_with_template) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_files**](docs/SignatureRequestApi.md#signature_request_files) | **GET** /signature_request/files/{signature_request_id} | Download Files | |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_files_as_data_uri**](docs/SignatureRequestApi.md#signature_request_files_as_data_uri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | |*Dropbox::Sign::SignatureRequestApi* | [**signature_request_files_as_file_url**](docs/SignatureRequestApi.md#signature_request_files_as_file_url) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -244,6 +247,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest](docs/SignatureRequestBulkSendWithTemplateRequest.md) - [Dropbox::Sign::SignatureRequestCreateEmbeddedRequest](docs/SignatureRequestCreateEmbeddedRequest.md) - [Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest](docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md) + - [Dropbox::Sign::SignatureRequestEditEmbeddedRequest](docs/SignatureRequestEditEmbeddedRequest.md) + - [Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest](docs/SignatureRequestEditEmbeddedWithTemplateRequest.md) + - [Dropbox::Sign::SignatureRequestEditRequest](docs/SignatureRequestEditRequest.md) + - [Dropbox::Sign::SignatureRequestEditWithTemplateRequest](docs/SignatureRequestEditWithTemplateRequest.md) - [Dropbox::Sign::SignatureRequestGetResponse](docs/SignatureRequestGetResponse.md) - [Dropbox::Sign::SignatureRequestListResponse](docs/SignatureRequestListResponse.md) - [Dropbox::Sign::SignatureRequestRemindRequest](docs/SignatureRequestRemindRequest.md) diff --git a/sdks/ruby/VERSION b/sdks/ruby/VERSION index d82db9132..00f91b858 100644 --- a/sdks/ruby/VERSION +++ b/sdks/ruby/VERSION @@ -1 +1 @@ -1.8-dev +1.8.1-dev diff --git a/sdks/ruby/docs/AccountApi.md b/sdks/ruby/docs/AccountApi.md index d2c439de5..ebae7148b 100644 --- a/sdks/ruby/docs/AccountApi.md +++ b/sdks/ruby/docs/AccountApi.md @@ -21,26 +21,25 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountCreateRequest.new -data.email_address = "newuser@dropboxsign.com" +account_create_request = Dropbox::Sign::AccountCreateRequest.new +account_create_request.email_address = "newuser@dropboxsign.com" begin - result = account_api.account_create(data) - p result + response = Dropbox::Sign::AccountApi.new.account_create( + account_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling AccountApi#account_create: #{e}" end ``` @@ -94,23 +93,20 @@ Returns the properties and settings of your Account. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -account_api = Dropbox::Sign::AccountApi.new - begin - result = account_api.account_get({ email_address: "jack@example.com" }) - p result + response = Dropbox::Sign::AccountApi.new.account_get + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling AccountApi#account_get: #{e}" end ``` @@ -165,26 +161,26 @@ Updates the properties and settings of your Account. Currently only allows for u ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountUpdateRequest.new -data.callback_url = "https://www.example.com/callback" +account_update_request = Dropbox::Sign::AccountUpdateRequest.new +account_update_request.callback_url = "https://www.example.com/callback" +account_update_request.locale = "en-US" begin - result = account_api.account_update(data) - p result + response = Dropbox::Sign::AccountApi.new.account_update( + account_update_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling AccountApi#account_update: #{e}" end ``` @@ -238,26 +234,25 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -account_api = Dropbox::Sign::AccountApi.new - -data = Dropbox::Sign::AccountVerifyRequest.new -data.email_address = "some_user@dropboxsign.com" +account_verify_request = Dropbox::Sign::AccountVerifyRequest.new +account_verify_request.email_address = "some_user@dropboxsign.com" begin - result = account_api.account_verify(data) - p result + response = Dropbox::Sign::AccountApi.new.account_verify( + account_verify_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling AccountApi#account_verify: #{e}" end ``` diff --git a/sdks/ruby/docs/ApiAppApi.md b/sdks/ruby/docs/ApiAppApi.md index 4a3262639..10b5fac53 100644 --- a/sdks/ruby/docs/ApiAppApi.md +++ b/sdks/ruby/docs/ApiAppApi.md @@ -22,40 +22,42 @@ Creates a new API App. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api_app_api = Dropbox::Sign::ApiAppApi.new - oauth = Dropbox::Sign::SubOAuth.new oauth.callback_url = "https://example.com/oauth" -oauth.scopes = %w[basic_account_info request_signature] +oauth.scopes = [ + "basic_account_info", + "request_signature", +] white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new white_labeling_options.primary_button_color = "#00b3e6" white_labeling_options.primary_button_text_color = "#ffffff" -custom_logo_file = File.new('./CustomLogoFile.png') - -data = Dropbox::Sign::ApiAppCreateRequest.new -data.name = "My Production App" -data.domains = ["example.com"] -data.oauth = oauth -data.white_labeling_options = white_labeling_options -data.custom_logo_file = custom_logo_file +api_app_create_request = Dropbox::Sign::ApiAppCreateRequest.new +api_app_create_request.name = "My Production App" +api_app_create_request.domains = [ + "example.com", +] +api_app_create_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_create_request.oauth = oauth +api_app_create_request.white_labeling_options = white_labeling_options begin - result = api_app_api.api_app_create(data) - p result + response = Dropbox::Sign::ApiAppApi.new.api_app_create( + api_app_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ApiAppApi#api_app_create: #{e}" end ``` @@ -109,25 +111,20 @@ Deletes an API App. Can only be invoked for apps you own. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api_app_api = Dropbox::Sign::ApiAppApi.new - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - begin - result = api_app_api.api_app_delete(client_id) - p result + Dropbox::Sign::ApiAppApi.new.api_app_delete( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ApiAppApi#api_app_delete: #{e}" end ``` @@ -181,25 +178,22 @@ Returns an object with information about an API App. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api_app_api = Dropbox::Sign::ApiAppApi.new - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - begin - result = api_app_api.api_app_get(client_id) - p result + response = Dropbox::Sign::ApiAppApi.new.api_app_get( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ApiAppApi#api_app_get: #{e}" end ``` @@ -253,26 +247,25 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api_app_api = Dropbox::Sign::ApiAppApi.new - -page = 1 -page_size = 2 - begin - result = api_app_api.api_app_list({ page: page, page_size: page_size }) - p result + response = Dropbox::Sign::ApiAppApi.new.api_app_list( + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ApiAppApi#api_app_list: #{e}" end ``` @@ -327,37 +320,44 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api_app_api = Dropbox::Sign::ApiAppApi.new +oauth = Dropbox::Sign::SubOAuth.new +oauth.callback_url = "https://example.com/oauth" +oauth.scopes = [ + "basic_account_info", + "request_signature", +] white_labeling_options = Dropbox::Sign::SubWhiteLabelingOptions.new white_labeling_options.primary_button_color = "#00b3e6" white_labeling_options.primary_button_text_color = "#ffffff" -custom_logo_file = File.new('./CustomLogoFile.png') - -data = Dropbox::Sign::ApiAppUpdateRequest.new -data.name = "New Name" -data.callback_url = "http://example.com/dropboxsign" -data.white_labeling_options = white_labeling_options -data.custom_logo_file = custom_logo_file - -client_id = "0dd3b823a682527788c4e40cb7b6f7e9" +api_app_update_request = Dropbox::Sign::ApiAppUpdateRequest.new +api_app_update_request.callback_url = "https://example.com/dropboxsign" +api_app_update_request.name = "New Name" +api_app_update_request.domains = [ + "example.com", +] +api_app_update_request.custom_logo_file = File.new("CustomLogoFile.png", "r") +api_app_update_request.oauth = oauth +api_app_update_request.white_labeling_options = white_labeling_options begin - result = api_app_api.api_app_update(client_id, data) - p result + response = Dropbox::Sign::ApiAppApi.new.api_app_update( + "0dd3b823a682527788c4e40cb7b6f7e9", # client_id + api_app_update_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ApiAppApi#api_app_update: #{e}" end ``` diff --git a/sdks/ruby/docs/BulkSendJobApi.md b/sdks/ruby/docs/BulkSendJobApi.md index bb42dd625..0771fbcde 100644 --- a/sdks/ruby/docs/BulkSendJobApi.md +++ b/sdks/ruby/docs/BulkSendJobApi.md @@ -19,25 +19,26 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -bulk_send_job_api = Dropbox::Sign::BulkSendJobApi.new - -bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - begin - result = bulk_send_job_api.bulk_send_job_get(bulk_send_job_id) - p result + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_get( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", # bulk_send_job_id + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling BulkSendJobApi#bulk_send_job_get: #{e}" end ``` @@ -93,26 +94,25 @@ Returns a list of BulkSendJob that you can access. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -bulk_send_job_api = Dropbox::Sign::BulkSendJobApi.new - -page = 1 -page_size = 20 - begin - result = bulk_send_job_api.bulk_send_job_list({ page: page, page_size: page_size }) - p result + response = Dropbox::Sign::BulkSendJobApi.new.bulk_send_job_list( + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling BulkSendJobApi#bulk_send_job_list: #{e}" end ``` diff --git a/sdks/ruby/docs/EmbeddedApi.md b/sdks/ruby/docs/EmbeddedApi.md index af26da64d..998c914b3 100644 --- a/sdks/ruby/docs/EmbeddedApi.md +++ b/sdks/ruby/docs/EmbeddedApi.md @@ -19,29 +19,32 @@ Retrieves an embedded object containing a template url that can be opened in an ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api = Dropbox::Sign::EmbeddedApi.new - -data = Dropbox::Sign::EmbeddedEditUrlRequest.new -data.cc_roles = [""] -data.merge_fields = [] +merge_fields = [ +] -template_id = "5de8179668f2033afac48da1868d0093bf133266" +embedded_edit_url_request = Dropbox::Sign::EmbeddedEditUrlRequest.new +embedded_edit_url_request.cc_roles = [ + "", +] +embedded_edit_url_request.merge_fields = merge_fields begin - result = embedded_api.embedded_edit_url(template_id, data) - p result + response = Dropbox::Sign::EmbeddedApi.new.embedded_edit_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + embedded_edit_url_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling EmbeddedApi#embedded_edit_url: #{e}" end ``` @@ -96,25 +99,22 @@ Retrieves an embedded object containing a signature url that can be opened in an ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -api = Dropbox::Sign::EmbeddedApi.new - -signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - begin - result = embedded_api.embedded_sign_url(signature_id) - p result + response = Dropbox::Sign::EmbeddedApi.new.embedded_sign_url( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b", # signature_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling EmbeddedApi#embedded_sign_url: #{e}" end ``` diff --git a/sdks/ruby/docs/FaxApi.md b/sdks/ruby/docs/FaxApi.md index 23129b6d7..310c9a34b 100644 --- a/sdks/ruby/docs/FaxApi.md +++ b/sdks/ruby/docs/FaxApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [`fax_delete`](FaxApi.md#fax_delete) | **DELETE** `/fax/{fax_id}` | Delete Fax | -| [`fax_files`](FaxApi.md#fax_files) | **GET** `/fax/files/{fax_id}` | List Fax Files | +| [`fax_files`](FaxApi.md#fax_files) | **GET** `/fax/files/{fax_id}` | Download Fax Files | | [`fax_get`](FaxApi.md#fax_get) | **GET** `/fax/{fax_id}` | Get Fax | | [`fax_list`](FaxApi.md#fax_list) | **GET** `/fax/list` | Lists Faxes | | [`fax_send`](FaxApi.md#fax_send) | **POST** `/fax/send` | Send Fax | @@ -17,24 +17,24 @@ All URIs are relative to *https://api.hellosign.com/v3* Delete Fax -Deletes the specified Fax from the system. +Deletes the specified Fax from the system ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_api = Dropbox::Sign::FaxApi.new - begin - fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967") + Dropbox::Sign::FaxApi.new.fax_delete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxApi#fax_delete: #{e}" end ``` @@ -81,29 +81,28 @@ nil (empty response body) > `File fax_files(fax_id)` -List Fax Files +Download Fax Files -Returns list of fax files +Downloads files associated with a Fax ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_api = Dropbox::Sign::FaxApi.new - -faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - file_bin = fax_api.fax_files(data) - FileUtils.cp(file_bin.path, "path/to/file.pdf") + response = Dropbox::Sign::FaxApi.new.fax_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + FileUtils.cp(response.path, "./file_response") rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxApi#fax_files: #{e}" end ``` @@ -116,7 +115,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # List Fax Files + # Download Fax Files data, status_code, headers = api_instance.fax_files_with_http_info(fax_id) p status_code # => 2xx p headers # => { ... } @@ -152,27 +151,26 @@ end Get Fax -Returns information about fax +Returns information about a Fax ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_api = Dropbox::Sign::FaxApi.new - -fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - result = fax_api.fax_get(fax_id) - p result + response = Dropbox::Sign::FaxApi.new.fax_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # fax_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxApi#fax_get: #{e}" end ``` @@ -221,28 +219,29 @@ end Lists Faxes -Returns properties of multiple faxes +Returns properties of multiple Faxes ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_api = Dropbox::Sign::FaxApi.new - -page = 1 -page_size = 2 - begin - result = fax_api.fax_list({ page: page, page_size: page_size }) - p result + response = Dropbox::Sign::FaxApi.new.fax_list( + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxApi#fax_list: #{e}" end ``` @@ -269,8 +268,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `page` | **Integer** | Page | [optional][default to 1] | -| `page_size` | **Integer** | Page size | [optional][default to 20] | +| `page` | **Integer** | Which page number of the Fax List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **Integer** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | ### Return type @@ -292,35 +291,38 @@ end Send Fax -Action to prepare and send a fax +Creates and sends a new Fax with the submitted file(s) ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_api = Dropbox::Sign::FaxApi.new - -data = Dropbox::Sign::FaxSendRequest.new -data.files = [File.new("example_signature_request.pdf", "r")] -data.test_mode = true -data.recipient = "16690000001" -data.sender = "16690000000" -data.cover_page_to = "Jill Fax" -data.cover_page_message = "I'm sending you a fax!" -data.cover_page_from = "Faxer Faxerson" -data.title = "This is what the fax is about!" +fax_send_request = Dropbox::Sign::FaxSendRequest.new +fax_send_request.recipient = "16690000001" +fax_send_request.sender = "16690000000" +fax_send_request.test_mode = true +fax_send_request.cover_page_to = "Jill Fax" +fax_send_request.cover_page_from = "Faxer Faxerson" +fax_send_request.cover_page_message = "I'm sending you a fax!" +fax_send_request.title = "This is what the fax is about!" +fax_send_request.files = [ + File.new("./example_fax.pdf", "r"), +] begin - result = fax_api.fax_send(data) - p result + response = Dropbox::Sign::FaxApi.new.fax_send( + fax_send_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxApi#fax_send: #{e}" end ``` diff --git a/sdks/ruby/docs/FaxLineAddUserRequest.md b/sdks/ruby/docs/FaxLineAddUserRequest.md index 272d38367..f5339aea7 100644 --- a/sdks/ruby/docs/FaxLineAddUserRequest.md +++ b/sdks/ruby/docs/FaxLineAddUserRequest.md @@ -6,7 +6,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | | `account_id` | ```String``` | Account ID | | | `email_address` | ```String``` | Email address | | diff --git a/sdks/ruby/docs/FaxLineApi.md b/sdks/ruby/docs/FaxLineApi.md index f5b1d3b43..a52f30c55 100644 --- a/sdks/ruby/docs/FaxLineApi.md +++ b/sdks/ruby/docs/FaxLineApi.md @@ -24,24 +24,25 @@ Grants a user access to the specified Fax Line. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineAddUserRequest.new -data.number = "[FAX_NUMBER]" -data.email_address = "member@dropboxsign.com" +fax_line_add_user_request = Dropbox::Sign::FaxLineAddUserRequest.new +fax_line_add_user_request.number = "[FAX_NUMBER]" +fax_line_add_user_request.email_address = "member@dropboxsign.com" begin - result = fax_line_api.fax_line_add_user(data) - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_add_user( + fax_line_add_user_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_add_user: #{e}" end ``` @@ -90,25 +91,26 @@ end Get Available Fax Line Area Codes -Returns a response with the area codes available for a given state/provice and city. +Returns a list of available area codes for a given state/province and city ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - begin - result = fax_line_api.fax_line_area_code_get("US", "CA") - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_area_code_get( + "US", # country + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_area_code_get: #{e}" end ``` @@ -135,10 +137,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `country` | **String** | Filter area codes by country. | | -| `state` | **String** | Filter area codes by state. | [optional] | -| `province` | **String** | Filter area codes by province. | [optional] | -| `city` | **String** | Filter area codes by city. | [optional] | +| `country` | **String** | Filter area codes by country | | +| `state` | **String** | Filter area codes by state | [optional] | +| `province` | **String** | Filter area codes by province | [optional] | +| `city` | **String** | Filter area codes by city | [optional] | ### Return type @@ -160,29 +162,30 @@ end Purchase Fax Line -Purchases a new Fax Line. +Purchases a new Fax Line ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineCreateRequest.new -data.area_code = 209 -data.country = "US" +fax_line_create_request = Dropbox::Sign::FaxLineCreateRequest.new +fax_line_create_request.area_code = 209 +fax_line_create_request.country = "US" begin - result = fax_line_api.fax_line_create(data) - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_create( + fax_line_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_create: #{e}" end ``` @@ -236,22 +239,22 @@ Deletes the specified Fax Line from the subscription. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineDeleteRequest.new -data.number = "[FAX_NUMBER]" +fax_line_delete_request = Dropbox::Sign::FaxLineDeleteRequest.new +fax_line_delete_request.number = "[FAX_NUMBER]" begin - fax_line_api.fax_line_delete(data) + Dropbox::Sign::FaxLineApi.new.fax_line_delete( + fax_line_delete_request, + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_delete: #{e}" end ``` @@ -305,20 +308,21 @@ Returns the properties and settings of a Fax Line. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - begin - result = fax_line_api.fax_line_get("[NUMBER]") - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_get( + "123-123-1234", # number + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_get: #{e}" end ``` @@ -345,7 +349,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `number` | **String** | The Fax Line number. | | +| `number` | **String** | The Fax Line number | | ### Return type @@ -372,20 +376,26 @@ Returns the properties and settings of multiple Fax Lines. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - begin - result = fax_line_api.fax_line_list() - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_list( + { + account_id: "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", + page: 1, + page_size: 20, + show_team_lines: nil, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_list: #{e}" end ``` @@ -413,9 +423,9 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | `account_id` | **String** | Account ID | [optional] | -| `page` | **Integer** | Page | [optional][default to 1] | -| `page_size` | **Integer** | Page size | [optional][default to 20] | -| `show_team_lines` | **Boolean** | Show team lines | [optional] | +| `page` | **Integer** | Which page number of the Fax Line List to return. Defaults to `1`. | [optional][default to 1] | +| `page_size` | **Integer** | Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional][default to 20] | +| `show_team_lines` | **Boolean** | Include Fax Lines belonging to team members in the list | [optional] | ### Return type @@ -437,29 +447,30 @@ end Remove Fax Line Access -Removes a user's access to the specified Fax Line. +Removes a user's access to the specified Fax Line ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" end -fax_line_api = Dropbox::Sign::FaxLineApi.new - -data = Dropbox::Sign::FaxLineRemoveUserRequest.new -data.number = "[FAX_NUMBER]" -data.email_address = "member@dropboxsign.com" +fax_line_remove_user_request = Dropbox::Sign::FaxLineRemoveUserRequest.new +fax_line_remove_user_request.number = "[FAX_NUMBER]" +fax_line_remove_user_request.email_address = "member@dropboxsign.com" begin - result = fax_line_api.fax_line_remove_user(data) - p result + response = Dropbox::Sign::FaxLineApi.new.fax_line_remove_user( + fax_line_remove_user_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling FaxLineApi#fax_line_remove_user: #{e}" end ``` diff --git a/sdks/ruby/docs/FaxLineCreateRequest.md b/sdks/ruby/docs/FaxLineCreateRequest.md index bbe5312c6..5359e4073 100644 --- a/sdks/ruby/docs/FaxLineCreateRequest.md +++ b/sdks/ruby/docs/FaxLineCreateRequest.md @@ -6,8 +6,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `area_code`*_required_ | ```Integer``` | Area code | | -| `country`*_required_ | ```String``` | Country | | -| `city` | ```String``` | City | | -| `account_id` | ```String``` | Account ID | | +| `area_code`*_required_ | ```Integer``` | Area code of the new Fax Line | | +| `country`*_required_ | ```String``` | Country of the area code | | +| `city` | ```String``` | City of the area code | | +| `account_id` | ```String``` | Account ID of the account that will be assigned this new Fax Line | | diff --git a/sdks/ruby/docs/FaxLineDeleteRequest.md b/sdks/ruby/docs/FaxLineDeleteRequest.md index 5c781f3b4..fc910e543 100644 --- a/sdks/ruby/docs/FaxLineDeleteRequest.md +++ b/sdks/ruby/docs/FaxLineDeleteRequest.md @@ -6,5 +6,5 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `number`*_required_ | ```String``` | The Fax Line number. | | +| `number`*_required_ | ```String``` | The Fax Line number | | diff --git a/sdks/ruby/docs/FaxLineRemoveUserRequest.md b/sdks/ruby/docs/FaxLineRemoveUserRequest.md index 98388f6f4..4156b6130 100644 --- a/sdks/ruby/docs/FaxLineRemoveUserRequest.md +++ b/sdks/ruby/docs/FaxLineRemoveUserRequest.md @@ -6,7 +6,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `number`*_required_ | ```String``` | The Fax Line number. | | -| `account_id` | ```String``` | Account ID | | -| `email_address` | ```String``` | Email address | | +| `number`*_required_ | ```String``` | The Fax Line number | | +| `account_id` | ```String``` | Account ID of the user to remove access | | +| `email_address` | ```String``` | Email address of the user to remove access | | diff --git a/sdks/ruby/docs/FaxSendRequest.md b/sdks/ruby/docs/FaxSendRequest.md index 6217af9f6..af96a2357 100644 --- a/sdks/ruby/docs/FaxSendRequest.md +++ b/sdks/ruby/docs/FaxSendRequest.md @@ -6,13 +6,13 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `recipient`*_required_ | ```String``` | Recipient of the fax Can be a phone number in E.164 format or email address | | | `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```Array``` | Fax File to Send | | -| `file_urls` | ```Array``` | Fax File URL to Send | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```Array``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | | `test_mode` | ```Boolean``` | API Test Mode Setting | [default to false] | -| `cover_page_to` | ```String``` | Fax Cover Page for Recipient | | -| `cover_page_from` | ```String``` | Fax Cover Page for Sender | | +| `cover_page_to` | ```String``` | Fax cover page recipient information | | +| `cover_page_from` | ```String``` | Fax cover page sender information | | | `cover_page_message` | ```String``` | Fax Cover Page Message | | | `title` | ```String``` | Fax Title | | diff --git a/sdks/ruby/docs/OAuthApi.md b/sdks/ruby/docs/OAuthApi.md index b9ff0295d..579602d37 100644 --- a/sdks/ruby/docs/OAuthApi.md +++ b/sdks/ruby/docs/OAuthApi.md @@ -19,21 +19,27 @@ Once you have retrieved the code from the user callback, you will need to exchan ### Examples ```ruby +require "json" require "dropbox-sign" -oauth_api = Dropbox::Sign::OAuthApi.new +Dropbox::Sign.configure do |config| +end -data = Dropbox::Sign::OAuthTokenGenerateRequest.new -data.state = "900e06e2" -data.code = "1b0d28d90c86c141" -data.client_id = "cc91c61d00f8bb2ece1428035716b" -data.client_secret = "1d14434088507ffa390e6f5528465" +o_auth_token_generate_request = Dropbox::Sign::OAuthTokenGenerateRequest.new +o_auth_token_generate_request.client_id = "cc91c61d00f8bb2ece1428035716b" +o_auth_token_generate_request.client_secret = "1d14434088507ffa390e6f5528465" +o_auth_token_generate_request.code = "1b0d28d90c86c141" +o_auth_token_generate_request.state = "900e06e2" +o_auth_token_generate_request.grant_type = "authorization_code" begin - result = oauth_api.oauth_token_generate(data) - p result + response = Dropbox::Sign::OAuthApi.new.oauth_token_generate( + o_auth_token_generate_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling OAuthApi#oauth_token_generate: #{e}" end ``` @@ -87,18 +93,24 @@ Access tokens are only valid for a given period of time (typically one hour) for ### Examples ```ruby +require "json" require "dropbox-sign" -oauth_api = Dropbox::Sign::OAuthApi.new +Dropbox::Sign.configure do |config| +end -data = Dropbox::Sign::OAuthTokenRefreshRequest.new -data.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" +o_auth_token_refresh_request = Dropbox::Sign::OAuthTokenRefreshRequest.new +o_auth_token_refresh_request.grant_type = "refresh_token" +o_auth_token_refresh_request.refresh_token = "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3" begin - result = oauth_api.oauth_token_refresh(data) - p result + response = Dropbox::Sign::OAuthApi.new.oauth_token_refresh( + o_auth_token_refresh_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling OAuthApi#oauth_token_refresh: #{e}" end ``` diff --git a/sdks/ruby/docs/ReportApi.md b/sdks/ruby/docs/ReportApi.md index d612c7ed5..9b0b90317 100644 --- a/sdks/ruby/docs/ReportApi.md +++ b/sdks/ruby/docs/ReportApi.md @@ -18,28 +18,29 @@ Request the creation of one or more report(s). When the report(s) have been gen ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" end -report_api = Dropbox::Sign::ReportApi.new - -data = Dropbox::Sign::ReportCreateRequest.new -data.start_date = "09/01/2020" -data.end_date = "09/01/2020" -data.report_type = %w[user_activity document_status] +report_create_request = Dropbox::Sign::ReportCreateRequest.new +report_create_request.start_date = "09/01/2020" +report_create_request.end_date = "09/01/2020" +report_create_request.report_type = [ + "user_activity", + "document_status", +] begin - result = report_api.report_create(data) - p result + response = Dropbox::Sign::ReportApi.new.report_create( + report_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling ReportApi#report_create: #{e}" end ``` diff --git a/sdks/ruby/docs/SignatureRequestApi.md b/sdks/ruby/docs/SignatureRequestApi.md index 0261ffa5c..04f0c0bbf 100644 --- a/sdks/ruby/docs/SignatureRequestApi.md +++ b/sdks/ruby/docs/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | [`signature_request_cancel`](SignatureRequestApi.md#signature_request_cancel) | **POST** `/signature_request/cancel/{signature_request_id}` | Cancel Incomplete Signature Request | | [`signature_request_create_embedded`](SignatureRequestApi.md#signature_request_create_embedded) | **POST** `/signature_request/create_embedded` | Create Embedded Signature Request | | [`signature_request_create_embedded_with_template`](SignatureRequestApi.md#signature_request_create_embedded_with_template) | **POST** `/signature_request/create_embedded_with_template` | Create Embedded Signature Request with Template | +| [`signature_request_edit`](SignatureRequestApi.md#signature_request_edit) | **PUT** `/signature_request/edit/{signature_request_id}` | Edit Signature Request | +| [`signature_request_edit_embedded`](SignatureRequestApi.md#signature_request_edit_embedded) | **PUT** `/signature_request/edit_embedded/{signature_request_id}` | Edit Embedded Signature Request | +| [`signature_request_edit_embedded_with_template`](SignatureRequestApi.md#signature_request_edit_embedded_with_template) | **PUT** `/signature_request/edit_embedded_with_template/{signature_request_id}` | Edit Embedded Signature Request with Template | +| [`signature_request_edit_with_template`](SignatureRequestApi.md#signature_request_edit_with_template) | **PUT** `/signature_request/edit_with_template/{signature_request_id}` | Edit Signature Request With Template | | [`signature_request_files`](SignatureRequestApi.md#signature_request_files) | **GET** `/signature_request/files/{signature_request_id}` | Download Files | | [`signature_request_files_as_data_uri`](SignatureRequestApi.md#signature_request_files_as_data_uri) | **GET** `/signature_request/files_as_data_uri/{signature_request_id}` | Download Files as Data Uri | | [`signature_request_files_as_file_url`](SignatureRequestApi.md#signature_request_files_as_file_url) | **GET** `/signature_request/files_as_file_url/{signature_request_id}` | Download Files as File Url | @@ -33,64 +37,89 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" -signer_list_1_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_1_signer.role = "Client" -signer_list_1_signer.name = "George" -signer_list_1_signer.email_address = "george@example.com" -signer_list_1_signer.pin = "d79a3td" +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] -signer_list_1_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_1_custom_fields.name = "company" -signer_list_1_custom_fields.value = "ABC Corp" +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" -signer_list_1 = Dropbox::Sign::SubBulkSignerList.new -signer_list_1.signers = [signer_list_1_signer] -signer_list_1.custom_fields = [signer_list_1_custom_fields] +signer_list_2_signers = [ + signer_list_2_signers_1, +] + +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" -signer_list_2_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_2_signer.role = "Client" -signer_list_2_signer.name = "Mary" -signer_list_2_signer.email_address = "mary@example.com" -signer_list_2_signer.pin = "gd9as5b" +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] -signer_list_2_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_2_custom_fields.name = "company" -signer_list_2_custom_fields.value = "123 LLC" +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers signer_list_2 = Dropbox::Sign::SubBulkSignerList.new -signer_list_2.signers = [signer_list_2_signer] -signer_list_2.custom_fields = [signer_list_2_custom_fields] - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -data = Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest.new -data.client_id = "1a659d9ad95bccd307ecad78d72192f8" -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signer_list = [signer_list_1, signer_list_2] -data.ccs = [cc_1] -data.test_mode = true +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers + +signer_list = [ + signer_list_1, + signer_list_2, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest.new +signature_request_bulk_create_embedded_with_template_request.client_id = "1a659d9ad95bccd307ecad78d72192f8" +signature_request_bulk_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_bulk_create_embedded_with_template_request.test_mode = true +signature_request_bulk_create_embedded_with_template_request.signer_list = signer_list +signature_request_bulk_create_embedded_with_template_request.ccs = ccs begin - result = signature_request_api.signature_request_bulk_create_embedded_with_template(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_create_embedded_with_template( + signature_request_bulk_create_embedded_with_template_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_bulk_create_embedded_with_template: #{e}" end ``` @@ -144,63 +173,89 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new +signer_list_2_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_2_custom_fields_1.name = "company" +signer_list_2_custom_fields_1.value = "123 LLC" -signer_list_1_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_1_signer.role = "Client" -signer_list_1_signer.name = "George" -signer_list_1_signer.email_address = "george@example.com" -signer_list_1_signer.pin = "d79a3td" +signer_list_2_custom_fields = [ + signer_list_2_custom_fields_1, +] -signer_list_1_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_1_custom_fields.name = "company" -signer_list_1_custom_fields.value = "ABC Corp" +signer_list_2_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_2_signers_1.role = "Client" +signer_list_2_signers_1.name = "Mary" +signer_list_2_signers_1.email_address = "mary@example.com" +signer_list_2_signers_1.pin = "gd9as5b" -signer_list_1 = Dropbox::Sign::SubBulkSignerList.new -signer_list_1.signers = [signer_list_1_signer] -signer_list_1.custom_fields = [signer_list_1_custom_fields] +signer_list_2_signers = [ + signer_list_2_signers_1, +] -signer_list_2_signer = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_list_2_signer.role = "Client" -signer_list_2_signer.name = "Mary" -signer_list_2_signer.email_address = "mary@example.com" -signer_list_2_signer.pin = "gd9as5b" +signer_list_1_custom_fields_1 = Dropbox::Sign::SubBulkSignerListCustomField.new +signer_list_1_custom_fields_1.name = "company" +signer_list_1_custom_fields_1.value = "ABC Corp" -signer_list_2_custom_fields = Dropbox::Sign::SubBulkSignerListCustomField.new -signer_list_2_custom_fields.name = "company" -signer_list_2_custom_fields.value = "123 LLC" +signer_list_1_custom_fields = [ + signer_list_1_custom_fields_1, +] + +signer_list_1_signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signer_list_1_signers_1.role = "Client" +signer_list_1_signers_1.name = "George" +signer_list_1_signers_1.email_address = "george@example.com" +signer_list_1_signers_1.pin = "d79a3td" + +signer_list_1_signers = [ + signer_list_1_signers_1, +] + +signer_list_1 = Dropbox::Sign::SubBulkSignerList.new +signer_list_1.custom_fields = signer_list_1_custom_fields +signer_list_1.signers = signer_list_1_signers signer_list_2 = Dropbox::Sign::SubBulkSignerList.new -signer_list_2.signers = [signer_list_2_signer] -signer_list_2.custom_fields = [signer_list_2_custom_fields] +signer_list_2.custom_fields = signer_list_2_custom_fields +signer_list_2.signers = signer_list_2_signers -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" +signer_list = [ + signer_list_1, + signer_list_2, +] -data = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signer_list = [signer_list_1, signer_list_2] -data.ccs = [cc_1] -data.test_mode = true +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +signature_request_bulk_send_with_template_request = Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest.new +signature_request_bulk_send_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_bulk_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_bulk_send_with_template_request.subject = "Purchase Order" +signature_request_bulk_send_with_template_request.test_mode = true +signature_request_bulk_send_with_template_request.signer_list = signer_list +signature_request_bulk_send_with_template_request.ccs = ccs begin - result = signature_request_api.signature_request_bulk_send_with_template(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_bulk_send_with_template( + signature_request_bulk_send_with_template_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_bulk_send_with_template: #{e}" end ``` @@ -254,25 +309,20 @@ Cancels an incomplete signature request. This action is **not reversible**. The ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - begin - result = signature_request_api.signature_request_cancel(signature_request_id) - p result + Dropbox::Sign::SignatureRequestApi.new.signature_request_cancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_cancel: #{e}" end ``` @@ -326,51 +376,60 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" signing_options.draw = true +signing_options.phone = false signing_options.type = true signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" -data = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = ["lawyer1@dropboxsign.com", "lawyer2@dropboxsign.com"] -data.files = [File.new("example_signature_request.pdf", "r")] -data.signing_options = signing_options -data.test_mode = true +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_create_embedded_request = Dropbox::Sign::SignatureRequestCreateEmbeddedRequest.new +signature_request_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_create_embedded_request.subject = "The NDA we talked about" +signature_request_create_embedded_request.test_mode = true +signature_request_create_embedded_request.title = "NDA with Acme Co." +signature_request_create_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_create_embedded_request.signing_options = signing_options +signature_request_create_embedded_request.signers = signers begin - result = signature_request_api.signature_request_create_embedded(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded( + signature_request_create_embedded_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded: #{e}" end ``` @@ -424,44 +483,49 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" - signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" signing_options.draw = true +signing_options.phone = false signing_options.type = true signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" -data = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.signing_options = signing_options -data.test_mode = true +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_create_embedded_with_template_request = Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest.new +signature_request_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_create_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_create_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_create_embedded_with_template_request.subject = "Purchase Order" +signature_request_create_embedded_with_template_request.test_mode = true +signature_request_create_embedded_with_template_request.signing_options = signing_options +signature_request_create_embedded_with_template_request.signers = signers begin - result = signature_request_api.signature_request_create_embedded_with_template(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_create_embedded_with_template( + signature_request_create_embedded_with_template_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_create_embedded_with_template: #{e}" end ``` @@ -504,6 +568,449 @@ end - **Accept**: application/json +## `signature_request_edit` + +> ` signature_request_edit(signature_request_id, signature_request_edit_request)` + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Examples + +```ruby +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_request = Dropbox::Sign::SignatureRequestEditRequest.new +signature_request_edit_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_request.subject = "The NDA we talked about" +signature_request_edit_request.test_mode = true +signature_request_edit_request.title = "NDA with Acme Co." +signature_request_edit_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_edit_request.field_options = field_options +signature_request_edit_request.signing_options = signing_options +signature_request_edit_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit: #{e}" +end + +``` + +#### Using the `signature_request_edit_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> signature_request_edit_with_http_info(signature_request_id, signature_request_edit_request)` + +```ruby +begin + # Edit Signature Request + data, status_code, headers = api_instance.signature_request_edit_with_http_info(signature_request_id, signature_request_edit_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling SignatureRequestApi->signature_request_edit_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_id` | **String** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_request` | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + + +## `signature_request_edit_embedded` + +> ` signature_request_edit_embedded(signature_request_id, signature_request_edit_embedded_request)` + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Examples + +```ruby +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 + +signers = [ + signers_1, + signers_2, +] + +signature_request_edit_embedded_request = Dropbox::Sign::SignatureRequestEditEmbeddedRequest.new +signature_request_edit_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_edit_embedded_request.subject = "The NDA we talked about" +signature_request_edit_embedded_request.test_mode = true +signature_request_edit_embedded_request.title = "NDA with Acme Co." +signature_request_edit_embedded_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_edit_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +signature_request_edit_embedded_request.signing_options = signing_options +signature_request_edit_embedded_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded: #{e}" +end + +``` + +#### Using the `signature_request_edit_embedded_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> signature_request_edit_embedded_with_http_info(signature_request_id, signature_request_edit_embedded_request)` + +```ruby +begin + # Edit Embedded Signature Request + data, status_code, headers = api_instance.signature_request_edit_embedded_with_http_info(signature_request_id, signature_request_edit_embedded_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling SignatureRequestApi->signature_request_edit_embedded_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_id` | **String** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_embedded_request` | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + + +## `signature_request_edit_embedded_with_template` + +> ` signature_request_edit_embedded_with_template(signature_request_id, signature_request_edit_embedded_with_template_request)` + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Examples + +```ruby +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +signature_request_edit_embedded_with_template_request = Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest.new +signature_request_edit_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +signature_request_edit_embedded_with_template_request.template_ids = [ + "c26b8a16784a872da37ea946b9ddec7c1e11dff6", +] +signature_request_edit_embedded_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_embedded_with_template_request.subject = "Purchase Order" +signature_request_edit_embedded_with_template_request.test_mode = true +signature_request_edit_embedded_with_template_request.signing_options = signing_options +signature_request_edit_embedded_with_template_request.signers = signers + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_embedded_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_embedded_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_embedded_with_template: #{e}" +end + +``` + +#### Using the `signature_request_edit_embedded_with_template_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> signature_request_edit_embedded_with_template_with_http_info(signature_request_id, signature_request_edit_embedded_with_template_request)` + +```ruby +begin + # Edit Embedded Signature Request with Template + data, status_code, headers = api_instance.signature_request_edit_embedded_with_template_with_http_info(signature_request_id, signature_request_edit_embedded_with_template_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling SignatureRequestApi->signature_request_edit_embedded_with_template_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_id` | **String** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_embedded_with_template_request` | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + + +## `signature_request_edit_with_template` + +> ` signature_request_edit_with_template(signature_request_id, signature_request_edit_with_template_request)` + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Examples + +```ruby +require "json" +require "dropbox-sign" + +Dropbox::Sign.configure do |config| + config.username = "YOUR_API_KEY" + # config.access_token = "YOUR_ACCESS_TOKEN" +end + +signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" +signing_options.draw = true +signing_options.phone = false +signing_options.type = true +signing_options.upload = true + +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_edit_with_template_request = Dropbox::Sign::SignatureRequestEditWithTemplateRequest.new +signature_request_edit_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_edit_with_template_request.message = "Glad we could come to an agreement." +signature_request_edit_with_template_request.subject = "Purchase Order" +signature_request_edit_with_template_request.test_mode = true +signature_request_edit_with_template_request.signing_options = signing_options +signature_request_edit_with_template_request.signers = signers +signature_request_edit_with_template_request.ccs = ccs +signature_request_edit_with_template_request.custom_fields = custom_fields + +begin + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_edit_with_template( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_edit_with_template_request, + ) + + p response +rescue Dropbox::Sign::ApiError => e + puts "Exception when calling SignatureRequestApi#signature_request_edit_with_template: #{e}" +end + +``` + +#### Using the `signature_request_edit_with_template_with_http_info` variant + +This returns an Array which contains the response data, status code and headers. + +> `, Integer, Hash)> signature_request_edit_with_template_with_http_info(signature_request_id, signature_request_edit_with_template_request)` + +```ruby +begin + # Edit Signature Request With Template + data, status_code, headers = api_instance.signature_request_edit_with_template_with_http_info(signature_request_id, signature_request_edit_with_template_request) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Dropbox::Sign::ApiError => e + puts "Error when calling SignatureRequestApi->signature_request_edit_with_template_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `signature_request_id` | **String** | The id of the SignatureRequest to edit. | | +| `signature_request_edit_with_template_request` | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md) | | | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + + ## `signature_request_files` > `File signature_request_files(signature_request_id, opts)` @@ -515,25 +1022,25 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - file_bin = signature_request_api.signature_request_files(signature_request_id) - FileUtils.cp(file_bin.path, "path/to/file.pdf") + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + file_type: "pdf", + }, + ) + + FileUtils.cp(response.path, "./file_response") rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_files: #{e}" end ``` @@ -588,25 +1095,22 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - result = signature_request_api.signature_request_files_as_data_uri(signature_request_id) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_data_uri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_files_as_data_uri: #{e}" end ``` @@ -660,25 +1164,25 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - result = signature_request_api.signature_request_files_as_file_url(signature_request_id) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_files_as_file_url( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + { + force_download: 1, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_files_as_file_url: #{e}" end ``` @@ -733,25 +1237,22 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - begin - result = signature_request_api.signature_request_get(signature_request_id) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_get( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_get: #{e}" end ``` @@ -805,26 +1306,27 @@ Returns a list of SignatureRequests that you can access. This includes Signature ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -account_id = null -page = 1 - begin - result = signature_request_api.signature_request_list({ account_id: account_id, page: page }) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_list: #{e}" end ``` @@ -881,25 +1383,22 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - begin - result = signature_request_api.signature_request_release_hold(signature_request_id) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_release_hold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_release_hold: #{e}" end ``` @@ -953,28 +1452,26 @@ Sends an email to the signer reminding them to sign the signature request. You c ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -data = Dropbox::Sign::SignatureRequestRemindRequest.new -data.email_address = "john@example.com" - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" +signature_request_remind_request = Dropbox::Sign::SignatureRequestRemindRequest.new +signature_request_remind_request.email_address = "john@example.com" begin - result = signature_request_api.signature_request_remind(signature_request_id, data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_remind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_remind_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_remind: #{e}" end ``` @@ -1029,25 +1526,19 @@ Removes your access to a completed signature request. This action is **not rever ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 - # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" - begin - result = signature_request_api.signature_request_remove(signature_request_id) - p result + Dropbox::Sign::SignatureRequestApi.new.signature_request_remove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_remove: #{e}" end ``` @@ -1101,61 +1592,70 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubSignatureRequestSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 +field_options = Dropbox::Sign::SubFieldOptions.new +field_options.date_format = "DD - MM - YYYY" signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" signing_options.draw = true +signing_options.phone = false signing_options.type = true signing_options.upload = true -signing_options.phone = true -signing_options.default_type = "draw" -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" +signers_1 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers_2 = Dropbox::Sign::SubSignatureRequestSigner.new +signers_2.name = "Jill" +signers_2.email_address = "jill@example.com" +signers_2.order = 1 -data = Dropbox::Sign::SignatureRequestSendRequest.new -data.title = "NDA with Acme Co." -data.subject = "The NDA we talked about" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", +signers = [ + signers_1, + signers_2, +] + +signature_request_send_request = Dropbox::Sign::SignatureRequestSendRequest.new +signature_request_send_request.message = "Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions." +signature_request_send_request.subject = "The NDA we talked about" +signature_request_send_request.test_mode = true +signature_request_send_request.title = "NDA with Acme Co." +signature_request_send_request.cc_email_addresses = [ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", +] +signature_request_send_request.files = [ + File.new("./example_signature_request.pdf", "r"), ] -data.files = [File.new("example_signature_request.pdf", "r")] -data.metadata = { - custom_id: 1234, - custom_text: "NDA #9", -} -data.signing_options = signing_options -data.field_options = field_options -data.test_mode = true +signature_request_send_request.metadata = JSON.parse(<<-EOD + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + EOD +) +signature_request_send_request.field_options = field_options +signature_request_send_request.signing_options = signing_options +signature_request_send_request.signers = signers begin - result = signature_request_api.signature_request_send(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send( + signature_request_send_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_send: #{e}" end ``` @@ -1209,55 +1709,68 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -signer_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new -signer_1.role = "Client" -signer_1.email_address = "george@example.com" -signer_1.name = "George" - -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" - -custom_field_1 = Dropbox::Sign::SubCustomField.new -custom_field_1.name = "Cost" -custom_field_1.value = "$20,000" -custom_field_1.editor = "Client" -custom_field_1.required = true - signing_options = Dropbox::Sign::SubSigningOptions.new +signing_options.default_type = "draw" signing_options.draw = true +signing_options.phone = false signing_options.type = true signing_options.upload = true -signing_options.phone = false -signing_options.default_type = "draw" -data = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new -data.template_ids = ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"] -data.subject = "Purchase Order" -data.message = "Glad we could come to an agreement." -data.signers = [signer_1] -data.ccs = [cc_1] -data.custom_fields = [custom_field_1] -data.signing_options = signing_options -data.test_mode = true +signers_1 = Dropbox::Sign::SubSignatureRequestTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" + +signers = [ + signers_1, +] + +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@example.com" + +ccs = [ + ccs_1, +] + +custom_fields_1 = Dropbox::Sign::SubCustomField.new +custom_fields_1.name = "Cost" +custom_fields_1.editor = "Client" +custom_fields_1.required = true +custom_fields_1.value = "$20,000" + +custom_fields = [ + custom_fields_1, +] + +signature_request_send_with_template_request = Dropbox::Sign::SignatureRequestSendWithTemplateRequest.new +signature_request_send_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +signature_request_send_with_template_request.message = "Glad we could come to an agreement." +signature_request_send_with_template_request.subject = "Purchase Order" +signature_request_send_with_template_request.test_mode = true +signature_request_send_with_template_request.signing_options = signing_options +signature_request_send_with_template_request.signers = signers +signature_request_send_with_template_request.ccs = ccs +signature_request_send_with_template_request.custom_fields = custom_fields begin - result = signature_request_api.signature_request_send_with_template(data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_send_with_template( + signature_request_send_with_template_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_send_with_template: #{e}" end ``` @@ -1311,29 +1824,27 @@ Updates the email address and/or the name for a given signer on a signature requ ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -signature_request_api = Dropbox::Sign::SignatureRequestApi.new - -data = Dropbox::Sign::SignatureRequestUpdateRequest.new -data.email_address = "john@example.com" -data.signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3" - -signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" +signature_request_update_request = Dropbox::Sign::SignatureRequestUpdateRequest.new +signature_request_update_request.signature_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" +signature_request_update_request.email_address = "john@example.com" begin - result = signature_request_api.signature_request_update(signature_request_id, data) - p result + response = Dropbox::Sign::SignatureRequestApi.new.signature_request_update( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + signature_request_update_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling SignatureRequestApi#signature_request_update: #{e}" end ``` diff --git a/sdks/ruby/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/ruby/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..383cd8e89 --- /dev/null +++ b/sdks/ruby/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,33 @@ +# Dropbox::Sign::SignatureRequestEditEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `client_id`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```Array``` | The email addresses that should be CCed. | | +| `custom_fields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `populate_auto_fill_fields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | +| `expires_at` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + diff --git a/sdks/ruby/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/ruby/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..736cbf786 --- /dev/null +++ b/sdks/ruby/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,24 @@ +# Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `template_ids`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | + diff --git a/sdks/ruby/docs/SignatureRequestEditRequest.md b/sdks/ruby/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..39d575aa3 --- /dev/null +++ b/sdks/ruby/docs/SignatureRequestEditRequest.md @@ -0,0 +1,34 @@ +# Dropbox::Sign::SignatureRequestEditRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```Array```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```Array```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | [default to false] | +| `attachments` | [```Array```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```Array``` | The email addresses that should be CCed. | | +| `client_id` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```Array```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```Array```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```Array```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```Array```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `is_eid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `expires_at` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + diff --git a/sdks/ruby/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/ruby/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..12b4bee82 --- /dev/null +++ b/sdks/ruby/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,25 @@ +# Dropbox::Sign::SignatureRequestEditWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `template_ids`*_required_ | ```Array``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```Array```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```Array```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```Array```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```Array``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```Array``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `is_eid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Hash``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + diff --git a/sdks/ruby/docs/TeamApi.md b/sdks/ruby/docs/TeamApi.md index 846491457..b8279a3b9 100644 --- a/sdks/ruby/docs/TeamApi.md +++ b/sdks/ruby/docs/TeamApi.md @@ -27,26 +27,28 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamAddMemberRequest.new -data.email_address = "george@example.com" +team_add_member_request = Dropbox::Sign::TeamAddMemberRequest.new +team_add_member_request.email_address = "george@example.com" begin - result = team_api.team_add_member(data) - p result + response = Dropbox::Sign::TeamApi.new.team_add_member( + team_add_member_request, + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_add_member: #{e}" end ``` @@ -101,26 +103,25 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamCreateRequest.new -data.name = "New Team Name" +team_create_request = Dropbox::Sign::TeamCreateRequest.new +team_create_request.name = "New Team Name" begin - result = team_api.team_create(data) - p result + response = Dropbox::Sign::TeamApi.new.team_create( + team_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_create: #{e}" end ``` @@ -174,23 +175,18 @@ Deletes your Team. Can only be invoked when you have a Team with only one member ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - begin - result = team_api.team_delete - p result + Dropbox::Sign::TeamApi.new.team_delete rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_delete: #{e}" end ``` @@ -242,23 +238,20 @@ Returns information about your Team as well as a list of its members. If you do ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - begin - result = team_api.team_get - p result + response = Dropbox::Sign::TeamApi.new.team_get + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_get: #{e}" end ``` @@ -310,23 +303,24 @@ Provides information about a team. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - begin - result = team_api.team_info - p result + response = Dropbox::Sign::TeamApi.new.team_info( + { + team_id: "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_info: #{e}" end ``` @@ -380,25 +374,20 @@ Provides a list of team invites (and their roles). ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -email_address = "user@dropboxsign.com" - begin - result = team_api.team_invites({ email_address: email_address }) - p result + response = Dropbox::Sign::TeamApi.new.team_invites + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_invites: #{e}" end ``` @@ -452,25 +441,26 @@ Provides a paginated list of members (and their roles) that belong to a given te ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - begin - result = team_api.team_members(team_id) - p result + response = Dropbox::Sign::TeamApi.new.team_members( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_members: #{e}" end ``` @@ -526,27 +516,26 @@ Removes the provided user Account from your Team. If the Account had an outstand ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamRemoveMemberRequest.new -data.email_address = "teammate@dropboxsign.com" -data.new_owner_email_address = "new_teammate@dropboxsign.com" +team_remove_member_request = Dropbox::Sign::TeamRemoveMemberRequest.new +team_remove_member_request.email_address = "teammate@dropboxsign.com" +team_remove_member_request.new_owner_email_address = "new_teammate@dropboxsign.com" begin - result = team_api.team_remove_member(data) - p result + response = Dropbox::Sign::TeamApi.new.team_remove_member( + team_remove_member_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_remove_member: #{e}" end ``` @@ -600,25 +589,26 @@ Provides a paginated list of sub teams that belong to a given team. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -team_id = "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" - begin - result = team_api.team_sub_teams(team_id) - p result + response = Dropbox::Sign::TeamApi.new.team_sub_teams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", # team_id + { + page: 1, + page_size: 20, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_sub_teams: #{e}" end ``` @@ -674,26 +664,25 @@ Updates the name of your Team. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -team_api = Dropbox::Sign::TeamApi.new - -data = Dropbox::Sign::TeamUpdateRequest.new -data.name = "New Team Name" +team_update_request = Dropbox::Sign::TeamUpdateRequest.new +team_update_request.name = "New Team Name" begin - result = team_api.team_update(data) - p result + response = Dropbox::Sign::TeamApi.new.team_update( + team_update_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TeamApi#team_update: #{e}" end ``` diff --git a/sdks/ruby/docs/TemplateApi.md b/sdks/ruby/docs/TemplateApi.md index bcd27fae0..315ced97c 100644 --- a/sdks/ruby/docs/TemplateApi.md +++ b/sdks/ruby/docs/TemplateApi.md @@ -28,28 +28,26 @@ Gives the specified Account access to the specified Template. The specified Acco ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateAddUserRequest.new -data.email_address = "george@dropboxsign.com" - -template_id = "f57db65d3f933b5316d398057a36176831451a35" +template_add_user_request = Dropbox::Sign::TemplateAddUserRequest.new +template_add_user_request.email_address = "george@dropboxsign.com" begin - result = template_api.template_add_user(template_id, data) - p result + response = Dropbox::Sign::TemplateApi.new.template_add_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_add_user_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_add_user: #{e}" end ``` @@ -104,54 +102,101 @@ Creates a template that can then be used. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -role_1 = Dropbox::Sign::SubTemplateRole.new -role_1.name = "Client" -role_1.order = 0 - -role_2 = Dropbox::Sign::SubTemplateRole.new -role_2.name = "Witness" -role_2.order = 1 - -merge_field_1 = Dropbox::Sign::SubMergeField.new -merge_field_1.name = "Full Name" -merge_field_1.type = "text" - -merge_field_2 = Dropbox::Sign::SubMergeField.new -merge_field_2.name = "Is Registered?" -merge_field_2.type = "checkbox" - field_options = Dropbox::Sign::SubFieldOptions.new field_options.date_format = "DD - MM - YYYY" -data = Dropbox::Sign::TemplateCreateRequest.new -data.client_id = "37dee8d8440c66d54cfa05d92c160882" -data.files = [File.new("example_signature_request.pdf", "r")] -data.title = "Test Template" -data.subject = "Please sign this document" -data.message = "For your approval" -data.signer_roles = [role_1, role_2] -data.cc_roles = ["Manager"] -data.merge_fields = [merge_field_1, merge_field_2] -data.field_options = field_options -data.test_mode = true +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +form_fields_per_document_1 = Dropbox::Sign::SubFormFieldsPerDocumentText.new +form_fields_per_document_1.document_index = 0 +form_fields_per_document_1.api_id = "uniqueIdHere_1" +form_fields_per_document_1.type = "text" +form_fields_per_document_1.required = true +form_fields_per_document_1.signer = "1" +form_fields_per_document_1.width = 100 +form_fields_per_document_1.height = 16 +form_fields_per_document_1.x = 112 +form_fields_per_document_1.y = 328 +form_fields_per_document_1.name = "" +form_fields_per_document_1.page = 1 +form_fields_per_document_1.placeholder = "" +form_fields_per_document_1.validation_type = "numbers_only" + +form_fields_per_document_2 = Dropbox::Sign::SubFormFieldsPerDocumentSignature.new +form_fields_per_document_2.document_index = 0 +form_fields_per_document_2.api_id = "uniqueIdHere_2" +form_fields_per_document_2.type = "signature" +form_fields_per_document_2.required = true +form_fields_per_document_2.signer = "0" +form_fields_per_document_2.width = 120 +form_fields_per_document_2.height = 30 +form_fields_per_document_2.x = 530 +form_fields_per_document_2.y = 415 +form_fields_per_document_2.name = "" +form_fields_per_document_2.page = 1 + +form_fields_per_document = [ + form_fields_per_document_1, + form_fields_per_document_2, +] + +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +template_create_request = Dropbox::Sign::TemplateCreateRequest.new +template_create_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_request.message = "For your approval" +template_create_request.subject = "Please sign this document" +template_create_request.test_mode = true +template_create_request.title = "Test Template" +template_create_request.cc_roles = [ + "Manager", +] +template_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_request.field_options = field_options +template_create_request.signer_roles = signer_roles +template_create_request.form_fields_per_document = form_fields_per_document +template_create_request.merge_fields = merge_fields begin - result = template_api.template_create(data) - p result + response = Dropbox::Sign::TemplateApi.new.template_create( + template_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_create: #{e}" end ``` @@ -205,54 +250,67 @@ The first step in an embedded template workflow. Creates a draft template that c ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -role_1 = Dropbox::Sign::SubTemplateRole.new -role_1.name = "Client" -role_1.order = 0 - -role_2 = Dropbox::Sign::SubTemplateRole.new -role_2.name = "Witness" -role_2.order = 1 - -merge_field_1 = Dropbox::Sign::SubMergeField.new -merge_field_1.name = "Full Name" -merge_field_1.type = "text" - -merge_field_2 = Dropbox::Sign::SubMergeField.new -merge_field_2.name = "Is Registered?" -merge_field_2.type = "checkbox" - field_options = Dropbox::Sign::SubFieldOptions.new field_options.date_format = "DD - MM - YYYY" -data = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new -data.client_id = "37dee8d8440c66d54cfa05d92c160882" -data.files = [File.new("example_signature_request.pdf", "r")] -data.title = "Test Template" -data.subject = "Please sign this document" -data.message = "For your approval" -data.signer_roles = [role_1, role_2] -data.cc_roles = ["Manager"] -data.merge_fields = [merge_field_1, merge_field_2] -data.field_options = field_options -data.test_mode = true +merge_fields_1 = Dropbox::Sign::SubMergeField.new +merge_fields_1.name = "Full Name" +merge_fields_1.type = "text" + +merge_fields_2 = Dropbox::Sign::SubMergeField.new +merge_fields_2.name = "Is Registered?" +merge_fields_2.type = "checkbox" + +merge_fields = [ + merge_fields_1, + merge_fields_2, +] + +signer_roles_1 = Dropbox::Sign::SubTemplateRole.new +signer_roles_1.name = "Client" +signer_roles_1.order = 0 + +signer_roles_2 = Dropbox::Sign::SubTemplateRole.new +signer_roles_2.name = "Witness" +signer_roles_2.order = 1 + +signer_roles = [ + signer_roles_1, + signer_roles_2, +] + +template_create_embedded_draft_request = Dropbox::Sign::TemplateCreateEmbeddedDraftRequest.new +template_create_embedded_draft_request.client_id = "37dee8d8440c66d54cfa05d92c160882" +template_create_embedded_draft_request.message = "For your approval" +template_create_embedded_draft_request.subject = "Please sign this document" +template_create_embedded_draft_request.test_mode = true +template_create_embedded_draft_request.title = "Test Template" +template_create_embedded_draft_request.cc_roles = [ + "Manager", +] +template_create_embedded_draft_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +template_create_embedded_draft_request.field_options = field_options +template_create_embedded_draft_request.merge_fields = merge_fields +template_create_embedded_draft_request.signer_roles = signer_roles begin - result = template_api.template_create_embedded_draft(data) - p result + response = Dropbox::Sign::TemplateApi.new.template_create_embedded_draft( + template_create_embedded_draft_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_create_embedded_draft: #{e}" end ``` @@ -306,25 +364,20 @@ Completely deletes the template specified from the account. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - begin - result = template_api.template_delete(template_id) - p result + Dropbox::Sign::TemplateApi.new.template_delete( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_delete: #{e}" end ``` @@ -378,25 +431,22 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - begin - file_bin = template_api.template_files(template_id) - FileUtils.cp(file_bin.path, "path/to/file.pdf") + response = Dropbox::Sign::TemplateApi.new.template_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + FileUtils.cp(response.path, "./file_response") rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_files: #{e}" end ``` @@ -451,25 +501,22 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - begin - result = template_api.template_files_as_data_uri(template_id) - p result + response = Dropbox::Sign::TemplateApi.new.template_files_as_data_uri( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_files_as_data_uri: #{e}" end ``` @@ -523,25 +570,25 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "5de8179668f2033afac48da1868d0093bf133266" - begin - result = template_api.template_files_as_file_url(template_id) - p result + response = Dropbox::Sign::TemplateApi.new.template_files_as_file_url( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + { + force_download: 1, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_files_as_file_url: #{e}" end ``` @@ -596,25 +643,22 @@ Returns the Template specified by the `template_id` parameter. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -template_id = "f57db65d3f933b5316d398057a36176831451a35" - begin - result = template_api.template_get(template_id) - p result + response = Dropbox::Sign::TemplateApi.new.template_get( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_get: #{e}" end ``` @@ -668,25 +712,27 @@ Returns a list of the Templates that are accessible by you. Take a look at our ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -account_id = "f57db65d3f933b5316d398057a36176831451a35" - begin - result = template_api.template_list({ account_id: account_id }) - p result + response = Dropbox::Sign::TemplateApi.new.template_list( + { + account_id: nil, + page: 1, + page_size: 20, + query: nil, + }, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_list: #{e}" end ``` @@ -743,28 +789,26 @@ Removes the specified Account's access to the specified Template. ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateRemoveUserRequest.new -data.email_address = "george@dropboxsign.com" - -template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" +template_remove_user_request = Dropbox::Sign::TemplateRemoveUserRequest.new +template_remove_user_request.email_address = "george@dropboxsign.com" begin - result = template_api.template_remove_user(template_id, data) - p result + response = Dropbox::Sign::TemplateApi.new.template_remove_user( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_remove_user_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_remove_user: #{e}" end ``` @@ -819,28 +863,28 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -template_api = Dropbox::Sign::TemplateApi.new - -data = Dropbox::Sign::TemplateUpdateFilesRequest.new -data.files = [File.new("example_signature_request.pdf", "r")] - -template_id = "5de8179668f2033afac48da1868d0093bf133266" +template_update_files_request = Dropbox::Sign::TemplateUpdateFilesRequest.new +template_update_files_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] begin - result = template_api.template_update_files(template_id, data) - p result + response = Dropbox::Sign::TemplateApi.new.template_update_files( + "f57db65d3f933b5316d398057a36176831451a35", # template_id + template_update_files_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling TemplateApi#template_update_files: #{e}" end ``` diff --git a/sdks/ruby/docs/UnclaimedDraftApi.md b/sdks/ruby/docs/UnclaimedDraftApi.md index 8858f002d..2ce820254 100644 --- a/sdks/ruby/docs/UnclaimedDraftApi.md +++ b/sdks/ruby/docs/UnclaimedDraftApi.md @@ -21,61 +21,39 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -signer_1 = Dropbox::Sign::SubUnclaimedDraftSigner.new -signer_1.email_address = "jack@example.com" -signer_1.name = "Jack" -signer_1.order = 0 - -signer_2 = Dropbox::Sign::SubUnclaimedDraftSigner.new -signer_2.email_address = "jill@example.com" -signer_2.name = "Jill" -signer_2.order = 1 - -signing_options = Dropbox::Sign::SubSigningOptions.new -signing_options.draw = true -signing_options.type = true -signing_options.upload = true -signing_options.phone = false -signing_options.default_type = "draw" - -field_options = Dropbox::Sign::SubFieldOptions.new -field_options.date_format = "DD - MM - YYYY" - -data = Dropbox::Sign::UnclaimedDraftCreateRequest.new -data.subject = "The NDA we talked about" -data.type = "request_signature" -data.message = "Please sign this NDA and then we can discuss more. Let me know if you have any questions." -data.signers = [signer_1, signer_2] -data.cc_email_addresses = [ - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com", +signers_1 = Dropbox::Sign::SubUnclaimedDraftSigner.new +signers_1.name = "Jack" +signers_1.email_address = "jack@example.com" +signers_1.order = 0 + +signers = [ + signers_1, ] -data.files = [File.new("example_signature_request.pdf", "r")] -data.metadata = { - custom_id: 1234, - custom_text: "NDA #9", -} -data.signing_options = signing_options -data.field_options = field_options -data.test_mode = true + +unclaimed_draft_create_request = Dropbox::Sign::UnclaimedDraftCreateRequest.new +unclaimed_draft_create_request.type = "request_signature" +unclaimed_draft_create_request.test_mode = true +unclaimed_draft_create_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] +unclaimed_draft_create_request.signers = signers begin - result = unclaimed_draft_api.unclaimed_draft_create(data) - p result + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create( + unclaimed_draft_create_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create: #{e}" end ``` @@ -129,29 +107,30 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -data = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.files = [File.new("example_signature_request.pdf", "r")] -data.requester_email_address = "jack@dropboxsign.com" -data.test_mode = true +unclaimed_draft_create_embedded_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest.new +unclaimed_draft_create_embedded_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_request.test_mode = true +unclaimed_draft_create_embedded_request.files = [ + File.new("./example_signature_request.pdf", "r"), +] begin - result = unclaimed_draft_api.unclaimed_draft_create_embedded(data) - p result + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded( + unclaimed_draft_create_embedded_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded: #{e}" end ``` @@ -205,40 +184,49 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new +ccs_1 = Dropbox::Sign::SubCC.new +ccs_1.role = "Accounting" +ccs_1.email_address = "accounting@dropboxsign.com" -signer_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new -signer_1.role = "Client" -signer_1.name = "George" -signer_1.email_address = "george@example.com" +ccs = [ + ccs_1, +] -cc_1 = Dropbox::Sign::SubCC.new -cc_1.role = "Accounting" -cc_1.email_address = "accounting@example.com" +signers_1 = Dropbox::Sign::SubUnclaimedDraftTemplateSigner.new +signers_1.role = "Client" +signers_1.name = "George" +signers_1.email_address = "george@example.com" -data = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.template_ids = ["61a832ff0d8423f91d503e76bfbcc750f7417c78"] -data.requester_email_address = "jack@dropboxsign.com" -data.signers = [signer_1] -data.ccs = [cc_1] -data.test_mode = true +signers = [ + signers_1, +] + +unclaimed_draft_create_embedded_with_template_request = Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest.new +unclaimed_draft_create_embedded_with_template_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_create_embedded_with_template_request.requester_email_address = "jack@dropboxsign.com" +unclaimed_draft_create_embedded_with_template_request.template_ids = [ + "61a832ff0d8423f91d503e76bfbcc750f7417c78", +] +unclaimed_draft_create_embedded_with_template_request.test_mode = false +unclaimed_draft_create_embedded_with_template_request.ccs = ccs +unclaimed_draft_create_embedded_with_template_request.signers = signers begin - result = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template(data) - p result + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_create_embedded_with_template( + unclaimed_draft_create_embedded_with_template_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_create_embedded_with_template: #{e}" end ``` @@ -292,29 +280,27 @@ Creates a new signature request from an embedded request that can be edited prio ### Examples ```ruby +require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| - # Configure HTTP basic authorization: api_key config.username = "YOUR_API_KEY" - - # or, configure Bearer (JWT) authorization: oauth2 # config.access_token = "YOUR_ACCESS_TOKEN" end -unclaimed_draft_api = Dropbox::Sign::UnclaimedDraftApi.new - -data = Dropbox::Sign::UnclaimedDraftEditAndResendRequest.new -data.client_id = "ec64a202072370a737edf4a0eb7f4437" -data.test_mode = true - -signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" +unclaimed_draft_edit_and_resend_request = Dropbox::Sign::UnclaimedDraftEditAndResendRequest.new +unclaimed_draft_edit_and_resend_request.client_id = "b6b8e7deaf8f0b95c029dca049356d4a2cf9710a" +unclaimed_draft_edit_and_resend_request.test_mode = false begin - result = unclaimed_draft_api.unclaimed_draft_edit_and_resend(signature_request_id, data) - p result + response = Dropbox::Sign::UnclaimedDraftApi.new.unclaimed_draft_edit_and_resend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id + unclaimed_draft_edit_and_resend_request, + ) + + p response rescue Dropbox::Sign::ApiError => e - puts "Exception when calling Dropbox Sign API: #{e}" + puts "Exception when calling UnclaimedDraftApi#unclaimed_draft_edit_and_resend: #{e}" end ``` diff --git a/sdks/ruby/dropbox-sign.gemspec b/sdks/ruby/dropbox-sign.gemspec index b547a06fd..1c683c9a0 100755 --- a/sdks/ruby/dropbox-sign.gemspec +++ b/sdks/ruby/dropbox-sign.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 0921573f8..413c293c8 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -80,6 +80,10 @@ require 'dropbox-sign/models/signature_request_bulk_send_with_template_request' require 'dropbox-sign/models/signature_request_create_embedded_request' require 'dropbox-sign/models/signature_request_create_embedded_with_template_request' +require 'dropbox-sign/models/signature_request_edit_embedded_request' +require 'dropbox-sign/models/signature_request_edit_embedded_with_template_request' +require 'dropbox-sign/models/signature_request_edit_request' +require 'dropbox-sign/models/signature_request_edit_with_template_request' require 'dropbox-sign/models/signature_request_get_response' require 'dropbox-sign/models/signature_request_list_response' require 'dropbox-sign/models/signature_request_remind_request' diff --git a/sdks/ruby/lib/dropbox-sign/api/account_api.rb b/sdks/ruby/lib/dropbox-sign/api/account_api.rb index 35934cb92..454dd2144 100644 --- a/sdks/ruby/lib/dropbox-sign/api/account_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/account_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb b/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb index 7b0c42e41..a6fb78541 100644 --- a/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/api_app_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb b/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb index 567b8c371..5f628409e 100644 --- a/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/bulk_send_job_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb b/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb index 3b25c76cc..5724c4923 100644 --- a/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/embedded_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/fax_api.rb b/sdks/ruby/lib/dropbox-sign/api/fax_api.rb index 17fca7916..aac2bc905 100644 --- a/sdks/ruby/lib/dropbox-sign/api/fax_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/fax_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -23,7 +23,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete Fax - # Deletes the specified Fax from the system. + # Deletes the specified Fax from the system # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [nil] @@ -33,7 +33,7 @@ def fax_delete(fax_id, opts = {}) end # Delete Fax - # Deletes the specified Fax from the system. + # Deletes the specified Fax from the system # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -89,8 +89,8 @@ def fax_delete_with_http_info(fax_id, opts = {}) return data, status_code, headers end - # List Fax Files - # Returns list of fax files + # Download Fax Files + # Downloads files associated with a Fax # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [File] @@ -99,8 +99,8 @@ def fax_files(fax_id, opts = {}) data end - # List Fax Files - # Returns list of fax files + # Download Fax Files + # Downloads files associated with a Fax # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers @@ -184,7 +184,7 @@ def fax_files_with_http_info(fax_id, opts = {}) end # Get Fax - # Returns information about fax + # Returns information about a Fax # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [FaxGetResponse] @@ -194,7 +194,7 @@ def fax_get(fax_id, opts = {}) end # Get Fax - # Returns information about fax + # Returns information about a Fax # @param fax_id [String] Fax ID # @param [Hash] opts the optional parameters # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers @@ -278,10 +278,10 @@ def fax_get_with_http_info(fax_id, opts = {}) end # Lists Faxes - # Returns properties of multiple faxes + # Returns properties of multiple Faxes # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page (default to 1) - # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page Which page number of the Fax List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [FaxListResponse] def fax_list(opts = {}) data, _status_code, _headers = fax_list_with_http_info(opts) @@ -289,10 +289,10 @@ def fax_list(opts = {}) end # Lists Faxes - # Returns properties of multiple faxes + # Returns properties of multiple Faxes # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page (default to 1) - # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page Which page number of the Fax List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) # @return [Array<(FaxListResponse, Integer, Hash)>] FaxListResponse data, response status code and response headers def fax_list_with_http_info(opts = {}) if @api_client.config.debugging @@ -384,7 +384,7 @@ def fax_list_with_http_info(opts = {}) end # Send Fax - # Action to prepare and send a fax + # Creates and sends a new Fax with the submitted file(s) # @param fax_send_request [FaxSendRequest] # @param [Hash] opts the optional parameters # @return [FaxGetResponse] @@ -394,7 +394,7 @@ def fax_send(fax_send_request, opts = {}) end # Send Fax - # Action to prepare and send a fax + # Creates and sends a new Fax with the submitted file(s) # @param fax_send_request [FaxSendRequest] # @param [Hash] opts the optional parameters # @return [Array<(FaxGetResponse, Integer, Hash)>] FaxGetResponse data, response status code and response headers diff --git a/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb b/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb index 7adb326d6..02d224ccb 100644 --- a/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/fax_line_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -132,12 +132,12 @@ def fax_line_add_user_with_http_info(fax_line_add_user_request, opts = {}) end # Get Available Fax Line Area Codes - # Returns a response with the area codes available for a given state/provice and city. - # @param country [String] Filter area codes by country. + # Returns a list of available area codes for a given state/province and city + # @param country [String] Filter area codes by country # @param [Hash] opts the optional parameters - # @option opts [String] :state Filter area codes by state. - # @option opts [String] :province Filter area codes by province. - # @option opts [String] :city Filter area codes by city. + # @option opts [String] :state Filter area codes by state + # @option opts [String] :province Filter area codes by province + # @option opts [String] :city Filter area codes by city # @return [FaxLineAreaCodeGetResponse] def fax_line_area_code_get(country, opts = {}) data, _status_code, _headers = fax_line_area_code_get_with_http_info(country, opts) @@ -145,12 +145,12 @@ def fax_line_area_code_get(country, opts = {}) end # Get Available Fax Line Area Codes - # Returns a response with the area codes available for a given state/provice and city. - # @param country [String] Filter area codes by country. + # Returns a list of available area codes for a given state/province and city + # @param country [String] Filter area codes by country # @param [Hash] opts the optional parameters - # @option opts [String] :state Filter area codes by state. - # @option opts [String] :province Filter area codes by province. - # @option opts [String] :city Filter area codes by city. + # @option opts [String] :state Filter area codes by state + # @option opts [String] :province Filter area codes by province + # @option opts [String] :city Filter area codes by city # @return [Array<(FaxLineAreaCodeGetResponse, Integer, Hash)>] FaxLineAreaCodeGetResponse data, response status code and response headers def fax_line_area_code_get_with_http_info(country, opts = {}) if @api_client.config.debugging @@ -249,7 +249,7 @@ def fax_line_area_code_get_with_http_info(country, opts = {}) end # Purchase Fax Line - # Purchases a new Fax Line. + # Purchases a new Fax Line # @param fax_line_create_request [FaxLineCreateRequest] # @param [Hash] opts the optional parameters # @return [FaxLineResponse] @@ -259,7 +259,7 @@ def fax_line_create(fax_line_create_request, opts = {}) end # Purchase Fax Line - # Purchases a new Fax Line. + # Purchases a new Fax Line # @param fax_line_create_request [FaxLineCreateRequest] # @param [Hash] opts the optional parameters # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers @@ -441,7 +441,7 @@ def fax_line_delete_with_http_info(fax_line_delete_request, opts = {}) # Get Fax Line # Returns the properties and settings of a Fax Line. - # @param number [String] The Fax Line number. + # @param number [String] The Fax Line number # @param [Hash] opts the optional parameters # @return [FaxLineResponse] def fax_line_get(number, opts = {}) @@ -451,7 +451,7 @@ def fax_line_get(number, opts = {}) # Get Fax Line # Returns the properties and settings of a Fax Line. - # @param number [String] The Fax Line number. + # @param number [String] The Fax Line number # @param [Hash] opts the optional parameters # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers def fax_line_get_with_http_info(number, opts = {}) @@ -538,9 +538,9 @@ def fax_line_get_with_http_info(number, opts = {}) # Returns the properties and settings of multiple Fax Lines. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Account ID - # @option opts [Integer] :page Page (default to 1) - # @option opts [Integer] :page_size Page size (default to 20) - # @option opts [Boolean] :show_team_lines Show team lines + # @option opts [Integer] :page Which page number of the Fax Line List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) + # @option opts [Boolean] :show_team_lines Include Fax Lines belonging to team members in the list # @return [FaxLineListResponse] def fax_line_list(opts = {}) data, _status_code, _headers = fax_line_list_with_http_info(opts) @@ -551,9 +551,9 @@ def fax_line_list(opts = {}) # Returns the properties and settings of multiple Fax Lines. # @param [Hash] opts the optional parameters # @option opts [String] :account_id Account ID - # @option opts [Integer] :page Page (default to 1) - # @option opts [Integer] :page_size Page size (default to 20) - # @option opts [Boolean] :show_team_lines Show team lines + # @option opts [Integer] :page Which page number of the Fax Line List to return. Defaults to `1`. (default to 1) + # @option opts [Integer] :page_size Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (default to 20) + # @option opts [Boolean] :show_team_lines Include Fax Lines belonging to team members in the list # @return [Array<(FaxLineListResponse, Integer, Hash)>] FaxLineListResponse data, response status code and response headers def fax_line_list_with_http_info(opts = {}) if @api_client.config.debugging @@ -635,7 +635,7 @@ def fax_line_list_with_http_info(opts = {}) end # Remove Fax Line Access - # Removes a user's access to the specified Fax Line. + # Removes a user's access to the specified Fax Line # @param fax_line_remove_user_request [FaxLineRemoveUserRequest] # @param [Hash] opts the optional parameters # @return [FaxLineResponse] @@ -645,7 +645,7 @@ def fax_line_remove_user(fax_line_remove_user_request, opts = {}) end # Remove Fax Line Access - # Removes a user's access to the specified Fax Line. + # Removes a user's access to the specified Fax Line # @param fax_line_remove_user_request [FaxLineRemoveUserRequest] # @param [Hash] opts the optional parameters # @return [Array<(FaxLineResponse, Integer, Hash)>] FaxLineResponse data, response status code and response headers diff --git a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb index 6e9d748e8..ae9af5a5c 100644 --- a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/report_api.rb b/sdks/ruby/lib/dropbox-sign/api/report_api.rb index a48beb311..ee776ff00 100644 --- a/sdks/ruby/lib/dropbox-sign/api/report_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/report_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb b/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb index d61d27b46..1e74c7e5e 100644 --- a/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/signature_request_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -525,6 +525,466 @@ def signature_request_create_embedded_with_template_with_http_info(signature_req return data, status_code, headers end + # Edit Signature Request + # Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_request [SignatureRequestEditRequest] + # @param [Hash] opts the optional parameters + # @return [SignatureRequestGetResponse] + def signature_request_edit(signature_request_id, signature_request_edit_request, opts = {}) + data, _status_code, _headers = signature_request_edit_with_http_info(signature_request_id, signature_request_edit_request, opts) + data + end + + # Edit Signature Request + # Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_request [SignatureRequestEditRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SignatureRequestGetResponse, Integer, Hash)>] SignatureRequestGetResponse data, response status code and response headers + def signature_request_edit_with_http_info(signature_request_id, signature_request_edit_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SignatureRequestApi.signature_request_edit ...' + end + # verify the required parameter 'signature_request_id' is set + if @api_client.config.client_side_validation && signature_request_id.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling SignatureRequestApi.signature_request_edit" + end + # verify the required parameter 'signature_request_edit_request' is set + if @api_client.config.client_side_validation && signature_request_edit_request.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_edit_request' when calling SignatureRequestApi.signature_request_edit" + end + # resource path + local_var_path = '/signature_request/edit/{signature_request_id}'.sub('{' + 'signature_request_id' + '}', CGI.escape(signature_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + signature_request_edit_request, + Dropbox::Sign::SignatureRequestEditRequest.openapi_types + ) + + # form parameters + if result[:has_file] + form_params = opts[:form_params] || result[:params] + header_params['Content-Type'] = 'multipart/form-data' + else + # http body (model) + post_body = opts[:debug_body] || result[:params] + end + + # return_type + return_type = opts[:debug_return_type] || 'SignatureRequestGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"SignatureRequestApi.signature_request_edit", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::SignatureRequestGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SignatureRequestApi#signature_request_edit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Edit Embedded Signature Request + # Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_embedded_request [SignatureRequestEditEmbeddedRequest] + # @param [Hash] opts the optional parameters + # @return [SignatureRequestGetResponse] + def signature_request_edit_embedded(signature_request_id, signature_request_edit_embedded_request, opts = {}) + data, _status_code, _headers = signature_request_edit_embedded_with_http_info(signature_request_id, signature_request_edit_embedded_request, opts) + data + end + + # Edit Embedded Signature Request + # Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_embedded_request [SignatureRequestEditEmbeddedRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SignatureRequestGetResponse, Integer, Hash)>] SignatureRequestGetResponse data, response status code and response headers + def signature_request_edit_embedded_with_http_info(signature_request_id, signature_request_edit_embedded_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SignatureRequestApi.signature_request_edit_embedded ...' + end + # verify the required parameter 'signature_request_id' is set + if @api_client.config.client_side_validation && signature_request_id.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling SignatureRequestApi.signature_request_edit_embedded" + end + # verify the required parameter 'signature_request_edit_embedded_request' is set + if @api_client.config.client_side_validation && signature_request_edit_embedded_request.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_edit_embedded_request' when calling SignatureRequestApi.signature_request_edit_embedded" + end + # resource path + local_var_path = '/signature_request/edit_embedded/{signature_request_id}'.sub('{' + 'signature_request_id' + '}', CGI.escape(signature_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + signature_request_edit_embedded_request, + Dropbox::Sign::SignatureRequestEditEmbeddedRequest.openapi_types + ) + + # form parameters + if result[:has_file] + form_params = opts[:form_params] || result[:params] + header_params['Content-Type'] = 'multipart/form-data' + else + # http body (model) + post_body = opts[:debug_body] || result[:params] + end + + # return_type + return_type = opts[:debug_return_type] || 'SignatureRequestGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"SignatureRequestApi.signature_request_edit_embedded", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::SignatureRequestGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SignatureRequestApi#signature_request_edit_embedded\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Edit Embedded Signature Request with Template + # Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_embedded_with_template_request [SignatureRequestEditEmbeddedWithTemplateRequest] + # @param [Hash] opts the optional parameters + # @return [SignatureRequestGetResponse] + def signature_request_edit_embedded_with_template(signature_request_id, signature_request_edit_embedded_with_template_request, opts = {}) + data, _status_code, _headers = signature_request_edit_embedded_with_template_with_http_info(signature_request_id, signature_request_edit_embedded_with_template_request, opts) + data + end + + # Edit Embedded Signature Request with Template + # Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_embedded_with_template_request [SignatureRequestEditEmbeddedWithTemplateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SignatureRequestGetResponse, Integer, Hash)>] SignatureRequestGetResponse data, response status code and response headers + def signature_request_edit_embedded_with_template_with_http_info(signature_request_id, signature_request_edit_embedded_with_template_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SignatureRequestApi.signature_request_edit_embedded_with_template ...' + end + # verify the required parameter 'signature_request_id' is set + if @api_client.config.client_side_validation && signature_request_id.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling SignatureRequestApi.signature_request_edit_embedded_with_template" + end + # verify the required parameter 'signature_request_edit_embedded_with_template_request' is set + if @api_client.config.client_side_validation && signature_request_edit_embedded_with_template_request.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_edit_embedded_with_template_request' when calling SignatureRequestApi.signature_request_edit_embedded_with_template" + end + # resource path + local_var_path = '/signature_request/edit_embedded_with_template/{signature_request_id}'.sub('{' + 'signature_request_id' + '}', CGI.escape(signature_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + signature_request_edit_embedded_with_template_request, + Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest.openapi_types + ) + + # form parameters + if result[:has_file] + form_params = opts[:form_params] || result[:params] + header_params['Content-Type'] = 'multipart/form-data' + else + # http body (model) + post_body = opts[:debug_body] || result[:params] + end + + # return_type + return_type = opts[:debug_return_type] || 'SignatureRequestGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"SignatureRequestApi.signature_request_edit_embedded_with_template", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::SignatureRequestGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SignatureRequestApi#signature_request_edit_embedded_with_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Edit Signature Request With Template + # Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_with_template_request [SignatureRequestEditWithTemplateRequest] + # @param [Hash] opts the optional parameters + # @return [SignatureRequestGetResponse] + def signature_request_edit_with_template(signature_request_id, signature_request_edit_with_template_request, opts = {}) + data, _status_code, _headers = signature_request_edit_with_template_with_http_info(signature_request_id, signature_request_edit_with_template_request, opts) + data + end + + # Edit Signature Request With Template + # Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + # @param signature_request_id [String] The id of the SignatureRequest to edit. + # @param signature_request_edit_with_template_request [SignatureRequestEditWithTemplateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SignatureRequestGetResponse, Integer, Hash)>] SignatureRequestGetResponse data, response status code and response headers + def signature_request_edit_with_template_with_http_info(signature_request_id, signature_request_edit_with_template_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SignatureRequestApi.signature_request_edit_with_template ...' + end + # verify the required parameter 'signature_request_id' is set + if @api_client.config.client_side_validation && signature_request_id.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling SignatureRequestApi.signature_request_edit_with_template" + end + # verify the required parameter 'signature_request_edit_with_template_request' is set + if @api_client.config.client_side_validation && signature_request_edit_with_template_request.nil? + fail ArgumentError, "Missing the required parameter 'signature_request_edit_with_template_request' when calling SignatureRequestApi.signature_request_edit_with_template" + end + # resource path + local_var_path = '/signature_request/edit_with_template/{signature_request_id}'.sub('{' + 'signature_request_id' + '}', CGI.escape(signature_request_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + post_body = {} + form_params = opts[:form_params] || {} + result = @api_client.generate_form_data( + signature_request_edit_with_template_request, + Dropbox::Sign::SignatureRequestEditWithTemplateRequest.openapi_types + ) + + # form parameters + if result[:has_file] + form_params = opts[:form_params] || result[:params] + header_params['Content-Type'] = 'multipart/form-data' + else + # http body (model) + post_body = opts[:debug_body] || result[:params] + end + + # return_type + return_type = opts[:debug_return_type] || 'SignatureRequestGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] + + new_options = opts.merge( + :operation => :"SignatureRequestApi.signature_request_edit_with_template", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + begin + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + rescue Dropbox::Sign::ApiError => e + if e.code === 200 + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::SignatureRequestGetResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + range_code = "4XX".split('').first + range_code_left = "#{range_code}00".to_i + range_code_right = "#{range_code}99".to_i + if e.code >= range_code_left && e.code <= range_code_right + body = @api_client.convert_to_type( + JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], + "Dropbox::Sign::ErrorResponse" + ) + + fail ApiError.new(:code => e.code, + :response_headers => e.response_headers, + :response_body => body), + e.message + end + + end + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SignatureRequestApi#signature_request_edit_with_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Download Files # Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. # @param signature_request_id [String] The id of the SignatureRequest to retrieve. diff --git a/sdks/ruby/lib/dropbox-sign/api/team_api.rb b/sdks/ruby/lib/dropbox-sign/api/team_api.rb index 010f36fe9..1002a2d6b 100644 --- a/sdks/ruby/lib/dropbox-sign/api/team_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/team_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/template_api.rb b/sdks/ruby/lib/dropbox-sign/api/template_api.rb index 7b6e4ac16..4620ab332 100644 --- a/sdks/ruby/lib/dropbox-sign/api/template_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/template_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb b/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb index cb497d5a8..53ede8998 100644 --- a/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/unclaimed_draft_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/api_client.rb b/sdks/ruby/lib/dropbox-sign/api_client.rb index e8a364035..ad1d84275 100644 --- a/sdks/ruby/lib/dropbox-sign/api_client.rb +++ b/sdks/ruby/lib/dropbox-sign/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -51,7 +51,8 @@ def self.default # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) - tempfile = download_file(request) if opts[:return_type] == 'File' + tempfile = nil + (download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -190,19 +191,17 @@ def download_file(request) chunk.force_encoding(encoding) tempfile.write(chunk) end - # run the request to ensure the tempfile is created successfully before returning it - request.run - if tempfile + request.on_complete do + if !tempfile + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") + end tempfile.close @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ "will be deleted automatically with GC. It's also recommended to delete the temp file "\ "explicitly with `tempfile.delete`" - else - fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") + yield tempfile if block_given? end - - tempfile end # Check if the given MIME is a JSON MIME. diff --git a/sdks/ruby/lib/dropbox-sign/api_error.rb b/sdks/ruby/lib/dropbox-sign/api_error.rb index 59c00cc87..687815089 100644 --- a/sdks/ruby/lib/dropbox-sign/api_error.rb +++ b/sdks/ruby/lib/dropbox-sign/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/configuration.rb b/sdks/ruby/lib/dropbox-sign/configuration.rb index 4e1c70b31..425753050 100644 --- a/sdks/ruby/lib/dropbox-sign/configuration.rb +++ b/sdks/ruby/lib/dropbox-sign/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb b/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb index 4da3093a2..d11354bbf 100644 --- a/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb +++ b/sdks/ruby/lib/dropbox-sign/event_callback_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb index c1f094e77..1553f08f7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -98,9 +103,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -140,6 +146,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb index 65e95217d..868cd74b8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -37,9 +37,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -90,9 +95,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -130,6 +136,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] account Value to be assigned + def account=(account) + if account.nil? + fail ArgumentError, 'account cannot be nil' + end + + @account = account + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb index 855d8c69d..cf00b1be9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] account Value to be assigned + def account=(account) + if account.nil? + fail ArgumentError, 'account cannot be nil' + end + + @account = account + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_response.rb index 1ab6a5d47..4e96e470d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -77,9 +77,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -142,9 +147,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb b/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb index fd718d612..8fab66aeb 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response_quotas.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -55,9 +55,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -117,9 +122,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseQuotas`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseQuotas`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb b/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb index 3eb518794..a888f45e6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_response_usage.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -82,9 +87,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountResponseUsage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb index a24f6a43c..9da8f564c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb index 1b93ec7be..5df848894 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -110,6 +116,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb index 7f6b6e1c5..9cb98eef7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb b/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb index 2ea7c80c9..a4f225ef0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/account_verify_response_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyResponseAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::AccountVerifyResponseAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb index 37e542e5e..f37d1a2fc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -56,9 +56,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -113,9 +118,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -201,6 +207,16 @@ def domains=(domains) @domains = domains end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb index 5befd740c..2b22f7b64 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] api_app Value to be assigned + def api_app=(api_app) + if api_app.nil? + fail ArgumentError, 'api_app cannot be nil' + end + + @api_app = api_app + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb index 7247d4851..5d034c11b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -38,9 +38,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -91,9 +96,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +144,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] api_apps Value to be assigned + def api_apps=(api_apps) + if api_apps.nil? + fail ArgumentError, 'api_apps cannot be nil' + end + + @api_apps = api_apps + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb index 2f7923ed0..17c9da0b3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -71,9 +71,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -135,9 +140,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb index c861200d5..d96568182 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_o_auth.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -100,9 +105,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOAuth`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOAuth`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb index 8e7742ae2..ba9838751 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb index 50abb33d1..495c770f9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_owner_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOwnerAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseOwnerAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb index 99f0227d1..d1990e632 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_response_white_labeling_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -81,9 +81,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -145,9 +150,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseWhiteLabelingOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppResponseWhiteLabelingOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb index 0c526d758..45b38ce82 100644 --- a/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/api_app_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -56,9 +56,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -113,9 +118,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ApiAppUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb index bd14dd0d4..113311e4d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -42,9 +42,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -96,9 +101,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -152,6 +158,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] bulk_send_job Value to be assigned + def bulk_send_job=(bulk_send_job) + if bulk_send_job.nil? + fail ArgumentError, 'bulk_send_job cannot be nil' + end + + @bulk_send_job = bulk_send_job + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + + # Custom attribute writer method with validation + # @param [Object] signature_requests Value to be assigned + def signature_requests=(signature_requests) + if signature_requests.nil? + fail ArgumentError, 'signature_requests cannot be nil' + end + + @signature_requests = signature_requests + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb index 39e5e3c9e..603f9e568 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -149,9 +149,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -235,9 +240,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobGetResponseSignatureRequests`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobGetResponseSignatureRequests`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb index 4c9b8080b..0f04a4ec3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -38,9 +38,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -91,9 +96,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +144,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] bulk_send_jobs Value to be assigned + def bulk_send_jobs=(bulk_send_jobs) + if bulk_send_jobs.nil? + fail ArgumentError, 'bulk_send_jobs cannot be nil' + end + + @bulk_send_jobs = bulk_send_jobs + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb index b84d927a1..cba78bfbe 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -100,9 +105,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb index f8709820e..27e6921af 100644 --- a/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/bulk_send_job_send_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobSendResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::BulkSendJobSendResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] bulk_send_job Value to be assigned + def bulk_send_job=(bulk_send_job) + if bulk_send_job.nil? + fail ArgumentError, 'bulk_send_job cannot be nil' + end + + @bulk_send_job = bulk_send_job + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb index 1f65e41ad..d192c0da3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -73,9 +73,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -133,9 +138,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb index 0ce2e61b7..34a94f0af 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] embedded Value to be assigned + def embedded=(embedded) + if embedded.nil? + fail ArgumentError, 'embedded cannot be nil' + end + + @embedded = embedded + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb index 2c72d8b08..552543b33 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_edit_url_response_embedded.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlResponseEmbedded`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedEditUrlResponseEmbedded`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb index 7d91360ac..ac6fcd23f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedSignUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedSignUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] embedded Value to be assigned + def embedded=(embedded) + if embedded.nil? + fail ArgumentError, 'embedded cannot be nil' + end + + @embedded = embedded + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb index 15d0f1369..a6770f325 100644 --- a/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb +++ b/sdks/ruby/lib/dropbox-sign/models/embedded_sign_url_response_embedded.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedSignUrlResponseEmbedded`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EmbeddedSignUrlResponseEmbedded`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response.rb b/sdks/ruby/lib/dropbox-sign/models/error_response.rb index c2d3987eb..6bc8b7241 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -28,9 +28,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -79,9 +84,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -109,6 +115,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb index 21b2abf8e..b1b85ff45 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -40,9 +40,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ErrorResponseError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ErrorResponseError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -136,6 +142,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] error_msg Value to be assigned + def error_msg=(error_msg) + if error_msg.nil? + fail ArgumentError, 'error_msg cannot be nil' + end + + @error_msg = error_msg + end + + # Custom attribute writer method with validation + # @param [Object] error_name Value to be assigned + def error_name=(error_name) + if error_name.nil? + fail ArgumentError, 'error_name cannot be nil' + end + + @error_name = error_name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb index b9e718290..cfd29dac4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -40,9 +40,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -94,9 +99,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -136,6 +142,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] event Value to be assigned + def event=(event) + if event.nil? + fail ArgumentError, 'event cannot be nil' + end + + @event = event + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb index 5ce3deed7..134eceee0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -66,9 +66,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -120,9 +125,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequestEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequestEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,6 +180,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] event_time Value to be assigned + def event_time=(event_time) + if event_time.nil? + fail ArgumentError, 'event_time cannot be nil' + end + + @event_time = event_time + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] event_type Object to be assigned def event_type=(event_type) @@ -184,6 +200,16 @@ def event_type=(event_type) @event_type = event_type end + # Custom attribute writer method with validation + # @param [Object] event_hash Value to be assigned + def event_hash=(event_hash) + if event_hash.nil? + fail ArgumentError, 'event_hash cannot be nil' + end + + @event_hash = event_hash + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb index 02c8d4cbb..a21984fd3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb +++ b/sdks/ruby/lib/dropbox-sign/models/event_callback_request_event_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -103,9 +108,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequestEventMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::EventCallbackRequestEventMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb index a774af3b6..20ed3843a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] fax Value to be assigned + def fax=(fax) + if fax.nil? + fail ArgumentError, 'fax cannot be nil' + end + + @fax = fax + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb index d2b04a378..a3d436996 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_add_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -18,7 +18,7 @@ module Dropbox module Dropbox::Sign class FaxLineAddUserRequest - # The Fax Line number. + # The Fax Line number # @return [String] attr_accessor :number @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAddUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAddUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -130,6 +136,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + @number = number + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb index 837596e5b..bfe3e2259 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_country_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb index df6d0c2de..c699981ee 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_province_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb index a72459640..695a0efb8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -28,9 +28,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -79,9 +84,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAreaCodeGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineAreaCodeGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -111,6 +117,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] area_codes Value to be assigned + def area_codes=(area_codes) + if area_codes.nil? + fail ArgumentError, 'area_codes cannot be nil' + end + + @area_codes = area_codes + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb index ceaa724ca..ddd707a61 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_area_code_get_state_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb index 16f9ebdde..b014d9291 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -18,19 +18,19 @@ module Dropbox module Dropbox::Sign class FaxLineCreateRequest - # Area code + # Area code of the new Fax Line # @return [Integer] attr_accessor :area_code - # Country + # Country of the area code # @return [String] attr_accessor :country - # City + # City of the area code # @return [String] attr_accessor :city - # Account ID + # Account ID of the account that will be assigned this new Fax Line # @return [String] attr_accessor :account_id @@ -66,9 +66,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -120,9 +125,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -169,6 +175,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] area_code Value to be assigned + def area_code=(area_code) + if area_code.nil? + fail ArgumentError, 'area_code cannot be nil' + end + + @area_code = area_code + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] country Object to be assigned def country=(country) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb index cdb344e44..e49240b5f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_delete_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -18,7 +18,7 @@ module Dropbox module Dropbox::Sign class FaxLineDeleteRequest - # The Fax Line number. + # The Fax Line number # @return [String] attr_accessor :number @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineDeleteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -110,6 +116,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + @number = number + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb index 1aa85620b..0fe478f46 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -36,9 +36,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -89,9 +94,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -134,6 +140,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + + # Custom attribute writer method with validation + # @param [Object] fax_lines Value to be assigned + def fax_lines=(fax_lines) + if fax_lines.nil? + fail ArgumentError, 'fax_lines cannot be nil' + end + + @fax_lines = fax_lines + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb index 3908c50fb..a90792266 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_remove_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -18,15 +18,15 @@ module Dropbox module Dropbox::Sign class FaxLineRemoveUserRequest - # The Fax Line number. + # The Fax Line number # @return [String] attr_accessor :number - # Account ID + # Account ID of the user to remove access # @return [String] attr_accessor :account_id - # Email address + # Email address of the user to remove access # @return [String] attr_accessor :email_address @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineRemoveUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineRemoveUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -130,6 +136,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + @number = number + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb index bf80e66a1..d495cac99 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -32,9 +32,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -84,9 +89,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -118,6 +124,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] fax_line Value to be assigned + def fax_line=(fax_line) + if fax_line.nil? + fail ArgumentError, 'fax_line cannot be nil' + end + + @fax_line = fax_line + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb b/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb index 02d7797ab..6ca439559 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_line_response_fax_line.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -43,9 +43,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -97,9 +102,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponseFaxLine`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxLineResponseFaxLine`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb index a06e7fe82..22e8befed 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -32,9 +32,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -84,9 +89,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -125,6 +131,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] faxes Value to be assigned + def faxes=(faxes) + if faxes.nil? + fail ArgumentError, 'faxes cannot be nil' + end + + @faxes = faxes + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_response.rb b/sdks/ruby/lib/dropbox-sign/models/fax_response.rb index b6b53501d..b9f7ae1ae 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -79,9 +79,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -143,9 +148,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -252,6 +258,86 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] fax_id Value to be assigned + def fax_id=(fax_id) + if fax_id.nil? + fail ArgumentError, 'fax_id cannot be nil' + end + + @fax_id = fax_id + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] original_title Value to be assigned + def original_title=(original_title) + if original_title.nil? + fail ArgumentError, 'original_title cannot be nil' + end + + @original_title = original_title + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + if metadata.nil? + fail ArgumentError, 'metadata cannot be nil' + end + + @metadata = metadata + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] sender Value to be assigned + def sender=(sender) + if sender.nil? + fail ArgumentError, 'sender cannot be nil' + end + + @sender = sender + end + + # Custom attribute writer method with validation + # @param [Object] files_url Value to be assigned + def files_url=(files_url) + if files_url.nil? + fail ArgumentError, 'files_url cannot be nil' + end + + @files_url = files_url + end + + # Custom attribute writer method with validation + # @param [Object] transmissions Value to be assigned + def transmissions=(transmissions) + if transmissions.nil? + fail ArgumentError, 'transmissions cannot be nil' + end + + @transmissions = transmissions + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb b/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb index cd402cc73..f10e053a0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_response_transmission.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -61,9 +61,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -114,9 +119,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxResponseTransmission`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxResponseTransmission`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -159,6 +165,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] recipient Value to be assigned + def recipient=(recipient) + if recipient.nil? + fail ArgumentError, 'recipient cannot be nil' + end + + @recipient = recipient + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] status_code Object to be assigned def status_code=(status_code) diff --git a/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb b/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb index 18616cee1..e1fba417c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/fax_send_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -18,7 +18,7 @@ module Dropbox module Dropbox::Sign class FaxSendRequest - # Fax Send To Recipient + # Recipient of the fax Can be a phone number in E.164 format or email address # @return [String] attr_accessor :recipient @@ -26,11 +26,11 @@ class FaxSendRequest # @return [String] attr_accessor :sender - # Fax File to Send + # Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. # @return [Array] attr_accessor :files - # Fax File URL to Send + # Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. # @return [Array] attr_accessor :file_urls @@ -38,11 +38,11 @@ class FaxSendRequest # @return [Boolean] attr_accessor :test_mode - # Fax Cover Page for Recipient + # Fax cover page recipient information # @return [String] attr_accessor :cover_page_to - # Fax Cover Page for Sender + # Fax cover page sender information # @return [String] attr_accessor :cover_page_from @@ -69,9 +69,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -128,9 +133,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxSendRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FaxSendRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -196,6 +202,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] recipient Value to be assigned + def recipient=(recipient) + if recipient.nil? + fail ArgumentError, 'recipient cannot be nil' + end + + @recipient = recipient + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/file_response.rb b/sdks/ruby/lib/dropbox-sign/models/file_response.rb index 7ec6b5545..5d4ed8cad 100644 --- a/sdks/ruby/lib/dropbox-sign/models/file_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/file_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FileResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FileResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -125,6 +131,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] file_url Value to be assigned + def file_url=(file_url) + if file_url.nil? + fail ArgumentError, 'file_url cannot be nil' + end + + @file_url = file_url + end + + # Custom attribute writer method with validation + # @param [Object] expires_at Value to be assigned + def expires_at=(expires_at) + if expires_at.nil? + fail ArgumentError, 'expires_at cannot be nil' + end + + @expires_at = expires_at + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb b/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb index aa5b6cbe3..5db69e37c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb +++ b/sdks/ruby/lib/dropbox-sign/models/file_response_data_uri.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FileResponseDataUri`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::FileResponseDataUri`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -110,6 +116,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] data_uri Value to be assigned + def data_uri=(data_uri) + if data_uri.nil? + fail ArgumentError, 'data_uri cannot be nil' + end + + @data_uri = data_uri + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb index 6e39e1baa..6063b2666 100644 --- a/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/list_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -100,9 +105,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ListInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ListInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb index 81b9dd751..b7825d75b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_generate_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -49,9 +49,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -104,9 +109,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenGenerateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenGenerateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -172,6 +178,56 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] client_secret Value to be assigned + def client_secret=(client_secret) + if client_secret.nil? + fail ArgumentError, 'client_secret cannot be nil' + end + + @client_secret = client_secret + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] grant_type Value to be assigned + def grant_type=(grant_type) + if grant_type.nil? + fail ArgumentError, 'grant_type cannot be nil' + end + + @grant_type = grant_type + end + + # Custom attribute writer method with validation + # @param [Object] state Value to be assigned + def state=(state) + if state.nil? + fail ArgumentError, 'state cannot be nil' + end + + @state = state + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb index 3ac73212e..67157622e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_refresh_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -98,9 +103,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenRefreshRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenRefreshRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -147,6 +153,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] grant_type Value to be assigned + def grant_type=(grant_type) + if grant_type.nil? + fail ArgumentError, 'grant_type cannot be nil' + end + + @grant_type = grant_type + end + + # Custom attribute writer method with validation + # @param [Object] refresh_token Value to be assigned + def refresh_token=(refresh_token) + if refresh_token.nil? + fail ArgumentError, 'refresh_token cannot be nil' + end + + @refresh_token = refresh_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb index ffcad8931..1e35f0cc2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_token_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -101,9 +106,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb index 138131410..9db74f5af 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -61,9 +61,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -114,9 +119,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -174,6 +180,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] end_date Value to be assigned + def end_date=(end_date) + if end_date.nil? + fail ArgumentError, 'end_date cannot be nil' + end + + @end_date = end_date + end + + # Custom attribute writer method with validation + # @param [Object] start_date Value to be assigned + def start_date=(start_date) + if start_date.nil? + fail ArgumentError, 'start_date cannot be nil' + end + + @start_date = start_date + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb index b166b9541..b65383f7b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] report Value to be assigned + def report=(report) + if report.nil? + fail ArgumentError, 'report cannot be nil' + end + + @report = report + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/report_response.rb b/sdks/ruby/lib/dropbox-sign/models/report_response.rb index ba3ab992f..0cf3b7604 100644 --- a/sdks/ruby/lib/dropbox-sign/models/report_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/report_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -67,9 +67,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -121,9 +126,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::ReportResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb index 673516638..138175730 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -89,9 +89,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -152,9 +157,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestBulkCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -264,6 +270,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb index 9f6c4491d..1cc28d608 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -89,9 +89,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -152,9 +157,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestBulkSendWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -259,6 +265,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb index bdc9e948c..9ea538769 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -142,9 +142,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -217,9 +222,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestCreateEmbeddedRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestCreateEmbeddedRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -388,6 +394,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb index 42466702b..8fdc7b267 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -98,9 +98,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -163,9 +168,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -294,6 +300,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] signers Value to be assigned + def signers=(signers) + if signers.nil? + fail ArgumentError, 'signers cannot be nil' + end + + @signers = signers + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_request.rb new file mode 100644 index 000000000..eb9ece9ee --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_request.rb @@ -0,0 +1,604 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SignatureRequestEditEmbeddedRequest + # Client id of the app you're using to create this embedded signature request. Used for security purposes. + # @return [String] + attr_accessor :client_id + + # Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :files + + # Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :file_urls + + # Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + # @return [Array] + attr_accessor :signers + + # Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + # @return [Array] + attr_accessor :grouped_signers + + # Allows signers to decline to sign a document if `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :allow_decline + + # Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + # @return [Boolean] + attr_accessor :allow_reassign + + # A list describing the attachments + # @return [Array] + attr_accessor :attachments + + # The email addresses that should be CCed. + # @return [Array] + attr_accessor :cc_email_addresses + + # When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + # @return [Array] + attr_accessor :custom_fields + + # @return [SubFieldOptions] + attr_accessor :field_options + + # Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + # @return [Array] + attr_accessor :form_field_groups + + # Conditional Logic rules for fields defined in `form_fields_per_document`. + # @return [Array] + attr_accessor :form_field_rules + + # The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + # @return [Array] + attr_accessor :form_fields_per_document + + # Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + # @return [Boolean] + attr_accessor :hide_text_tags + + # The custom message in the email that will be sent to the signers. + # @return [String] + attr_accessor :message + + # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # @return [Hash] + attr_accessor :metadata + + # @return [SubSigningOptions] + attr_accessor :signing_options + + # The subject in the email that will be sent to the signers. + # @return [String] + attr_accessor :subject + + # Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :test_mode + + # The title you want to assign to the SignatureRequest. + # @return [String] + attr_accessor :title + + # Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + # @return [Boolean] + attr_accessor :use_text_tags + + # Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + # @return [Boolean] + attr_accessor :populate_auto_fill_fields + + # When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + # @return [Integer, nil] + attr_accessor :expires_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_id' => :'client_id', + :'files' => :'files', + :'file_urls' => :'file_urls', + :'signers' => :'signers', + :'grouped_signers' => :'grouped_signers', + :'allow_decline' => :'allow_decline', + :'allow_reassign' => :'allow_reassign', + :'attachments' => :'attachments', + :'cc_email_addresses' => :'cc_email_addresses', + :'custom_fields' => :'custom_fields', + :'field_options' => :'field_options', + :'form_field_groups' => :'form_field_groups', + :'form_field_rules' => :'form_field_rules', + :'form_fields_per_document' => :'form_fields_per_document', + :'hide_text_tags' => :'hide_text_tags', + :'message' => :'message', + :'metadata' => :'metadata', + :'signing_options' => :'signing_options', + :'subject' => :'subject', + :'test_mode' => :'test_mode', + :'title' => :'title', + :'use_text_tags' => :'use_text_tags', + :'populate_auto_fill_fields' => :'populate_auto_fill_fields', + :'expires_at' => :'expires_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'client_id' => :'String', + :'files' => :'Array', + :'file_urls' => :'Array', + :'signers' => :'Array', + :'grouped_signers' => :'Array', + :'allow_decline' => :'Boolean', + :'allow_reassign' => :'Boolean', + :'attachments' => :'Array', + :'cc_email_addresses' => :'Array', + :'custom_fields' => :'Array', + :'field_options' => :'SubFieldOptions', + :'form_field_groups' => :'Array', + :'form_field_rules' => :'Array', + :'form_fields_per_document' => :'Array', + :'hide_text_tags' => :'Boolean', + :'message' => :'String', + :'metadata' => :'Hash', + :'signing_options' => :'SubSigningOptions', + :'subject' => :'String', + :'test_mode' => :'Boolean', + :'title' => :'String', + :'use_text_tags' => :'Boolean', + :'populate_auto_fill_fields' => :'Boolean', + :'expires_at' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expires_at' + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [SignatureRequestEditEmbeddedRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SignatureRequestEditEmbeddedRequest" + ) || SignatureRequestEditEmbeddedRequest.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SignatureRequestEditEmbeddedRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestEditEmbeddedRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'file_urls') + if (value = attributes[:'file_urls']).is_a?(Array) + self.file_urls = value + end + end + + if attributes.key?(:'signers') + if (value = attributes[:'signers']).is_a?(Array) + self.signers = value + end + end + + if attributes.key?(:'grouped_signers') + if (value = attributes[:'grouped_signers']).is_a?(Array) + self.grouped_signers = value + end + end + + if attributes.key?(:'allow_decline') + self.allow_decline = attributes[:'allow_decline'] + else + self.allow_decline = false + end + + if attributes.key?(:'allow_reassign') + self.allow_reassign = attributes[:'allow_reassign'] + else + self.allow_reassign = false + end + + if attributes.key?(:'attachments') + if (value = attributes[:'attachments']).is_a?(Array) + self.attachments = value + end + end + + if attributes.key?(:'cc_email_addresses') + if (value = attributes[:'cc_email_addresses']).is_a?(Array) + self.cc_email_addresses = value + end + end + + if attributes.key?(:'custom_fields') + if (value = attributes[:'custom_fields']).is_a?(Array) + self.custom_fields = value + end + end + + if attributes.key?(:'field_options') + self.field_options = attributes[:'field_options'] + end + + if attributes.key?(:'form_field_groups') + if (value = attributes[:'form_field_groups']).is_a?(Array) + self.form_field_groups = value + end + end + + if attributes.key?(:'form_field_rules') + if (value = attributes[:'form_field_rules']).is_a?(Array) + self.form_field_rules = value + end + end + + if attributes.key?(:'form_fields_per_document') + if (value = attributes[:'form_fields_per_document']).is_a?(Array) + self.form_fields_per_document = value + end + end + + if attributes.key?(:'hide_text_tags') + self.hide_text_tags = attributes[:'hide_text_tags'] + else + self.hide_text_tags = false + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'signing_options') + self.signing_options = attributes[:'signing_options'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'use_text_tags') + self.use_text_tags = attributes[:'use_text_tags'] + else + self.use_text_tags = false + end + + if attributes.key?(:'populate_auto_fill_fields') + self.populate_auto_fill_fields = attributes[:'populate_auto_fill_fields'] + else + self.populate_auto_fill_fields = false + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @client_id.nil? + invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') + end + + if !@message.nil? && @message.to_s.length > 5000 + invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') + end + + if !@subject.nil? && @subject.to_s.length > 255 + invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') + end + + if !@title.nil? && @title.to_s.length > 255 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @client_id.nil? + return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@subject.nil? && @subject.to_s.length > 255 + return false if !@title.nil? && @title.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.to_s.length > 5000 + fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' + end + + @message = message + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + @metadata = metadata + end + + # Custom attribute writer method with validation + # @param [Object] subject Value to be assigned + def subject=(subject) + if subject.to_s.length > 255 + fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' + end + + @subject = subject + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.to_s.length > 255 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' + end + + @title = title + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + client_id == o.client_id && + files == o.files && + file_urls == o.file_urls && + signers == o.signers && + grouped_signers == o.grouped_signers && + allow_decline == o.allow_decline && + allow_reassign == o.allow_reassign && + attachments == o.attachments && + cc_email_addresses == o.cc_email_addresses && + custom_fields == o.custom_fields && + field_options == o.field_options && + form_field_groups == o.form_field_groups && + form_field_rules == o.form_field_rules && + form_fields_per_document == o.form_fields_per_document && + hide_text_tags == o.hide_text_tags && + message == o.message && + metadata == o.metadata && + signing_options == o.signing_options && + subject == o.subject && + test_mode == o.test_mode && + title == o.title && + use_text_tags == o.use_text_tags && + populate_auto_fill_fields == o.populate_auto_fill_fields && + expires_at == o.expires_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [client_id, files, file_urls, signers, grouped_signers, allow_decline, allow_reassign, attachments, cc_email_addresses, custom_fields, field_options, form_field_groups, form_field_rules, form_fields_per_document, hide_text_tags, message, metadata, signing_options, subject, test_mode, title, use_text_tags, populate_auto_fill_fields, expires_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_with_template_request.rb new file mode 100644 index 000000000..8bc7d63dc --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_embedded_with_template_request.rb @@ -0,0 +1,521 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SignatureRequestEditEmbeddedWithTemplateRequest + # Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + # @return [Array] + attr_accessor :template_ids + + # Client id of the app you're using to create this embedded signature request. Used for security purposes. + # @return [String] + attr_accessor :client_id + + # Add Signers to your Templated-based Signature Request. + # @return [Array] + attr_accessor :signers + + # Allows signers to decline to sign a document if `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :allow_decline + + # Add CC email recipients. Required when a CC role exists for the Template. + # @return [Array] + attr_accessor :ccs + + # An array defining values and options for custom fields. Required when a custom field exists in the Template. + # @return [Array] + attr_accessor :custom_fields + + # Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :files + + # Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :file_urls + + # The custom message in the email that will be sent to the signers. + # @return [String] + attr_accessor :message + + # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # @return [Hash] + attr_accessor :metadata + + # @return [SubSigningOptions] + attr_accessor :signing_options + + # The subject in the email that will be sent to the signers. + # @return [String] + attr_accessor :subject + + # Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :test_mode + + # The title you want to assign to the SignatureRequest. + # @return [String] + attr_accessor :title + + # Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + # @return [Boolean] + attr_accessor :populate_auto_fill_fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'template_ids' => :'template_ids', + :'client_id' => :'client_id', + :'signers' => :'signers', + :'allow_decline' => :'allow_decline', + :'ccs' => :'ccs', + :'custom_fields' => :'custom_fields', + :'files' => :'files', + :'file_urls' => :'file_urls', + :'message' => :'message', + :'metadata' => :'metadata', + :'signing_options' => :'signing_options', + :'subject' => :'subject', + :'test_mode' => :'test_mode', + :'title' => :'title', + :'populate_auto_fill_fields' => :'populate_auto_fill_fields' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'template_ids' => :'Array', + :'client_id' => :'String', + :'signers' => :'Array', + :'allow_decline' => :'Boolean', + :'ccs' => :'Array', + :'custom_fields' => :'Array', + :'files' => :'Array', + :'file_urls' => :'Array', + :'message' => :'String', + :'metadata' => :'Hash', + :'signing_options' => :'SubSigningOptions', + :'subject' => :'String', + :'test_mode' => :'Boolean', + :'title' => :'String', + :'populate_auto_fill_fields' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [SignatureRequestEditEmbeddedWithTemplateRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ) || SignatureRequestEditEmbeddedWithTemplateRequest.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestEditEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'template_ids') + if (value = attributes[:'template_ids']).is_a?(Array) + self.template_ids = value + end + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'signers') + if (value = attributes[:'signers']).is_a?(Array) + self.signers = value + end + end + + if attributes.key?(:'allow_decline') + self.allow_decline = attributes[:'allow_decline'] + else + self.allow_decline = false + end + + if attributes.key?(:'ccs') + if (value = attributes[:'ccs']).is_a?(Array) + self.ccs = value + end + end + + if attributes.key?(:'custom_fields') + if (value = attributes[:'custom_fields']).is_a?(Array) + self.custom_fields = value + end + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'file_urls') + if (value = attributes[:'file_urls']).is_a?(Array) + self.file_urls = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'signing_options') + self.signing_options = attributes[:'signing_options'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'populate_auto_fill_fields') + self.populate_auto_fill_fields = attributes[:'populate_auto_fill_fields'] + else + self.populate_auto_fill_fields = false + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @template_ids.nil? + invalid_properties.push('invalid value for "template_ids", template_ids cannot be nil.') + end + + if @client_id.nil? + invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') + end + + if @signers.nil? + invalid_properties.push('invalid value for "signers", signers cannot be nil.') + end + + if !@message.nil? && @message.to_s.length > 5000 + invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') + end + + if !@subject.nil? && @subject.to_s.length > 255 + invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') + end + + if !@title.nil? && @title.to_s.length > 255 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @template_ids.nil? + return false if @client_id.nil? + return false if @signers.nil? + return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@subject.nil? && @subject.to_s.length > 255 + return false if !@title.nil? && @title.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] signers Value to be assigned + def signers=(signers) + if signers.nil? + fail ArgumentError, 'signers cannot be nil' + end + + @signers = signers + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.to_s.length > 5000 + fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' + end + + @message = message + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + @metadata = metadata + end + + # Custom attribute writer method with validation + # @param [Object] subject Value to be assigned + def subject=(subject) + if subject.to_s.length > 255 + fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' + end + + @subject = subject + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.to_s.length > 255 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' + end + + @title = title + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + template_ids == o.template_ids && + client_id == o.client_id && + signers == o.signers && + allow_decline == o.allow_decline && + ccs == o.ccs && + custom_fields == o.custom_fields && + files == o.files && + file_urls == o.file_urls && + message == o.message && + metadata == o.metadata && + signing_options == o.signing_options && + subject == o.subject && + test_mode == o.test_mode && + title == o.title && + populate_auto_fill_fields == o.populate_auto_fill_fields + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [template_ids, client_id, signers, allow_decline, ccs, custom_fields, files, file_urls, message, metadata, signing_options, subject, test_mode, title, populate_auto_fill_fields].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_request.rb new file mode 100644 index 000000000..299dc7033 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_request.rb @@ -0,0 +1,600 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SignatureRequestEditRequest + # Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :files + + # Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :file_urls + + # Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + # @return [Array] + attr_accessor :signers + + # Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + # @return [Array] + attr_accessor :grouped_signers + + # Allows signers to decline to sign a document if `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :allow_decline + + # Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + # @return [Boolean] + attr_accessor :allow_reassign + + # A list describing the attachments + # @return [Array] + attr_accessor :attachments + + # The email addresses that should be CCed. + # @return [Array] + attr_accessor :cc_email_addresses + + # The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + # @return [String] + attr_accessor :client_id + + # When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + # @return [Array] + attr_accessor :custom_fields + + # @return [SubFieldOptions] + attr_accessor :field_options + + # Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + # @return [Array] + attr_accessor :form_field_groups + + # Conditional Logic rules for fields defined in `form_fields_per_document`. + # @return [Array] + attr_accessor :form_field_rules + + # The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + # @return [Array] + attr_accessor :form_fields_per_document + + # Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + # @return [Boolean] + attr_accessor :hide_text_tags + + # Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + # @return [Boolean] + attr_accessor :is_eid + + # The custom message in the email that will be sent to the signers. + # @return [String] + attr_accessor :message + + # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # @return [Hash] + attr_accessor :metadata + + # @return [SubSigningOptions] + attr_accessor :signing_options + + # The URL you want signers redirected to after they successfully sign. + # @return [String] + attr_accessor :signing_redirect_url + + # The subject in the email that will be sent to the signers. + # @return [String] + attr_accessor :subject + + # Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :test_mode + + # The title you want to assign to the SignatureRequest. + # @return [String] + attr_accessor :title + + # Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + # @return [Boolean] + attr_accessor :use_text_tags + + # When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + # @return [Integer, nil] + attr_accessor :expires_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'files' => :'files', + :'file_urls' => :'file_urls', + :'signers' => :'signers', + :'grouped_signers' => :'grouped_signers', + :'allow_decline' => :'allow_decline', + :'allow_reassign' => :'allow_reassign', + :'attachments' => :'attachments', + :'cc_email_addresses' => :'cc_email_addresses', + :'client_id' => :'client_id', + :'custom_fields' => :'custom_fields', + :'field_options' => :'field_options', + :'form_field_groups' => :'form_field_groups', + :'form_field_rules' => :'form_field_rules', + :'form_fields_per_document' => :'form_fields_per_document', + :'hide_text_tags' => :'hide_text_tags', + :'is_eid' => :'is_eid', + :'message' => :'message', + :'metadata' => :'metadata', + :'signing_options' => :'signing_options', + :'signing_redirect_url' => :'signing_redirect_url', + :'subject' => :'subject', + :'test_mode' => :'test_mode', + :'title' => :'title', + :'use_text_tags' => :'use_text_tags', + :'expires_at' => :'expires_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'files' => :'Array', + :'file_urls' => :'Array', + :'signers' => :'Array', + :'grouped_signers' => :'Array', + :'allow_decline' => :'Boolean', + :'allow_reassign' => :'Boolean', + :'attachments' => :'Array', + :'cc_email_addresses' => :'Array', + :'client_id' => :'String', + :'custom_fields' => :'Array', + :'field_options' => :'SubFieldOptions', + :'form_field_groups' => :'Array', + :'form_field_rules' => :'Array', + :'form_fields_per_document' => :'Array', + :'hide_text_tags' => :'Boolean', + :'is_eid' => :'Boolean', + :'message' => :'String', + :'metadata' => :'Hash', + :'signing_options' => :'SubSigningOptions', + :'signing_redirect_url' => :'String', + :'subject' => :'String', + :'test_mode' => :'Boolean', + :'title' => :'String', + :'use_text_tags' => :'Boolean', + :'expires_at' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expires_at' + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [SignatureRequestEditRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SignatureRequestEditRequest" + ) || SignatureRequestEditRequest.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SignatureRequestEditRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestEditRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'file_urls') + if (value = attributes[:'file_urls']).is_a?(Array) + self.file_urls = value + end + end + + if attributes.key?(:'signers') + if (value = attributes[:'signers']).is_a?(Array) + self.signers = value + end + end + + if attributes.key?(:'grouped_signers') + if (value = attributes[:'grouped_signers']).is_a?(Array) + self.grouped_signers = value + end + end + + if attributes.key?(:'allow_decline') + self.allow_decline = attributes[:'allow_decline'] + else + self.allow_decline = false + end + + if attributes.key?(:'allow_reassign') + self.allow_reassign = attributes[:'allow_reassign'] + else + self.allow_reassign = false + end + + if attributes.key?(:'attachments') + if (value = attributes[:'attachments']).is_a?(Array) + self.attachments = value + end + end + + if attributes.key?(:'cc_email_addresses') + if (value = attributes[:'cc_email_addresses']).is_a?(Array) + self.cc_email_addresses = value + end + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'custom_fields') + if (value = attributes[:'custom_fields']).is_a?(Array) + self.custom_fields = value + end + end + + if attributes.key?(:'field_options') + self.field_options = attributes[:'field_options'] + end + + if attributes.key?(:'form_field_groups') + if (value = attributes[:'form_field_groups']).is_a?(Array) + self.form_field_groups = value + end + end + + if attributes.key?(:'form_field_rules') + if (value = attributes[:'form_field_rules']).is_a?(Array) + self.form_field_rules = value + end + end + + if attributes.key?(:'form_fields_per_document') + if (value = attributes[:'form_fields_per_document']).is_a?(Array) + self.form_fields_per_document = value + end + end + + if attributes.key?(:'hide_text_tags') + self.hide_text_tags = attributes[:'hide_text_tags'] + else + self.hide_text_tags = false + end + + if attributes.key?(:'is_eid') + self.is_eid = attributes[:'is_eid'] + else + self.is_eid = false + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'signing_options') + self.signing_options = attributes[:'signing_options'] + end + + if attributes.key?(:'signing_redirect_url') + self.signing_redirect_url = attributes[:'signing_redirect_url'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'use_text_tags') + self.use_text_tags = attributes[:'use_text_tags'] + else + self.use_text_tags = false + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@message.nil? && @message.to_s.length > 5000 + invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') + end + + if !@subject.nil? && @subject.to_s.length > 255 + invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') + end + + if !@title.nil? && @title.to_s.length > 255 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@subject.nil? && @subject.to_s.length > 255 + return false if !@title.nil? && @title.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.to_s.length > 5000 + fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' + end + + @message = message + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + @metadata = metadata + end + + # Custom attribute writer method with validation + # @param [Object] subject Value to be assigned + def subject=(subject) + if subject.to_s.length > 255 + fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' + end + + @subject = subject + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.to_s.length > 255 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' + end + + @title = title + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + files == o.files && + file_urls == o.file_urls && + signers == o.signers && + grouped_signers == o.grouped_signers && + allow_decline == o.allow_decline && + allow_reassign == o.allow_reassign && + attachments == o.attachments && + cc_email_addresses == o.cc_email_addresses && + client_id == o.client_id && + custom_fields == o.custom_fields && + field_options == o.field_options && + form_field_groups == o.form_field_groups && + form_field_rules == o.form_field_rules && + form_fields_per_document == o.form_fields_per_document && + hide_text_tags == o.hide_text_tags && + is_eid == o.is_eid && + message == o.message && + metadata == o.metadata && + signing_options == o.signing_options && + signing_redirect_url == o.signing_redirect_url && + subject == o.subject && + test_mode == o.test_mode && + title == o.title && + use_text_tags == o.use_text_tags && + expires_at == o.expires_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [files, file_urls, signers, grouped_signers, allow_decline, allow_reassign, attachments, cc_email_addresses, client_id, custom_fields, field_options, form_field_groups, form_field_rules, form_fields_per_document, hide_text_tags, is_eid, message, metadata, signing_options, signing_redirect_url, subject, test_mode, title, use_text_tags, expires_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_with_template_request.rb new file mode 100644 index 000000000..ea8f2a943 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_edit_with_template_request.rb @@ -0,0 +1,518 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # + class SignatureRequestEditWithTemplateRequest + # Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. + # @return [Array] + attr_accessor :template_ids + + # Add Signers to your Templated-based Signature Request. + # @return [Array] + attr_accessor :signers + + # Allows signers to decline to sign a document if `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :allow_decline + + # Add CC email recipients. Required when a CC role exists for the Template. + # @return [Array] + attr_accessor :ccs + + # Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + # @return [String] + attr_accessor :client_id + + # An array defining values and options for custom fields. Required when a custom field exists in the Template. + # @return [Array] + attr_accessor :custom_fields + + # Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :files + + # Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + # @return [Array] + attr_accessor :file_urls + + # Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + # @return [Boolean] + attr_accessor :is_eid + + # The custom message in the email that will be sent to the signers. + # @return [String] + attr_accessor :message + + # Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + # @return [Hash] + attr_accessor :metadata + + # @return [SubSigningOptions] + attr_accessor :signing_options + + # The URL you want signers redirected to after they successfully sign. + # @return [String] + attr_accessor :signing_redirect_url + + # The subject in the email that will be sent to the signers. + # @return [String] + attr_accessor :subject + + # Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + # @return [Boolean] + attr_accessor :test_mode + + # The title you want to assign to the SignatureRequest. + # @return [String] + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'template_ids' => :'template_ids', + :'signers' => :'signers', + :'allow_decline' => :'allow_decline', + :'ccs' => :'ccs', + :'client_id' => :'client_id', + :'custom_fields' => :'custom_fields', + :'files' => :'files', + :'file_urls' => :'file_urls', + :'is_eid' => :'is_eid', + :'message' => :'message', + :'metadata' => :'metadata', + :'signing_options' => :'signing_options', + :'signing_redirect_url' => :'signing_redirect_url', + :'subject' => :'subject', + :'test_mode' => :'test_mode', + :'title' => :'title' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'template_ids' => :'Array', + :'signers' => :'Array', + :'allow_decline' => :'Boolean', + :'ccs' => :'Array', + :'client_id' => :'String', + :'custom_fields' => :'Array', + :'files' => :'Array', + :'file_urls' => :'Array', + :'is_eid' => :'Boolean', + :'message' => :'String', + :'metadata' => :'Hash', + :'signing_options' => :'SubSigningOptions', + :'signing_redirect_url' => :'String', + :'subject' => :'String', + :'test_mode' => :'Boolean', + :'title' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [SignatureRequestEditWithTemplateRequest] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SignatureRequestEditWithTemplateRequest" + ) || SignatureRequestEditWithTemplateRequest.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SignatureRequestEditWithTemplateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestEditWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'template_ids') + if (value = attributes[:'template_ids']).is_a?(Array) + self.template_ids = value + end + end + + if attributes.key?(:'signers') + if (value = attributes[:'signers']).is_a?(Array) + self.signers = value + end + end + + if attributes.key?(:'allow_decline') + self.allow_decline = attributes[:'allow_decline'] + else + self.allow_decline = false + end + + if attributes.key?(:'ccs') + if (value = attributes[:'ccs']).is_a?(Array) + self.ccs = value + end + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'custom_fields') + if (value = attributes[:'custom_fields']).is_a?(Array) + self.custom_fields = value + end + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'file_urls') + if (value = attributes[:'file_urls']).is_a?(Array) + self.file_urls = value + end + end + + if attributes.key?(:'is_eid') + self.is_eid = attributes[:'is_eid'] + else + self.is_eid = false + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Hash) + self.metadata = value + end + end + + if attributes.key?(:'signing_options') + self.signing_options = attributes[:'signing_options'] + end + + if attributes.key?(:'signing_redirect_url') + self.signing_redirect_url = attributes[:'signing_redirect_url'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'test_mode') + self.test_mode = attributes[:'test_mode'] + else + self.test_mode = false + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @template_ids.nil? + invalid_properties.push('invalid value for "template_ids", template_ids cannot be nil.') + end + + if @signers.nil? + invalid_properties.push('invalid value for "signers", signers cannot be nil.') + end + + if !@message.nil? && @message.to_s.length > 5000 + invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 5000.') + end + + if !@subject.nil? && @subject.to_s.length > 255 + invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 255.') + end + + if !@title.nil? && @title.to_s.length > 255 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @template_ids.nil? + return false if @signers.nil? + return false if !@message.nil? && @message.to_s.length > 5000 + return false if !@subject.nil? && @subject.to_s.length > 255 + return false if !@title.nil? && @title.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + + # Custom attribute writer method with validation + # @param [Object] signers Value to be assigned + def signers=(signers) + if signers.nil? + fail ArgumentError, 'signers cannot be nil' + end + + @signers = signers + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.to_s.length > 5000 + fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 5000.' + end + + @message = message + end + + # Custom attribute writer method with validation + # @param [Object] metadata Value to be assigned + def metadata=(metadata) + @metadata = metadata + end + + # Custom attribute writer method with validation + # @param [Object] subject Value to be assigned + def subject=(subject) + if subject.to_s.length > 255 + fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 255.' + end + + @subject = subject + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.to_s.length > 255 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 255.' + end + + @title = title + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + template_ids == o.template_ids && + signers == o.signers && + allow_decline == o.allow_decline && + ccs == o.ccs && + client_id == o.client_id && + custom_fields == o.custom_fields && + files == o.files && + file_urls == o.file_urls && + is_eid == o.is_eid && + message == o.message && + metadata == o.metadata && + signing_options == o.signing_options && + signing_redirect_url == o.signing_redirect_url && + subject == o.subject && + test_mode == o.test_mode && + title == o.title + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [template_ids, signers, allow_decline, ccs, client_id, custom_fields, files, file_urls, is_eid, message, metadata, signing_options, signing_redirect_url, subject, test_mode, title].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb index 04ca8fefd..f3195ac50 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] signature_request Value to be assigned + def signature_request=(signature_request) + if signature_request.nil? + fail ArgumentError, 'signature_request cannot be nil' + end + + @signature_request = signature_request + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb index 187e12b21..48897f6ca 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -38,9 +38,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -91,9 +96,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +144,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] signature_requests Value to be assigned + def signature_requests=(signature_requests) + if signature_requests.nil? + fail ArgumentError, 'signature_requests cannot be nil' + end + + @signature_requests = signature_requests + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb index 677d4103d..5ba02f4e0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_remind_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestRemindRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestRemindRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -120,6 +126,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb index 3981f79fe..e8bd41887 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -150,9 +150,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -237,9 +242,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb index 9629909bf..7fb408b25 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_attachment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -55,9 +55,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -113,9 +118,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseAttachment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseAttachment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -178,6 +184,46 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] signer Value to be assigned + def signer=(signer) + if signer.nil? + fail ArgumentError, 'signer cannot be nil' + end + + @signer = signer + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] required Value to be assigned + def required=(required) + if required.nil? + fail ArgumentError, 'required cannot be nil' + end + + @required = required + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb index 584028574..bbf68fb59 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -50,9 +50,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -114,9 +119,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -165,6 +171,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb index 531891f90..c29f4bb15 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -126,6 +132,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb index 9899bd0de..5af516683 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseCustomFieldText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -126,6 +132,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb index 63f61f1aa..1175c8ade 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_custom_field_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb index 08d0a18a9..929022017 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -49,9 +49,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -133,9 +138,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb index 74f03f229..36f46f60a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb index ccc30ca38..620a25b84 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb index df3714a7b..8c51b79fc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_checkbox_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueCheckboxMerge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueCheckboxMerge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb index 35b572203..27eb89df1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueDateSigned`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueDateSigned`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb index 56d6149a6..a8c8890fd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueDropdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueDropdown`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb index e5c4df0d4..b3828e4c4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueInitials`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueInitials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb index 87aa469bb..da06fdd08 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueRadio`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueRadio`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb index ecbc9b588..1d24ea005 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueSignature`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb index 86fda70ba..60ea7d9ed 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb index fe39d6414..e78f7d275 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_data_value_text_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueTextMerge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseDataValueTextMerge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb index 1e2992772..99602a22f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_response_signatures.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -120,9 +120,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -204,9 +209,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseSignatures`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestResponseSignatures`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb index c11fb51f9..1bfe729ab 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -152,9 +152,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -229,9 +234,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestSendRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestSendRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb index b626cee1c..ac2647256 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_send_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -109,9 +109,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -176,9 +181,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestSendWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestSendWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -312,6 +318,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + + # Custom attribute writer method with validation + # @param [Object] signers Value to be assigned + def signers=(signers) + if signers.nil? + fail ArgumentError, 'signers cannot be nil' + end + + @signers = signers + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb index 1b65aa5b0..d43b67520 100644 --- a/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/signature_request_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -99,9 +104,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SignatureRequestUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -141,6 +147,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] signature_id Value to be assigned + def signature_id=(signature_id) + if signature_id.nil? + fail ArgumentError, 'signature_id cannot be nil' + end + + @signature_id = signature_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb b/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb index dfc7a33dd..cf6c3d5fe 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_attachment.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -98,9 +103,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubAttachment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubAttachment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -147,6 +153,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] signer_index Value to be assigned + def signer_index=(signer_index) + if signer_index.nil? + fail ArgumentError, 'signer_index cannot be nil' + end + + @signer_index = signer_index + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb index ecc48bd16..80085f38d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubBulkSignerList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubBulkSignerList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb index e9f81d3dd..627232bbd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_bulk_signer_list_custom_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubBulkSignerListCustomField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubBulkSignerListCustomField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -125,6 +131,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] value Value to be assigned + def value=(value) + if value.nil? + fail ArgumentError, 'value cannot be nil' + end + + @value = value + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb b/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb index 713662338..5d2222754 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_cc.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubCC`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubCC`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -125,6 +131,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] role Value to be assigned + def role=(role) + if role.nil? + fail ArgumentError, 'role cannot be nil' + end + + @role = role + end + + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb index f5ad1f6b4..81ef208a5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_custom_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -99,9 +104,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubCustomField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubCustomField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -143,6 +149,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb index 182a9219f..eb4d6b8c4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_editor_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubEditorOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubEditorOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb index 993ced34b..a46e325f7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_field_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -52,9 +52,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -103,9 +108,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFieldOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFieldOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb index 0917901cd..f927fa003 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_group.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldGroup`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -140,6 +146,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] group_id Value to be assigned + def group_id=(group_id) + if group_id.nil? + fail ArgumentError, 'group_id cannot be nil' + end + + @group_id = group_id + end + + # Custom attribute writer method with validation + # @param [Object] group_label Value to be assigned + def group_label=(group_label) + if group_label.nil? + fail ArgumentError, 'group_label cannot be nil' + end + + @group_label = group_label + end + + # Custom attribute writer method with validation + # @param [Object] requirement Value to be assigned + def requirement=(requirement) + if requirement.nil? + fail ArgumentError, 'requirement cannot be nil' + end + + @requirement = requirement + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb index 6eb04a2bf..30537351a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -98,9 +103,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRule`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -176,6 +182,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] trigger_operator Value to be assigned + def trigger_operator=(trigger_operator) + if trigger_operator.nil? + fail ArgumentError, 'trigger_operator cannot be nil' + end + + @trigger_operator = trigger_operator + end + # Custom attribute writer method with validation # @param [Object] triggers Value to be assigned def triggers=(triggers) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb index 8b524a15b..ba51d113c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_action.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -65,9 +65,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -119,9 +124,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRuleAction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRuleAction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -168,6 +174,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] hidden Value to be assigned + def hidden=(hidden) + if hidden.nil? + fail ArgumentError, 'hidden cannot be nil' + end + + @hidden = hidden + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb index 9ef68ce1c..26180cab0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_field_rule_trigger.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -66,9 +66,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -120,9 +125,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRuleTrigger`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldRuleTrigger`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -171,6 +177,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] operator Object to be assigned def operator=(operator) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb index e42972780..ee41c08a0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -79,9 +79,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -173,9 +178,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -283,6 +289,96 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] document_index Value to be assigned + def document_index=(document_index) + if document_index.nil? + fail ArgumentError, 'document_index cannot be nil' + end + + @document_index = document_index + end + + # Custom attribute writer method with validation + # @param [Object] api_id Value to be assigned + def api_id=(api_id) + if api_id.nil? + fail ArgumentError, 'api_id cannot be nil' + end + + @api_id = api_id + end + + # Custom attribute writer method with validation + # @param [Object] height Value to be assigned + def height=(height) + if height.nil? + fail ArgumentError, 'height cannot be nil' + end + + @height = height + end + + # Custom attribute writer method with validation + # @param [Object] required Value to be assigned + def required=(required) + if required.nil? + fail ArgumentError, 'required cannot be nil' + end + + @required = required + end + + # Custom attribute writer method with validation + # @param [Object] signer Value to be assigned + def signer=(signer) + if signer.nil? + fail ArgumentError, 'signer cannot be nil' + end + + @signer = signer + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] width Value to be assigned + def width=(width) + if width.nil? + fail ArgumentError, 'width cannot be nil' + end + + @width = width + end + + # Custom attribute writer method with validation + # @param [Object] x Value to be assigned + def x=(x) + if x.nil? + fail ArgumentError, 'x cannot be nil' + end + + @x = x + end + + # Custom attribute writer method with validation + # @param [Object] y Value to be assigned + def y=(y) + if y.nil? + fail ArgumentError, 'y cannot be nil' + end + + @y = y + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb index 74968edca..d93171a74 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -40,9 +40,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -141,6 +147,26 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] is_checked Value to be assigned + def is_checked=(is_checked) + if is_checked.nil? + fail ArgumentError, 'is_checked cannot be nil' + end + + @is_checked = is_checked + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb index 0c8dc9260..53f934b69 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_checkbox_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentCheckboxMerge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentCheckboxMerge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb index 85e37c728..b6f9c3f22 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -62,9 +62,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -115,9 +120,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentDateSigned`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentDateSigned`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -162,6 +168,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] font_family Object to be assigned def font_family=(font_family) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb index 51d82449b..159d43170 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -72,9 +72,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -127,9 +132,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentDropdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentDropdown`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -194,6 +200,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Custom attribute writer method with validation # @param [Object] options Value to be assigned def options=(options) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb index 77ba1ddcd..8e689b5a2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_font_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb index 0cb2bf499..7a733dae2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -72,9 +72,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -127,9 +132,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentHyperlink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentHyperlink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -192,6 +198,36 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] content Value to be assigned + def content=(content) + if content.nil? + fail ArgumentError, 'content cannot be nil' + end + + @content = content + end + + # Custom attribute writer method with validation + # @param [Object] content_url Value to be assigned + def content_url=(content_url) + if content_url.nil? + fail ArgumentError, 'content_url cannot be nil' + end + + @content_url = content_url + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] font_family Object to be assigned def font_family=(font_family) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb index 043339067..fa5af10c0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentInitials`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentInitials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb index 5436051f5..428646734 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -40,9 +40,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentRadio`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentRadio`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -146,6 +152,36 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] group Value to be assigned + def group=(group) + if group.nil? + fail ArgumentError, 'group cannot be nil' + end + + @group = group + end + + # Custom attribute writer method with validation + # @param [Object] is_checked Value to be assigned + def is_checked=(is_checked) + if is_checked.nil? + fail ArgumentError, 'is_checked cannot be nil' + end + + @is_checked = is_checked + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb index a8a737b3a..1ac7c6750 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentSignature`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb index 35fc716db..167b7f0b5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -100,9 +100,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -161,9 +166,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -242,6 +248,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] validation_type Object to be assigned def validation_type=(validation_type) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb index 2f62a81d5..edab85f0c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -62,9 +62,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -115,9 +120,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentTextMerge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubFormFieldsPerDocumentTextMerge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -162,6 +168,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] font_family Object to be assigned def font_family=(font_family) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb index bc0fd0029..b1a119fab 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_form_fields_per_document_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb index 08f4041cb..b894cf9e8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_merge_field.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -56,9 +56,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -108,9 +113,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubMergeField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubMergeField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -149,6 +155,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb b/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb index 229728206..ca6b55bf2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_o_auth.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -57,9 +57,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -109,9 +114,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubOAuth`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubOAuth`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_options.rb index 6c4c07b9e..a2f2df245 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb index 70cf632b4..23615d577 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_grouped_signers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestGroupedSigners`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestGroupedSigners`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +144,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] group Value to be assigned + def group=(group) + if group.nil? + fail ArgumentError, 'group cannot be nil' + end + + @group = group + end + + # Custom attribute writer method with validation + # @param [Object] signers Value to be assigned + def signers=(signers) + if signers.nil? + fail ArgumentError, 'signers cannot be nil' + end + + @signers = signers + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb index 8fe9ddb3f..2a4eaed72 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -76,9 +76,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -133,9 +138,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestSigner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestSigner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -200,6 +206,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb index f30ec3410..eb52b71ba 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signature_request_template_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -76,9 +76,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -132,9 +137,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestTemplateSigner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSignatureRequestTemplateSigner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -204,6 +210,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] role Value to be assigned + def role=(role) + if role.nil? + fail ArgumentError, 'role cannot be nil' + end + + @role = role + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Custom attribute writer method with validation # @param [Object] pin Value to be assigned def pin=(pin) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb index 0ccca5bb6..26a6406f7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_signing_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -72,9 +72,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -127,9 +132,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSigningOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubSigningOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb b/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb index 9b4d9d1ce..7ee4be8fc 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_team_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubTeamResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubTeamResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb b/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb index f0943c096..ff16168ac 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_template_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubTemplateRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubTemplateRole`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb index 653a0fd8f..f77ddb142 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -93,9 +98,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubUnclaimedDraftSigner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubUnclaimedDraftSigner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -136,6 +142,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb index 449e2ec60..61fe5d8c5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_unclaimed_draft_template_signer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubUnclaimedDraftTemplateSigner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubUnclaimedDraftTemplateSigner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -140,6 +146,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] role Value to be assigned + def role=(role) + if role.nil? + fail ArgumentError, 'role cannot be nil' + end + + @role = role + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] email_address Value to be assigned + def email_address=(email_address) + if email_address.nil? + fail ArgumentError, 'email_address cannot be nil' + end + + @email_address = email_address + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb b/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb index d6c25e221..0878b3d71 100644 --- a/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb +++ b/sdks/ruby/lib/dropbox-sign/models/sub_white_labeling_options.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -108,9 +108,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -173,9 +178,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubWhiteLabelingOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubWhiteLabelingOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb index 875847565..57dde8ec9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_add_member_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -61,9 +61,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -114,9 +119,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamAddMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamAddMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb index 9d68d4948..3c1e69f5b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb index e7bc851b1..6dda33ae5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_get_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamGetInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamGetInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] team Value to be assigned + def team=(team) + if team.nil? + fail ArgumentError, 'team cannot be nil' + end + + @team = team + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb index ed276ee7a..50c0ac70e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] team Value to be assigned + def team=(team) + if team.nil? + fail ArgumentError, 'team cannot be nil' + end + + @team = team + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb index 9c7ca0215..5231ddfe8 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_info_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -48,9 +48,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -104,9 +109,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb index 9da55fa55..9cb01aa88 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_invite_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -54,9 +54,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -110,9 +115,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInviteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInviteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb index 7b061bb5e..44b5e95e1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_invites_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInvitesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamInvitesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -123,6 +129,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] team_invites Value to be assigned + def team_invites=(team_invites) + if team_invites.nil? + fail ArgumentError, 'team_invites cannot be nil' + end + + @team_invites = team_invites + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb index 8e58d7f18..91e1c742d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_member_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamMemberResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamMemberResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb index 0fb211d24..924745091 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_members_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -37,9 +37,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -90,9 +95,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamMembersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamMembersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -137,6 +143,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] team_members Value to be assigned + def team_members=(team_members) + if team_members.nil? + fail ArgumentError, 'team_members cannot be nil' + end + + @team_members = team_members + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb index 7f0d8aee6..48cf5f159 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_parent_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamParentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamParentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb index d910378a8..0b725e483 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_remove_member_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -71,9 +71,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -126,9 +131,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamRemoveMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamRemoveMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_response.rb index b3362473c..c239735dd 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -44,9 +44,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -98,9 +103,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb b/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb index 904da2358..5f5a612ac 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_sub_teams_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -37,9 +37,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -90,9 +95,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamSubTeamsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamSubTeamsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -137,6 +143,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] sub_teams Value to be assigned + def sub_teams=(sub_teams) + if sub_teams.nil? + fail ArgumentError, 'sub_teams cannot be nil' + end + + @sub_teams = sub_teams + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb index 7b952aa32..030ebd056 100644 --- a/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/team_update_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TeamUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb index 23999d5d4..bb392182f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_add_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -39,9 +39,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -92,9 +97,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateAddUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateAddUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb index aa9e07e23..4b006bdac 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -147,9 +147,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -222,9 +227,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -396,6 +402,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb index 788699303..540a70012 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template Value to be assigned + def template=(template) + if template.nil? + fail ArgumentError, 'template cannot be nil' + end + + @template = template + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb index a8eeafb20..354ad0df0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_embedded_draft_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -99,9 +104,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateEmbeddedDraftResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb index e94e6088d..2376b7867 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -113,9 +113,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -181,9 +186,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -320,6 +326,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] form_fields_per_document Value to be assigned + def form_fields_per_document=(form_fields_per_document) + if form_fields_per_document.nil? + fail ArgumentError, 'form_fields_per_document cannot be nil' + end + + @form_fields_per_document = form_fields_per_document + end + + # Custom attribute writer method with validation + # @param [Object] signer_roles Value to be assigned + def signer_roles=(signer_roles) + if signer_roles.nil? + fail ArgumentError, 'signer_roles cannot be nil' + end + + @signer_roles = signer_roles + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb index dd084e00b..5ca1bcb85 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template Value to be assigned + def template=(template) + if template.nil? + fail ArgumentError, 'template cannot be nil' + end + + @template = template + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb index 91e0dc57f..1ffeb1092 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_create_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateCreateResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb index b2f589e21..9a4996745 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_edit_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateEditResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateEditResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -110,6 +116,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template_id Value to be assigned + def template_id=(template_id) + if template_id.nil? + fail ArgumentError, 'template_id cannot be nil' + end + + @template_id = template_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb index 3ff1bcd58..dcbc14b67 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_get_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template Value to be assigned + def template=(template) + if template.nil? + fail ArgumentError, 'template cannot be nil' + end + + @template = template + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb index 9b7025c01..aea5a64df 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_list_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -38,9 +38,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -91,9 +96,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -138,6 +144,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] templates Value to be assigned + def templates=(templates) + if templates.nil? + fail ArgumentError, 'templates cannot be nil' + end + + @templates = templates + end + + # Custom attribute writer method with validation + # @param [Object] list_info Value to be assigned + def list_info=(list_info) + if list_info.nil? + fail ArgumentError, 'list_info cannot be nil' + end + + @list_info = list_info + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb index 88a35a56b..3a93e2739 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_remove_user_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateRemoveUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateRemoveUserRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_response.rb index 1d59bdf57..fdf944631 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -105,9 +105,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -174,9 +179,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb index c40120392..9bdf49e69 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_account.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -53,9 +53,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -109,9 +114,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb index 4e46afa40..d8631da5c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_account_quota.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -45,9 +45,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -99,9 +104,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseAccountQuota`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseAccountQuota`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb index 7b73e8d36..a5cf632bf 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_cc_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -29,9 +29,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -80,9 +85,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseCCRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseCCRole`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb index 49eaf4fc6..2c0f02d5f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -54,9 +54,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -110,9 +115,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocument`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb index a80739b91..6ad8697d5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -74,9 +74,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -144,9 +149,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -210,6 +216,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb index 7379fc4f8..0f4f3402b 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb index 653b131ae..7799d711e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_custom_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -49,9 +49,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -104,9 +109,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomFieldText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -155,6 +161,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb index ce2389e3a..c879c28f0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFieldGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFieldGroup`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb index 5b0d3ec6d..e80370faa 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_field_group_rule.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFieldGroupRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFieldGroupRule`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb index bc91770be..4676fd1e0 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -69,9 +69,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -154,9 +159,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -216,6 +222,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb index a4c759c12..628758f5f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -88,9 +93,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +133,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb index f20f04c4f..268700045 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -88,9 +93,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldDateSigned`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldDateSigned`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +133,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb index c6ad1b3dd..3d6e664e9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -88,9 +93,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldDropdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldDropdown`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +133,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb index f2f8631ac..579494f1a 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -54,9 +54,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -111,9 +116,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldHyperlink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldHyperlink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -166,6 +172,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb index 3ff48a726..961155290 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -88,9 +93,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldInitials`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldInitials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +133,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb index 6af0b07d8..6e99534d7 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldRadio`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldRadio`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -131,6 +137,26 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] group Value to be assigned + def group=(group) + if group.nil? + fail ArgumentError, 'group cannot be nil' + end + + @group = group + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb index c48d15719..dcfed475e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -88,9 +93,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldSignature`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -127,6 +133,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb index 51ed8bcd8..7028169e3 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_form_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -81,9 +81,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -140,9 +145,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentFormFieldText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -201,6 +207,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] validation_type Object to be assigned def validation_type=(validation_type) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb index a2d962291..89606c7b9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_base.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -74,9 +74,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -161,9 +166,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -229,6 +235,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb index 741e8b71e..e27917fb4 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldCheckbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb index 9c02d010d..574e05234 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldDateSigned`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldDateSigned`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb index e1fb958cb..7c14f58b5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldDropdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldDropdown`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb index 9e82dc9f4..ccb172773 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldHyperlink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldHyperlink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb index 77be2c33a..47d8b723e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_initials.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldInitials`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldInitials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb index 501ad891a..b8299053e 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_radio.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldRadio`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldRadio`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb index c3ff4ac65..91c019255 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_signature.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldSignature`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb index 0cf46c5f6..37612d617 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_document_static_field_text.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -30,9 +30,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about, including the ones defined in its parent(s) + def self.acceptable_attribute_map + superclass.acceptable_attribute_map.merge(attribute_map) + end + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values.concat(superclass.acceptable_attributes) + acceptable_attribute_map.values end # Attribute type mapping. @@ -81,9 +86,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldText`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentStaticFieldText`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -116,6 +122,16 @@ def valid? true && super end + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb index a85e2c339..aceaff422 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_field_avg_text_length.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseFieldAvgTextLength`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseFieldAvgTextLength`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb b/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb index 286607280..a2263db31 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_response_signer_role.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -34,9 +34,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -86,9 +91,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseSignerRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseSignerRole`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb index 1e26f244f..e9d56101c 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -54,9 +54,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -110,9 +115,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb index 290c3ae7a..15c51dfe1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -28,9 +28,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -79,9 +84,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -109,6 +115,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] template Value to be assigned + def template=(template) + if template.nil? + fail ArgumentError, 'template cannot be nil' + end + + @template = template + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb index 97280f302..5d3ab09e2 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_files_response_template.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateUpdateFilesResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb index 53ae4fb09..210aae825 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -224,9 +224,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -311,9 +316,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateEmbeddedRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -548,6 +554,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] requester_email_address Value to be assigned + def requester_email_address=(requester_email_address) + if requester_email_address.nil? + fail ArgumentError, 'requester_email_address cannot be nil' + end + + @requester_email_address = requester_email_address + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb index 770b6490b..339107b89 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_embedded_with_template_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -171,9 +171,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -251,9 +256,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateEmbeddedWithTemplateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -462,6 +468,36 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] requester_email_address Value to be assigned + def requester_email_address=(requester_email_address) + if requester_email_address.nil? + fail ArgumentError, 'requester_email_address cannot be nil' + end + + @requester_email_address = requester_email_address + end + + # Custom attribute writer method with validation + # @param [Object] template_ids Value to be assigned + def template_ids=(template_ids) + if template_ids.nil? + fail ArgumentError, 'template_ids cannot be nil' + end + + @template_ids = template_ids + end + # Custom attribute writer method with validation # @param [Object] message Value to be assigned def message=(message) diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb index b39bab7da..3aa84129f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -165,9 +165,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -240,9 +245,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb index 7b93bedd3..d72c78fd5 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_create_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -33,9 +33,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -85,9 +90,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -121,6 +127,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] unclaimed_draft Value to be assigned + def unclaimed_draft=(unclaimed_draft) + if unclaimed_draft.nil? + fail ArgumentError, 'unclaimed_draft cannot be nil' + end + + @unclaimed_draft = unclaimed_draft + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb index 30efe7d1d..1ed535c5f 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_edit_and_resend_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -63,9 +63,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -121,9 +126,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftEditAndResendRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftEditAndResendRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -183,6 +189,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + @client_id = client_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb index b777dac73..f393e20a6 100644 --- a/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/unclaimed_draft_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -55,9 +55,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -115,9 +120,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::UnclaimedDraftResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/sdks/ruby/lib/dropbox-sign/models/warning_response.rb b/sdks/ruby/lib/dropbox-sign/models/warning_response.rb index efe4d772d..32042a9c9 100644 --- a/sdks/ruby/lib/dropbox-sign/models/warning_response.rb +++ b/sdks/ruby/lib/dropbox-sign/models/warning_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -35,9 +35,14 @@ def self.attribute_map } end + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + # Returns all the JSON keys this model knows about def self.acceptable_attributes - attribute_map.values + acceptable_attribute_map.values end # Attribute type mapping. @@ -87,9 +92,10 @@ def initialize(attributes = {}) end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::WarningResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::WarningResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -126,6 +132,26 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] warning_msg Value to be assigned + def warning_msg=(warning_msg) + if warning_msg.nil? + fail ArgumentError, 'warning_msg cannot be nil' + end + + @warning_msg = warning_msg + end + + # Custom attribute writer method with validation + # @param [Object] warning_name Value to be assigned + def warning_name=(warning_name) + if warning_name.nil? + fail ArgumentError, 'warning_name cannot be nil' + end + + @warning_name = warning_name + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/sdks/ruby/lib/dropbox-sign/version.rb b/sdks/ruby/lib/dropbox-sign/version.rb index 0018310b6..ba3c0c968 100644 --- a/sdks/ruby/lib/dropbox-sign/version.rb +++ b/sdks/ruby/lib/dropbox-sign/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end @@ -14,5 +14,5 @@ module Dropbox end module Dropbox::Sign - VERSION = '1.8-dev' + VERSION = '1.8.1-dev' end diff --git a/sdks/ruby/openapi-config.yaml b/sdks/ruby/openapi-config.yaml index ccbf1d9b6..31f0c8193 100644 --- a/sdks/ruby/openapi-config.yaml +++ b/sdks/ruby/openapi-config.yaml @@ -9,13 +9,16 @@ additionalProperties: gemName: dropbox-sign gemRequiredRubyVersion: '>= 2.7' moduleName: "Dropbox::Sign" - gemVersion: 1.8-dev + gemVersion: 1.8.1-dev sortModelPropertiesByRequiredFlag: true legacyDiscriminatorBehavior: true gitUserId: hellosign gitRepoId: dropbox-sign-ruby useCustomTemplateCode: true licenseCopyrightYear: 2024 + oseg.printApiCallProperty: true + oseg.security.api_key.username: YOUR_API_KEY + oseg.security.oauth2.access_token: YOUR_ACCESS_TOKEN files: dropbox-event_callback_helper.mustache: templateType: SupportingFiles diff --git a/sdks/ruby/run-build b/sdks/ruby/run-build index 7127d6455..dc37a2cd7 100755 --- a/sdks/ruby/run-build +++ b/sdks/ruby/run-build @@ -18,7 +18,7 @@ rm -f "${DIR}/lib/dropbox-sign/models/"*.rb docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/ruby/spec/spec_helper.rb b/sdks/ruby/spec/spec_helper.rb index a365de3db..bf9c23477 100644 --- a/sdks/ruby/spec/spec_helper.rb +++ b/sdks/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech -Generator version: 7.8.0 +Generator version: 7.12.0 =end diff --git a/sdks/ruby/templates/README.mustache b/sdks/ruby/templates/README.mustache index a8e4a9cde..0fe015edd 100644 --- a/sdks/ruby/templates/README.mustache +++ b/sdks/ruby/templates/README.mustache @@ -110,9 +110,9 @@ require '{{{gemName}}}' # Configure a proc to get access tokens in lieu of the static access_token configuration config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } {{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} - config.api_key['{{{name}}}'] = 'YOUR API KEY' + config.api_key['{{{keyParamName}}}'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['{{{name}}}'] = 'Bearer'{{/isApiKey}}{{#isOAuth}} + # config.api_key_prefix['{{{keyParamName}}}'] = 'Bearer'{{/isApiKey}}{{#isOAuth}} # Configure OAuth2 access token for authorization: {{{name}}} config.access_token = 'YOUR ACCESS TOKEN' # Configure a proc to get access tokens in lieu of the static access_token configuration diff --git a/sdks/ruby/templates/api_client_typhoeus_partial.mustache b/sdks/ruby/templates/api_client_typhoeus_partial.mustache index 39792eb73..f55f98043 100644 --- a/sdks/ruby/templates/api_client_typhoeus_partial.mustache +++ b/sdks/ruby/templates/api_client_typhoeus_partial.mustache @@ -4,7 +4,8 @@ # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) - tempfile = download_file(request) if opts[:return_type] == 'File' + tempfile = nil + (download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -145,17 +146,15 @@ chunk.force_encoding(encoding) tempfile.write(chunk) end - # run the request to ensure the tempfile is created successfully before returning it - request.run - if tempfile + request.on_complete do + if !tempfile + fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") + end tempfile.close @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ "will be deleted automatically with GC. It's also recommended to delete the temp file "\ "explicitly with `tempfile.delete`" - else - fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}") + yield tempfile if block_given? end - - tempfile end diff --git a/sdks/ruby/templates/api_doc.mustache b/sdks/ruby/templates/api_doc.mustache index 818343d64..f58a83318 100644 --- a/sdks/ruby/templates/api_doc.mustache +++ b/sdks/ruby/templates/api_doc.mustache @@ -50,9 +50,9 @@ require '{{{gemName}}}' # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} config.access_token = 'YOUR_BEARER_TOKEN'{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} - config.api_key['{{{name}}}'] = 'YOUR API KEY' + config.api_key['{{{keyParamName}}}'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['{{{name}}}'] = 'Bearer'{{/isApiKey}}{{#isOAuth}} + # config.api_key_prefix['{{{keyParamName}}}'] = 'Bearer'{{/isApiKey}}{{#isOAuth}} # Configure OAuth2 access token for authorization: {{{name}}} config.access_token = 'YOUR ACCESS TOKEN'{{/isOAuth}} {{/authMethods}}end diff --git a/sdks/ruby/templates/configuration.mustache b/sdks/ruby/templates/configuration.mustache index 312790387..ef53ee3a3 100644 --- a/sdks/ruby/templates/configuration.mustache +++ b/sdks/ruby/templates/configuration.mustache @@ -237,7 +237,7 @@ module {{moduleName}} type: 'api_key', in: {{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}}, key: '{{keyParamName}}', - value: api_key_with_prefix('{{name}}'{{#vendorExtensions.x-auth-id-alias}}, '{{.}}'{{/vendorExtensions.x-auth-id-alias}}) + value: api_key_with_prefix('{{keyParamName}}'{{#vendorExtensions.x-auth-id-alias}}, '{{.}}'{{/vendorExtensions.x-auth-id-alias}}) }, {{/isApiKey}} {{#isBasic}} diff --git a/sdks/ruby/templates/partial_model_generic.mustache b/sdks/ruby/templates/partial_model_generic.mustache index 4d9c5a82c..62bfd7843 100644 --- a/sdks/ruby/templates/partial_model_generic.mustache +++ b/sdks/ruby/templates/partial_model_generic.mustache @@ -45,16 +45,21 @@ } end - # Returns all the JSON keys this model knows about{{#parent}}, including the ones defined in its parent(s){{/parent}} - def self.acceptable_attributes + # Returns attribute mapping this model knows about{{#parent}}, including the ones defined in its parent(s){{/parent}} + def self.acceptable_attribute_map {{^parent}} - attribute_map.values + attribute_map {{/parent}} {{#parent}} - attribute_map.values.concat(superclass.acceptable_attributes) + superclass.acceptable_attribute_map.merge(attribute_map) {{/parent}} end + # Returns all the JSON keys this model knows about{{#parent}}, including the ones defined in its parent(s){{/parent}} + def self.acceptable_attributes + acceptable_attribute_map.values + end + # Attribute type mapping. def self.openapi_types { @@ -182,14 +187,15 @@ end # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| {{^useCustomTemplateCode}} - if (!self.class.attribute_map.key?(k.to_sym)) + if (!acceptable_attribute_map.key?(k.to_sym)) {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} if (!self.class.merged_attributes.key?(k.to_sym)) {{/useCustomTemplateCode}} - fail ArgumentError, "`#{k}` is not a valid attribute in `{{{moduleName}}}::{{{classname}}}`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `{{{moduleName}}}::{{{classname}}}`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -437,6 +443,22 @@ @{{{name}}} = {{{name}}} end + {{/hasValidation}} + {{^hasValidation}} + {{^isNullable}} + {{#required}} + # Custom attribute writer method with validation + # @param [Object] {{{name}}} Value to be assigned + def {{{name}}}=({{{name}}}) + if {{{name}}}.nil? + fail ArgumentError, '{{{name}}} cannot be nil' + end + + @{{{name}}} = {{{name}}} + end + + {{/required}} + {{/isNullable}} {{/hasValidation}} {{/isEnum}} {{/vars}} diff --git a/src/Hello/OpenApi/RawFile.php b/src/Hello/OpenApi/RawFile.php index 85f902fb5..0ecfe46a2 100644 --- a/src/Hello/OpenApi/RawFile.php +++ b/src/Hello/OpenApi/RawFile.php @@ -98,6 +98,20 @@ public function getLogs(): array public function saveFile(string $targetFile): void { + foreach ($this->openapi['paths'] as $path => $path_item) { + foreach ($path_item as $method => $operation) { + if (empty($operation['responses'])) { + continue; + } + + foreach ($operation['responses'] as $code => $response) { + unset($this->openapi['paths'][$path][$method]['responses'][$code]); + $new_code = "{$code}_response_code_remove_me"; + $this->openapi['paths'][$path][$method]['responses'][$new_code] = $response; + } + } + } + $yaml = Yaml::dump( $this->openapi, 10, @@ -112,6 +126,7 @@ public function saveFile(string $targetFile): void $yaml = str_replace('metadata: []', 'metadata: {}', $yaml); $yaml = str_replace('additionalProperties: []', 'additionalProperties: {}', $yaml); $yaml = str_replace('application/json: []', 'application/json: {}', $yaml); + $yaml = preg_replace('/([0-9x]+)_response_code_remove_me:/i', '\'${1}\':', $yaml); file_put_contents($targetFile, $yaml); } diff --git a/translations/en.yaml b/translations/en.yaml index 553da26d9..e6ee3186d 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -131,26 +131,34 @@ "EmbeddedSignUrl::SIGNATURE_ID": The id of the signature to get a signature url for. "FaxGet::SUMMARY": Get Fax -"FaxGet::DESCRIPTION": Returns information about fax +"FaxGet::DESCRIPTION": Returns information about a Fax "FaxParam::FAX_ID": Fax ID "FaxDelete::SUMMARY": Delete Fax -"FaxDelete::DESCRIPTION": Deletes the specified Fax from the system. -"FaxFiles::SUMMARY": List Fax Files -"FaxFiles::DESCRIPTION": Returns list of fax files +"FaxDelete::DESCRIPTION": Deletes the specified Fax from the system +"FaxFiles::SUMMARY": Download Fax Files +"FaxFiles::DESCRIPTION": Downloads files associated with a Fax "FaxList::SUMMARY": Lists Faxes -"FaxList::DESCRIPTION": Returns properties of multiple faxes -"FaxList::PAGE": Page -"FaxList::PAGE_SIZE": Page size +"FaxList::DESCRIPTION": Returns properties of multiple Faxes +"FaxList::PAGE": Which page number of the Fax List to return. Defaults to `1`. +"FaxList::PAGE_SIZE": Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. "FaxSend::SUMMARY": Send Fax -"FaxSend::DESCRIPTION": Action to prepare and send a fax -"FaxSend::RECIPIENT": Fax Send To Recipient +"FaxSend::DESCRIPTION": Creates and sends a new Fax with the submitted file(s) +"FaxSend::RECIPIENT": |- + Recipient of the fax + Can be a phone number in E.164 format or email address "FaxSend::SENDER": Fax Send From Sender (used only with fax number) -"FaxSend::FILE": Fax File to Send -"FaxSend::FILE_URL": Fax File URL to Send +"FaxSend::FILE": |- + Use `files[]` to indicate the uploaded file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. +"FaxSend::FILE_URL": |- + Use `file_urls[]` to have Dropbox Fax download the file(s) to fax + + This endpoint requires either **files** or **file_urls[]**, but not both. "FaxSend::FILE_URL_NAMES": Fax File URL Names "FaxSend::TEST_MODE": API Test Mode Setting -"FaxSend::COVER_PAGE_TO": Fax Cover Page for Recipient -"FaxSend::COVER_PAGE_FROM": Fax Cover Page for Sender +"FaxSend::COVER_PAGE_TO": Fax cover page recipient information +"FaxSend::COVER_PAGE_FROM": Fax cover page sender information "FaxSend::COVER_PAGE_MESSAGE": Fax Cover Page Message "FaxSend::TITLE": Fax Title "FaxGetResponseExample::SUMMARY": Fax Response @@ -168,41 +176,41 @@ "Sub::FaxResponseTransmission::RECIPIENT": Fax Transmission Recipient "Sub::FaxResponseTransmission::STATUS_CODE": Fax Transmission Status Code "Sub::FaxResponseTransmission::SENT_AT": Fax Transmission Sent Timestamp -"FaxListResponseExample::SUMMARY": Returns the properties and settings of multiple Faxes. +"FaxListResponseExample::SUMMARY": Returns the properties and settings of multiple Faxes "FaxLineAddUser::SUMMARY": Add Fax Line User "FaxLineAddUser::DESCRIPTION": Grants a user access to the specified Fax Line. -"FaxLineAddUser::NUMBER": The Fax Line number. +"FaxLineAddUser::NUMBER": The Fax Line number "FaxLineAddUser::ACCOUNT_ID": Account ID "FaxLineAddUser::EMAIL_ADDRESS": Email address "FaxLineAreaCodeGet::SUMMARY": Get Available Fax Line Area Codes -"FaxLineAreaCodeGet::DESCRIPTION": Returns a response with the area codes available for a given state/provice and city. -"FaxLineAreaCodeGet::CITY": Filter area codes by city. -"FaxLineAreaCodeGet::STATE": Filter area codes by state. -"FaxLineAreaCodeGet::PROVINCE": Filter area codes by province. -"FaxLineAreaCodeGet::COUNTRY": Filter area codes by country. +"FaxLineAreaCodeGet::DESCRIPTION": Returns a list of available area codes for a given state/province and city +"FaxLineAreaCodeGet::CITY": Filter area codes by city +"FaxLineAreaCodeGet::STATE": Filter area codes by state +"FaxLineAreaCodeGet::PROVINCE": Filter area codes by province +"FaxLineAreaCodeGet::COUNTRY": Filter area codes by country "FaxLineCreate::SUMMARY": Purchase Fax Line -"FaxLineCreate::DESCRIPTION": Purchases a new Fax Line. +"FaxLineCreate::DESCRIPTION": Purchases a new Fax Line "FaxLineDelete::SUMMARY": Delete Fax Line "FaxLineDelete::DESCRIPTION": Deletes the specified Fax Line from the subscription. "FaxLineGet::SUMMARY": Get Fax Line "FaxLineGet::DESCRIPTION": Returns the properties and settings of a Fax Line. -"FaxLineGet::NUMBER": The Fax Line number. +"FaxLineGet::NUMBER": The Fax Line number "FaxLineList::SUMMARY": List Fax Lines "FaxLineList::DESCRIPTION": Returns the properties and settings of multiple Fax Lines. "FaxLineList::ACCOUNT_ID": Account ID -"FaxLineList::PAGE": Page -"FaxLineList::PAGE_SIZE": Page size -"FaxLineList::SHOW_TEAM_LINES": Show team lines +"FaxLineList::PAGE": Which page number of the Fax Line List to return. Defaults to `1`. +"FaxLineList::PAGE_SIZE": Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. +"FaxLineList::SHOW_TEAM_LINES": Include Fax Lines belonging to team members in the list "FaxLineRemoveUser::SUMMARY": Remove Fax Line Access -"FaxLineRemoveUser::DESCRIPTION": Removes a user's access to the specified Fax Line. -"FaxLineRemoveUser::NUMBER": The Fax Line number. -"FaxLineRemoveUser::ACCOUNT_ID": Account ID -"FaxLineRemoveUser::EMAIL_ADDRESS": Email address -"FaxLineCreate::AREA_CODE": Area code -"FaxLineCreate::CITY": City -"FaxLineCreate::COUNTRY": Country -"FaxLineCreate::ACCOUNT_ID": Account ID -"FaxLineDelete::NUMBER": The Fax Line number. +"FaxLineRemoveUser::DESCRIPTION": Removes a user's access to the specified Fax Line +"FaxLineRemoveUser::NUMBER": The Fax Line number +"FaxLineRemoveUser::ACCOUNT_ID": Account ID of the user to remove access +"FaxLineRemoveUser::EMAIL_ADDRESS": Email address of the user to remove access +"FaxLineCreate::AREA_CODE": Area code of the new Fax Line +"FaxLineCreate::CITY": City of the area code +"FaxLineCreate::COUNTRY": Country of the area code +"FaxLineCreate::ACCOUNT_ID": Account ID of the account that will be assigned this new Fax Line +"FaxLineDelete::NUMBER": The Fax Line number "FaxLineResponseExample::SUMMARY": Sample Fax Line Response "FaxLineAreaCodeGetResponseExample::SUMMARY": Sample Area Code Response "FaxLineListResponseExample::SUMMARY": Sample Fax Line List Response @@ -1702,25 +1710,25 @@ "EmbeddedSignUrl::SEO::TITLE": "Get Embedded Sign URL | iFrame | Dropbox Sign for Developers" "EmbeddedSignUrl::SEO::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." "FaxGet::SEO::TITLE": "Get Fax | API Documentation | Dropbox Fax for Developers" -"FaxGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here." +"FaxGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve properties of a fax, click here." "FaxDelete::SEO::TITLE": "Delete Fax | API Documentation | Dropbox Fax for Developers" "FaxDelete::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here." "FaxFiles::SEO::TITLE": "Fax Files | API Documentation | Dropbox Fax for Developers" -"FaxFiles::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here." +"FaxFiles::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to list the files of a fax, click here." "FaxList::SEO::TITLE": "List Faxes | API Documentation | Dropbox Fax for Developers" "FaxList::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here." -"FaxSend::SEO::TITLE": "Send Fax| API Documentation | Dropbox Fax for Developers" +"FaxSend::SEO::TITLE": "Send Fax | API Documentation | Dropbox Fax for Developers" "FaxSend::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here." "FaxLineAddUser::SEO::TITLE": "Fax Line Add User | API Documentation | Dropbox Fax for Developers" "FaxLineAddUser::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to add a user to an existing fax line, click here." "FaxLineAreaCodeGet::SEO::TITLE": "Fax Line Get Area Codes | API Documentation | Dropbox Fax for Developers" -"FaxLineAreaCodeGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here." +"FaxLineAreaCodeGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out what area codes are available, click here." "FaxLineCreate::SEO::TITLE": "Purchase Fax Line | API Documentation | Dropbox Fax for Developers" "FaxLineCreate::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to purchase a new fax line, click here." "FaxLineDelete::SEO::TITLE": "Delete Fax Line | API Documentation | Dropbox Fax for Developers" "FaxLineDelete::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here." "FaxLineGet::SEO::TITLE": "Get Fax Line | API Documentation | Dropbox Fax for Developers" -"FaxLineGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax line, click here." +"FaxLineGet::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve the properties of a fax line, click here." "FaxLineList::SEO::TITLE": "List Fax Lines | API Documentation | Dropbox Fax for Developers" "FaxLineList::SEO::DESCRIPTION": "The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here." "FaxLineRemoveUser::SEO::TITLE": "Fax Line Remove User | API Documentation | Dropbox Fax for Developers"

Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}